本文介绍了如何从zk机器获取今天的最后一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题
Problem
How to get last row in date today from zk machine ?
i应用程序的工作取决于机器上的出勤员工
i需要依赖机器上的日志文件数据来获取数据
i已经通过使用csharp连接到机器并获取所有考勤数据
但我需要获得最后一行每台机器意味着今天每天最后一次出勤行
i已添加zkemkeeper.dll
什么我试过了:
i work on application depend on attendance employee on machine
i need to depend on log file data on machine to get data
i already connect to machine by using csharp and get all data of time attendance
but i need to get last row per machine meaning last attendance row per day today
i already added zkemkeeper.dll
What I have tried:
ICollection<MachineInfo> lstMachineInfo = manipulator.GetLogData(objZkeeper, int.Parse(tbxMachineNumber.Text.Trim()));
if (lstMachineInfo != null && lstMachineInfo.Count > 0)
{
BindToGridView(lstMachineInfo);
ShowStatusBar(lstMachineInfo.Count + " records found !!", true);
}
else
DisplayListOutput("No records found");
推荐答案
... = lstMachineInfo.Where( x => x.date < DateTime.Now ).Last();
or
... = lstMachineInfo.Where(...).OrderDescending( x => x.date ).First();
or
etc.
这篇关于如何从zk机器获取今天的最后一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!