c# - 如何通过zkemkeeper下载指定时间的考勤记录

标签 c# interop biometrics

我正在使用 zkemkeeper.dll 从生物识别设备下载出勤记录。

if (axCZKEM1.ReadGeneralLogData(iMachineNumber))//read all the attendance records to the memory
{   
   while (axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, out idwEnrollNumber, out idwVerifyMode
        , out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, ref idwWorkCode))//get records from the memory
   {
    //code here   
   }
}

我的问题是如何通过zkemkeeper下载指定时间(日期范围)的考勤记录。
ReadGeneralLogData 函数从设备加载所有记录,这花费了太多时间,几乎使设备挂起,因为设备包含超过 15000 条记录。
也不知道如何使用 GetDataFile 函数,我的意思是它保存文件的位置。
请帮忙

最佳答案

我遇到了类似的问题,我不得不这样解决。如果您的应用程序使用数据库或基于文件的数据存储,您可以在保存所有数据后清除设备日志。

if (axCZKEM1.ReadGeneralLogData(iMachineNumber))//read all the attendance records to the memory
{   
   while (axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, out idwEnrollNumber, out idwVerifyMode
        , out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, ref idwWorkCode))//get records from the memory
   {
    //save your data here   
   }

//after that you clear the machine log
    if (axCZKEM1.ClearGLog(iMachineNumber))
    {
        axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
        message = "All att Logs have been cleared from teiminal!, Success";
    }
    else
    {
        axCZKEM1.GetLastError(ref idwErrorCode);
        message = "Operation failed, ErrorCode = " + idwErrorCode.ToString();
    }


}

这样您的下一次下载将快得多并且操作也清晰。您将能够在每次需要时从设备下载所有日志数据,当然,一旦数据存储在数据库中,您就可以对其进行过滤。

请相信我,用户不知道日志数据是在设备中还是在数据库中。重要的是数据存储在某个地方并且用户可以看到它。

关于c# - 如何通过zkemkeeper下载指定时间的考勤记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28717830/

相关文章:

opencv - 使用 OpenCV 增强手掌静脉

c# - 为什么我的应用程序在我的电脑上可以运行,但在其他电脑上却不行

c# - SelectMany on { key, values } 的元组 - 在结果中获取键?

c# - 泛型类型类

c# - 使用公共(public)中间证书获取 Azure Function App 到 https(APIM) 端点调用的部分链异常

mono - 无效的 IL 代码 IL_0038 : newobj in MonoTouch

java - 如何使 C++ 代码在 Java 组件上绘制

.net - 从 .NET 应用程序引用 Google 的 V8 引擎

c# - 无论 TimeSpan 或计数如何,Reactive Extensions Buffer 每次都会执行

scikit-learn - 标准定标器在 PCA 之前产生不同的值