public ICollection <User> GetAllUserInfo(ZKLib objZkeeper, int machineNumber) { string sdwEnrollNumber = string.Empty, sName = string.Empty, sPassword = string.Empty, sTmpData = string.Empty; int iPrivilege = 0, iTmpLength = 0, iFlag = 0, idwFingerIndex; bool bEnabled = false; ICollection <User> lstFPTemplates = new List <User>(); objZkeeper.ReadAllUserID(machineNumber); objZkeeper.ReadAllTemplate(machineNumber); while (objZkeeper.SSR_GetAllUserInfo(machineNumber, out sdwEnrollNumber, out sName, out sPassword, out iPrivilege, out bEnabled)) { for (idwFingerIndex = 0; idwFingerIndex < 10; idwFingerIndex++) { if (objZkeeper.GetUserTmpExStr(machineNumber, sdwEnrollNumber, idwFingerIndex, out iFlag, out sTmpData, out iTmpLength)) { User fpInfo = new User(); fpInfo.MachineNumber = machineNumber; fpInfo.EnrollNumber = sdwEnrollNumber; fpInfo.Name = sName; fpInfo.FingerIndex = idwFingerIndex; fpInfo.TmpData = sTmpData; fpInfo.Privelage = iPrivilege; fpInfo.Password = sPassword; fpInfo.Enabled = bEnabled; fpInfo.iFlag = iFlag.ToString(); lstFPTemplates.Add(fpInfo); } } } return(lstFPTemplates); }
public void GetGeneratLog(ZKLib objZkeeper, int machineNumber, string enrollNo) { string name = null; string password = null; int previlage = 0; bool enabled = false; byte[] byTmpData = new byte[2000]; int tempLength = 0; int idwFingerIndex = 0;// [ <--- Enter your fingerprint index here ] int iFlag = 0; objZkeeper.ReadAllTemplate(machineNumber); while (objZkeeper.SSR_GetUserInfo(machineNumber, enrollNo, out name, out password, out previlage, out enabled)) { if (objZkeeper.GetUserTmpEx(machineNumber, enrollNo, idwFingerIndex, out iFlag, out byTmpData[0], out tempLength)) { break; } } }