public ActionResult List(PersonnelFilter personnelFilter, int showColourBy) { try { var organisationId = UserOrganisationId; var personnelId = UserPersonnelId; var permissions = HRBusinessService.RetrievePersonnelPermissions(User.IsInRole("Admin"), organisationId, personnelId); return(this.JsonNet(HRBusinessService.RetrieveOrganisationalChart(UserOrganisationId, personnelId, permissions, personnelFilter, showColourBy))); } catch (Exception ex) { return(this.JsonNet(ex)); } }
public ActionResult Schedule(DateTime beginDate, PersonnelFilter personnelFilter, int showColourBy) { try { var organisationId = UserOrganisationId; var personnelId = UserPersonnelId; var permissions = HRBusinessService.RetrievePersonnelPermissions(User.IsInRole("Admin"), organisationId, personnelId); return(this.JsonNet(HRBusinessService.RetrieveAbsenceSchedule(organisationId, beginDate, beginDate.AddDays(6), permissions, UserPersonnelId, personnelFilter, showColourBy, ApplicationUser.Id))); } catch (Exception ex) { return(this.JsonNet(ex)); } }