Beispiel #1
0
        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))
            {
                UserInfo fpInfo = new UserInfo();
                fpInfo.FingerIndex = 0;
                for (idwFingerIndex = 0; idwFingerIndex < 10; idwFingerIndex++)
                {
                    if (objZkeeper.GetUserTmpExStr(machineNumber, sdwEnrollNumber, idwFingerIndex, out iFlag, out sTmpData, out iTmpLength))
                    {
                        fpInfo = new UserInfo();
                        fpInfo.MachineNumber = machineNumber;
                        fpInfo.EnrollNumber  = sdwEnrollNumber;
                        fpInfo.Name          = sName;
                        fpInfo.FingerIndex  += 1; //idwFingerIndex;
                        fpInfo.TmpData       = sTmpData;
                        fpInfo.Privelage     = iPrivilege;
                        fpInfo.Password      = sPassword;
                        fpInfo.Enabled       = bEnabled;
                        fpInfo.iFlag         = iFlag.ToString();
                    }
                }
                lstFPTemplates.Add(fpInfo);
            }
            return(lstFPTemplates);
        }