public ICollection <UserInfo> GetAllUserInfo(ZkemClient 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 <UserInfo> lstFPTemplates = new List <UserInfo>(); 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)) { UserInfo fpInfo = new UserInfo(); 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); }
private void btnGetAllUserID_Click(object sender, EventArgs e) { try { // ICollection<UserIDInfo> lstUserIDInfo = manipulator.GetAllUserID(objZkeeper, int.Parse(tbxMachineNumber.Text.Trim())); int dwEnrollNumber = 0; int dwEMachineNumber = 0; int dwBackupNumber = 0; int dwMachinePrivilege = 0; int dwEnable = 1; int dwMachineNumber = int.Parse(tbxMachineNumber.Text.Trim()); ICollection <UserIDInfo> lstUserIDInfo = new List <UserIDInfo>(); //bool GetAllUserID(int dwMachineNumber, ref int dwEnrollNumber, ref int dwEMachineNumber, ref int dwBackupNumber, ref int dwMachinePrivilege, ref int dwEnable) objZkeeper.ReadAllUserID(dwMachineNumber); while (objZkeeper.GetAllUserID(dwMachineNumber, ref dwEnrollNumber, ref dwEMachineNumber, ref dwBackupNumber, ref dwMachinePrivilege, ref dwEnable)) { UserIDInfo userID = new UserIDInfo(); userID.BackUpNumber = dwBackupNumber; userID.Enabled = dwEnable; userID.EnrollNumber = dwEnrollNumber; userID.MachineNumber = dwMachineNumber; userID.Privelage = dwMachinePrivilege; lstUserIDInfo.Add(userID); } if (lstUserIDInfo != null && lstUserIDInfo.Count > 0) { BindToGridView(lstUserIDInfo); ShowStatusBar(lstUserIDInfo.Count + " records found !!", true); } else { DisplayEmpty(); DisplayListOutput("No records found"); } } catch (Exception ex) { DisplayListOutput(ex.Message); } }
public ICollection <UserInfo> GetAllUserInfo(ZkemClient objZkeeper, int dwMachineNumber, int count) { string dwEnrollNumber = ""; string Name = ""; string Password = ""; int Privilege = 0; bool Enabled = false; int dwFingerIndex; string TmpData = ""; int TmpLength = 0; int Flag = 0; ICollection <UserInfo> lstFPTemplates = new List <UserInfo>(); objZkeeper.ReadAllUserID(dwMachineNumber); objZkeeper.ReadAllTemplate(dwMachineNumber); // bool SSR_GetAllUserInfo(int dwMachineNumber, out string dwEnrollNumber, out string Name, out string Password, out int Privilege, out bool Enabled) while (objZkeeper.SSR_GetAllUserInfo(dwMachineNumber, out dwEnrollNumber, out Name, out Password, out Privilege, out Enabled)) { for (dwFingerIndex = 0; dwFingerIndex < 10; dwFingerIndex++) { // bool SSR_GetUserTmpStr(int dwMachineNumber, string dwEnrollNumber, int dwFingerIndex, out string TmpData, out int TmpLength) if (objZkeeper.SSR_GetUserTmpStr(dwMachineNumber, dwEnrollNumber, dwFingerIndex, out TmpData, out TmpLength)) { UserInfo fpInfo = new UserInfo(); fpInfo.MachineNumber = dwMachineNumber; fpInfo.EnrollNumber = dwEnrollNumber; fpInfo.Name = Name; fpInfo.FingerIndex = dwFingerIndex; fpInfo.TmpData = TmpData; fpInfo.Privelage = Privilege; fpInfo.Password = Password; fpInfo.Enabled = Enabled; fpInfo.iFlag = Flag.ToString(); lstFPTemplates.Add(fpInfo); } } } return(lstFPTemplates); }
// Get All User's ID public ICollection <UserIDInfo> GetAllUserID(ZkemClient objZkeeper, int machineNumber) { int dwEnrollNumber = 0; int dwEMachineNumber = 0; int dwBackUpNumber = 0; int dwMachinePrivelage = 0; int dwEnabled = 0; ICollection <UserIDInfo> lstUserIDInfo = new List <UserIDInfo>(); objZkeeper.ReadAllUserID(machineNumber); while (objZkeeper.GetAllUserID(machineNumber, ref dwEnrollNumber, ref dwEMachineNumber, ref dwBackUpNumber, ref dwMachinePrivelage, ref dwEnabled)) { UserIDInfo userID = new UserIDInfo(); userID.BackUpNumber = dwBackUpNumber; userID.Enabled = dwEnabled; userID.EnrollNumber = dwEnrollNumber; userID.MachineNumber = dwEMachineNumber; userID.Privelage = dwMachinePrivelage; lstUserIDInfo.Add(userID); } return(lstUserIDInfo); }