private void RegisterM2Sys(string biodata, Guid registrationId)
        {
            // bioplugin web service
            M2SysBiometricService.BioPluginService bioplugin = new M2SysBiometricService.BioPluginService();
            string result = bioplugin.RegisterEx(RegistrationID: registrationId.ToString(),
                LeftEnrollTemplate: biodata, RightEnrollTemplate: biodata,
                LeftCaptureTemplate: biodata, RightCaptureTemplate: biodata, LocationID: 1);
            _logger.Debug(string.Format("REGISTER | REGID [{0}] RESULT [(1)]", registrationId, result));
            if (result == "-1")
            {
                //Enrollment ID in the system.  Please enroll with unique ID
                ViewBag.M2SysMessage = "Enrollment ID is in the system.  Please enroll with a unique ID";
            }

            //TODO comment out this line after testing
            //result = bioplugin.DeleteID(ID: registrationId.ToString(), engineName: "FV1");
        }
        public ActionResult Update(string id)
        {
            M2SysBiometricService.BioPluginService bioplugin = new M2SysBiometricService.BioPluginService();
            var result = bioplugin.DeleteID(ID: id, engineName: "FV1");
            _logger.Debug(string.Format("UPDATE | REGID [{0}] RESULT [(1)]", id, result));

            return View();
        }
 public ActionResult Visitor(Visitor model, string id)
 {
     //TODO
     if (model.Biodata != null)
     {
         //Check identification
         M2SysBiometricService.BioPluginService bioplugin = new M2SysBiometricService.BioPluginService();
         var id_result = bioplugin.IdentifyQuick(model.Biodata, 0, 1, 1);
         _logger.Debug(string.Format("IDENTIFY | GATE [{0}] RESULT [(1)]", "Visitor Gate", id_result));
         Guid visitor_id;
         if (Guid.TryParse(id_result, out visitor_id))
         {
             model.Result = LogAccessIdentity(id_result, id);
             model.PassId = CreateVisitorPass(model, visitor_id);
             if (model.PassId != Guid.Empty)
             {
                 model.AllowPrintPass = true;
                 model.RptUrl = string.Format("../reports/ReportViewer.aspx?RptParams=pPassId,{0}", model.PassId);
                 return RenderVisitorPass(model.PassId);
             }
         }
         else
             model.Result = "Your finger scan was not recognized.  Please see terminal officer for enrollment in the identification system.";
     }
     model.Biodata = null;
     return View(model);
 }
 public ActionResult Identification(Capture model, string id)
 {
     if (model.Biodata != null)
     {
         //Check identification
         M2SysBiometricService.BioPluginService bioplugin = new M2SysBiometricService.BioPluginService();
         var result = bioplugin.IdentifyQuick(model.Biodata, 0, 1, 1);
         _logger.Debug(string.Format("IDENTIFY | GATE [{0}] RESULT [(1)]", model.GateTitle, result));
         model.Result = LogAccessIdentity(result, id);
     }
     model.GateTitle = OperatingIDs[Request.Cookies["OperatingId"].Value];
     return View(model);
 }