我正在使用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从设备加载所有记录,这花费了太多的时间,几乎挂起设备,因为设备包含超过15,000条记录。
也不知道如何使用GetDataFile函数,我的意思是它保存文件的位置。
请帮帮忙
发布于 2015-03-07 16:03:06
默认情况下,zkemkeeper.dll不支持“在指定日期范围内下载考勤记录”。为此,您必须使用ZK的自定义SDK
发布于 2017-08-16 17:47:20
我遇到了类似的问题,我必须这样解决它。如果您的应用程序正在使用基于数据库或文件的数据存储,您可以在保存所有数据后清除设备的日志。
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();
}
}这样你的下一次下载将是更快的和clear操作。您将能够在每次需要时从设备下载所有日志数据,当然,一旦数据存储到数据库中,您就可以对数据进行过滤。
用户不知道日志数据是在设备中还是在数据库中。重要的是,数据存储在某个地方,用户可以看到它。
发布于 2015-09-10 19:12:05
我通过zkemkeeper得到了一个带有指定时间(日期范围)的解决方案下载考勤记录。
If idwYear.ToString() = Date1.Value.Year.ToString() And idwMonth.ToString() = Date1.Value.Month.ToString() And idwDay.ToString() = Date1.Value.Day.ToString() Then
//type coding
End Ifhttps://stackoverflow.com/questions/28717830
复制相似问题