public void OnComplete(object Capture, string ReaderSerialNumber, Sample Sample)
        {
            MakeReport("The " + getFingerType() + " fingerprint was captured.");
            Message = null;

            // use verification method
            Process(Sample);
            //check for saturdays and sundays and return if not saturday or sunday
            if (GetFingerPrints(FingerBmp))
            {
                int response = _attendanceRepo.SaveAttendance(courseId, StudentId, activeSemester.Id, LoggedInUser.UserId);
                if (response == 0)
                {
                    labelMessage = "You have already signed in";
                    lblMsg.Invoke(new Action(ShowMsg));
                }
                else if (response == 1)
                {
                    labelMessage = "You have signed in successfully. Welcome to class";
                    lblMsg.Invoke(new Action(LoadUI));
                }

                else
                {
                    labelMessage = "Sign in failed";
                    lblMsg.Invoke(new Action(ShowMsg));
                }
            }
            else
            {
                labelMessage = "Identification Failed";
                lblMsg.Invoke(new Action(ShowMsg));
            }
        }
 public static void SaveAttendance(VerifiedData data)
 {
     try
     {
         var save = _repo.SaveAttendance(_courseId, data.Id, LoggedInUser.ActiveSession.Id, LoggedInUser.UserId);
         if (save == string.Empty)
         {
             Base.ShowSuccess("", "Attendance saved");
             //  lblMsg.Invoke(new Action(Load));
         }
         else
         {
             Base.ShowInfo("", save);
         }
     }
     catch (Exception e)
     {
         Base.ShowError("Error", e.Message);
     }
 }
 internal void Login(Employee currentEmployee, DateTime now)
 {
     AttendanceRepo.SaveAttendance(currentEmployee, now);
     this.notifyLogIn(new LoginEvent());
 }