public ActionResult ShowApproves() { DailyLeaveManager dlm = new DailyLeaveManager(UOW); var dailyLeaves = dlm.GetByOrganisationID(this.CurrentUser.OrganizationUnitID). Where(x => x.WorkflowStage.Order == 4); return(View(new DailyLeaveAssembles().ToJsons(dailyLeaves.ToList()))); }
public ActionResult ShowDenied() { DailyLeaveManager dlm = new DailyLeaveManager(UOW); var currentUser = new UserHelper().GetCurrent(); var dailyLeaves = dlm.GetByOrganisationID(currentUser.OrganizationUnitID). Where(x => x.WorkflowStage.Order == 1); return(View(new DailyLeaveAssembles().ToJsons(dailyLeaves.ToList()))); }
public ActionResult ApproveAll() { DailyLeaveManager dlm = new DailyLeaveManager(UOW); var dailyLeaves = dlm.GetByOrganisationID(this.CurrentUser.OrganizationUnitID). Where(x => x.WorkflowStage.Order == 3); foreach (var leave in dailyLeaves) { dlm.Approve(leave); } UOW.SaveChanges(); return(RedirectToAction("ApproveIndex", new { ac = "ApproveAll" })); }