public ActionResult SignOut()
        {
            try
            {
                Attendance attendance = AttendancesLogic.GetLastSignByUserId(SessionData.UserId);
                AttendancesLogic.UpdateAttendance(attendance);
                ActionRate actionRate = ActionRatesLogic.GetActionRateByName("Sign Out");
                EmployeePointsLogic.InsertNewEmployeePoint(new EmployeePoint()
                {
                    ActionRateId = actionRate.Id,
                    Date         = DateTimeHelper.Today(),
                    UserId       = attendance.EmpUserId,
                    Rate         = actionRate.MaxRate
                });

                return(RedirectToAction("UserSign"));
            }
            catch (Exception e)
            {
                LogsLogic.InsertLog(new Log()
                {
                    Message    = e.Message,
                    StackTrace = e.StackTrace,
                    StoryName  = "ManagementProject/Attendances/SignOut"
                });
                return(RedirectToAction("GeneralError", "Error", new { ErrorMessage = Error.ServerNotRespond }));
            }
        }
 public ActionResult SetSignOut(int id)
 {
     try
     {
         AttendancesLogic.UpdateAttendance(id);
     }
     catch (Exception e)
     {
         LogsLogic.InsertLog(new Log()
         {
             Message    = e.Message,
             StackTrace = e.StackTrace,
             StoryName  = "ManagementProject/Attendances/SetSignOut",
             Parameters = "id= " + id.ToString()
         });
     }
     return(RedirectToAction("Index"));
 }