Ejemplo n.º 1
0
        public static void DoChangePermissionStatus(int id, String response)
        {
            LeavingPermission leavingPermission = ConnectionController.GetInstance().LeavingPermissions.Where(x => x.Id.Equals(id)).FirstOrDefault();

            leavingPermission.ResponseStatus = response;
            ConnectionController.GetInstance().SaveChanges();
        }
Ejemplo n.º 2
0
        public static void DoRequestLeaving(String startTime, String endTime, String reason)
        {
            LeavingPermission leavingPermission = new LeavingPermission();

            leavingPermission.EmployeeId     = ActiveUserController.GetActiveEmployee().Id;
            leavingPermission.Reason         = reason;
            leavingPermission.StartDate      = Convert.ToDateTime(startTime);
            leavingPermission.EndDate        = Convert.ToDateTime(endTime);
            leavingPermission.ResponseStatus = "Waiting";

            ConnectionController.GetInstance().LeavingPermissions.Add(leavingPermission);
            ConnectionController.GetInstance().SaveChanges();
        }