Пример #1
0
        public ActionResult ViewPastRequisitions(string sessionId)
        {
            Employee           emp          = EmployeeService.GetUserBySessionId(sessionId);
            long               deptId       = emp.DeptId;
            List <Requisition> requisitions = RequisitionService.DisplayPastRequisitions(deptId);

            requisitions.Sort((x, y) => DateTime.Compare(y.DateOfRequest, x.DateOfRequest));
            bool all           = DelegateService.CheckPreviousHeadForNav(deptId);
            bool permanentHead = ((emp.EmpRole == "HEAD" && emp.EmpDisplayRole == "HEAD") || (emp.EmpRole == "EMPLOYEE" && emp.EmpDisplayRole == "HEAD"));

            ViewData["all"]              = all;
            ViewData["permanentHead"]    = permanentHead;
            ViewData["pastRequisitions"] = requisitions;
            ViewData["sessionId"]        = sessionId;
            return(View());
        }