Esempio n. 1
0
 public void DeleteEnrolledEmployee(Employees.Employee employee, out List <string> messages, out bool deleted)
 {
     messages = new List <string>();
     deleted  = false;
     try
     {
         deleted = _czkem.SSR_DeleteEnrollData(Settings.Default._machineNo, employee.Id.ToString(), 12);
         messages.Add(deleted
             ? WriteLog(Resources.MESSAGE_REMOVED_USER + employee.FullName)
             : WriteLog(Resources.MESSAGE_UNABLE_TO_REMOVE_USER + employee.FullName));
     }
     catch (Exception e)
     {
         messages.Add(WriteLog(e.Message));
     }
 }
Esempio n. 2
0
 public void EnrollEmployee(Employees.Employee employee, out List <string> messages, out bool enrolled)
 {
     messages = new List <string>();
     enrolled = false;
     try
     {
         enrolled = _czkem.SSR_SetUserInfo(Settings.Default._machineNo, employee.Id.ToString(),
                                           employee.FullName,
                                           employee.Pin.ToString(),
                                           0, true);
         messages.Add(enrolled
             ? WriteLog(Resources.MESSAGE_ENROLLED_USER + employee.FullName)
             : WriteLog(Resources.FAILED_TO_ENROLL + employee.FullName));
     }
     catch (Exception e)
     {
         messages.Add(WriteLog(e.Message));
     }
 }