Biometrical Device info

lordtitanium

New member
Joined
Sep 17, 2012
Messages
1
Programming Experience
Beginner
I'm using zkemkeeper to get info from biometrical device, but the info is not right, can anyone help me with this code?
private void mostrarresultados()
        {
            if (bIsConnected == false)
            {
                MessageBox.Show("Please connect the device first", "Error");
                return;
            }


            int idwTMachineNumber = 0;
            int idwEnrollNumber = 0;
            int idwEMachineNumber = 0;
            int idwVerifyMode = 0;
            int idwInOutMode = 0;
            int idwYear = 0;
            int idwMonth = 0;
            int idwDay = 0;
            int idwHour = 0;
            int idwMinute = 0;
            int ienrollnumber = 0;
            String iname = "";
            String ipassword = "";
            int iprivilege = 0;
            bool enable = true;




            int idwErrorCode = 0;
            int iGLCount = 0;
            int iIndex = 0;
            int iBackupNumber = 0;
            int idwMachinePrivilege = 0;
            int idwEnable = 0;


            axCZKEM1.RefreshData(iMachineNumber);
            Cursor = Cursors.WaitCursor;
            lvLogs.Items.Clear();
            axCZKEM1.EnableDevice(iMachineNumber, false);//disable the device
            if (axCZKEM1.ReadAllUserID(iMachineNumber))//read all the attendance records to the memory
            {
                while (axCZKEM1.GetAllUserInfo(iMachineNumber, ref idwEnrollNumber, ref iname, ref ipassword, ref iprivilege, enable))//get records from the memory
                {


                    idwEnrollNumber++;
                    lvLogs.Items.Add(idwEnrollNumber.ToString());
                    lvLogs.Items[iIndex].SubItems.Add(iname.ToString());
                    lvLogs.Items[iIndex].SubItems.Add(ipassword.ToString());
                    lvLogs.Items[iIndex].SubItems.Add(iprivilege.ToString());
                    iIndex++;
                }
            }
            else
            {
                Cursor = Cursors.Default;
                axCZKEM1.GetLastError(ref idwErrorCode);


                if (idwErrorCode != 0)
                {
                    MessageBox.Show("Reading data from terminal failed,ErrorCode: " + idwErrorCode.ToString(), "Error");
                }
                else
                {
                    MessageBox.Show("No data from terminal returns!", "Error");
                }
            }
            axCZKEM1.EnableDevice(iMachineNumber, true);//enable the device
            Cursor = Cursors.Default;
        }
 
Last edited by a moderator:
Top Bottom