Rameez Javed

Rameez Javed

  • NA
  • 395
  • 61.1k

Intergation of Biometric with Web Application

Nov 12 2018 6:59 AM
Hi, I'm trying to integrate Biometric Device with my Web Application, but the issue is code works for Sdk, and a test project in WinForms but not working for my WebApplication, the debugger doesn't goes inside while loop.
  1. try  
  2.             {  
  3.                 //ShowStatusBar(string.Empty, true);  
  4.   
  5.                 lblMessage.Text = "";  
  6.   
  7.                 objZkeeper = new ZkemClient(RaiseDeviceEvent);  
  8.                 ICollection<UserInfo> lstFingerPrintTemplates = manipulator.GetAllUserInfo(objZkeeper, int.Parse("4370"));  
  9.   
  10.                   
  11.   
  12.                 //DataTable dt = manipulator.GetAllUserInfo(objZkeeper, int.Parse(hdID.Value));  
  13.                 if (lstFingerPrintTemplates != null && lstFingerPrintTemplates.Count > 0)  
  14.                 {  
  15.                     //BindToGridView(lstFingerPrintTemplates);  
  16.                     GV_Attendance.DataSource = lstFingerPrintTemplates;  
  17.                     GV_Attendance.DataBind();  
  18.                     ShowStatusBar(lstFingerPrintTemplates.Count + " records found !!"true);  
  19.   
  20.                 }  
  21.                 else  
  22.                 {  
  23.                     //DisplayListOutput("No records found");  
  24.                     lblMessage.Text = "Caution! No Record Found!";  
  25.                     pnlAlert.CssClass = "alert alert-warning";  
  26.                     pnlAlert.Visible = true;  
  27.                 }  
  28.                       
  29.             }  
  30.             catch (Exception ex)  
  31.             {  
  32.                 //DisplayListOutput(ex.Message);  
  33.                 lblMessage.Text = "Can't Fetch the User Data!";  
  34.                 pnlAlert.CssClass = "alert alert-warning";  
  35.                 pnlAlert.Visible = true;  
  36.             }  
    1. public ICollection<UserInfo> GetAllUserInfo(ZkemClient objZkeeper, int machineNumber)  
    2.         {  
    3.             string sdwEnrollNumber = string.Empty, sName = string.Empty, sPassword = string.Empty, sTmpData = string.Empty;  
    4.             int iPrivilege = 0, iTmpLength = 0, iFlag = 0, idwFingerIndex;  
    5.             bool bEnabled = false;  
    6.   
    7.             ICollection<UserInfo> lstFPTemplates = new List<UserInfo>();  
    8.   
    9.             objZkeeper.ReadAllUserID(machineNumber);  
    10.             objZkeeper.ReadAllTemplate(machineNumber);  
    11.               
    12.   
    13.                 while (objZkeeper.SSR_GetAllUserInfo(machineNumber, out sdwEnrollNumber, out sName, out sPassword, out iPrivilege, out bEnabled))  
    14.                 try  
    15.                 {  
    16.                     for (idwFingerIndex = 0; idwFingerIndex < 10; idwFingerIndex++)  
    17.                     {  
    18.                         if (objZkeeper.GetUserTmpExStr(machineNumber, sdwEnrollNumber, idwFingerIndex, out iFlag, out sTmpData, out iTmpLength))  
    19.                         {  
    20.                             UserInfo fpInfo = new UserInfo();  
    21.                             fpInfo.MachineNumber = machineNumber;  
    22.                             fpInfo.EnrollNumber = sdwEnrollNumber;  
    23.                             fpInfo.Name = sName;  
    24.                             fpInfo.FingerIndex = idwFingerIndex;  
    25.                             fpInfo.TmpData = sTmpData;  
    26.                             fpInfo.Privelage = iPrivilege;  
    27.                             fpInfo.Password = sPassword;  
    28.                             fpInfo.Enabled = bEnabled;  
    29.                             fpInfo.iFlag = iFlag.ToString();  
    30.   
    31.                             lstFPTemplates.Add(fpInfo);  
    32.                         }  
    33.                     }  
    34.   
    35.                 }  
    36.                 catch (Exception ex)  
    37.                 {  
    38.   
    39.                 }  
    40.             return lstFPTemplates;  
    41.         }  

Answers (1)