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())); } }
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)); }