예제 #1
0
 public ActionResult Approve(int personnelId, int id)
 {
     try
     {
         var isAdmin = User.IsInAnyRoles("Admin");
         HRBusinessService.ApproveOvertime(UserOrganisationId, id, ApplicationUser.Id, isAdmin);
         return(Content(true.ToString()));
     }
     catch (Exception ex)
     {
         return(Content(ex.ToString()));
     }
 }
예제 #2
0
 public ActionResult ApproveOvertime(Overtime overtime)
 {
     try
     {
         var isAdmin = User.IsInAnyRoles("Admin");
         overtime.UpdatedBy      = ApplicationUser.UserName;
         overtime.UpdatedDateUtc = DateTime.UtcNow;
         HRBusinessService.ApproveOvertime(UserOrganisationId, overtime, ApplicationUser.Id, isAdmin);
     }
     catch (Exception ex)
     {
         return(this.JsonNet(ex));
     }
     return(this.JsonNet(string.Empty));
 }