static private void reset() { RegisterCount = 0; regTempLen = 0; iFid = 1; fpInstance = new zkfp(); RegTmps = new byte[3][]; mfpWidth = 0; mfpHeight = 0; bIsTimeToDie = false; cbCapTmp = 2048; CapTmp = new byte[2048]; RegTmp = new byte[2048]; fingerPrintTemplate = string.Empty; paramValue = new byte[4]; }
public SensorModel() { fpInstance = new zkfp(); _server = new DataServer.Dataserver(); // _userList = _server.GetStationUserList(Guid.Parse(LocalData.Context.CurrentDepartmentID)); }
private void DoCapture() { while (!bIsTimeToDie) { cbCapTmp = 2048; int ret = zkfp2.AcquireFingerprint(mDevHandle, FPBuffer, CapTmp, ref cbCapTmp); if (ret == zkfp.ZKFP_ERR_OK) { //SendMessage(FormHandle, MESSAGE_CAPTURED_OK, IntPtr.Zero, IntPtr.Zero); // start // Get all records from DB string query = String.Format("select * from children c " + "join guardians g on g.guardianid = c.guardianid " + "join messes m on m.Messid = g.messid where m.messid = {0}", messIdTemp); SqlConnection con = new SqlConnection(@"Server=(localdb)\MSSQLLocalDB;Database=SmartHealth;Trusted_Connection=True;MultipleActiveResultSets=true"); SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(query, con); con.Open(); DataTable dt = new DataTable(); sqlDataAdapter.Fill(dt); zkfp t = new zkfp(); foreach (DataRow dr in dt.Rows) { string cFP = dr["FingerPrint"].ToString(); string cKId = dr["ChildId"].ToString(); if (!String.IsNullOrEmpty(cFP)) { byte[] currentFingerPrint = System.Convert.FromBase64String(cFP); var data = zkfp2.DBMatch(mDBHandle, CapTmp, currentFingerPrint); if (data > 50 && data <= 100) { // match successfull //childIdTemp = cKId; //TempData["temp"] = cKId; ViewBag.temp = cKId; int childids = Int16.Parse(cKId); device_close(); try { add(childids); } catch (Exception ex) { } //Response.Redirect("~/Child/indexsave"); /// RedirectToAction("indexsave").ExecuteResult(this.ControllerContext); // messIdTemp = messIdTemp; } } } con.Close(); } Thread.Sleep(200); } }