public ActionResult ViewDepartmentRequisitions() { if (Session["existinguser"] != null) { LoginDTO currentUser = (LoginDTO)Session["existinguser"]; if (currentUser.RoleId != (int)Enums.Roles.DepartmentHead && currentUser.RoleId != (int)Enums.Roles.DepartmentCoverHead) { return(RedirectToAction("RedirectToClerkOrDepartmentView", "Login")); } List <Requisition> deptReqs = requisitionManagementService.GetDepartmentRequisitions(currentUser.EmployeeId); RequisitionsDTO model = new RequisitionsDTO() { Requisitions = deptReqs }; return(View(model)); } return(RedirectToAction("Index", "Login")); }
public ActionResult ViewSchoolRequisitions() { if (Session["existinguser"] != null) { LoginDTO currentUser = (LoginDTO)Session["existinguser"]; if (currentUser.RoleId != (int)Enums.Roles.StoreClerk) { return(RedirectToAction("RedirectToClerkOrDepartmentView", "Login")); } List <Requisition> requisitions = requisitionCatalogueService.GetSchoolRequisitionsWithEmployeeAndDept(); //return requisitionsDTO model RequisitionsDTO model = new RequisitionsDTO() { Requisitions = requisitions }; return(View(model)); } return(RedirectToAction("Index", "Login")); }
public ActionResult ViewRequisitionList() { if (Session["existinguser"] != null) { LoginDTO currentUser = (LoginDTO)Session["existinguser"]; if (currentUser.RoleId == (int)Enums.Roles.StoreClerk && currentUser.RoleId == (int)Enums.Roles.StoreSupervisor && currentUser.RoleId == (int)Enums.Roles.StoreManager) { return(RedirectToAction("RedirectToClerkOrDepartmentView", "Login")); } //Get all requsition from this employee List <Requisition> requisitionHistory = requisitionCatalogueService.GetPersonalRequisitionHistory(currentUser.EmployeeId); RequisitionsDTO model = new RequisitionsDTO() { Requisitions = requisitionHistory }; //viewData add additional data return(View(model)); } return(RedirectToAction("Index", "Login")); }