Пример #1
0
        public ActionResult GetAdminMenu()
        {
            var _menu          = new MenuViewModel();
            var _leaveRequests = new List <LeaveRequestInfo>();

            using (MedicalCheckoutRepository Repo = new MedicalCheckoutRepository())
            {
                var _medicalCheckouts = Repo.GetPendingMedicalCheckoutsList();

                if (_medicalCheckouts.Count() > 0)
                {
                    _menu.IsNewMedicalRequest = true;
                }
            }

            using (LeaveRequestRepository Repo = new LeaveRequestRepository())
            {
                _leaveRequests = Repo.GetLeaveRequestList();
            }

            if (_leaveRequests.Count() > 0)
            {
                _menu.IsNewLeaveRequest = true;
            }

            return(PartialView("_AdminMenu", _menu));
        }
Пример #2
0
        // GET: Admin/Medical/Requests
        public ActionResult Requests()
        {
            try
            {
                var _medicalRequestList = new List <MedicalCheckoutInfo>();

                using (MedicalCheckoutRepository Repo = new MedicalCheckoutRepository())
                {
                    _medicalRequestList = Repo.GetPendingMedicalCheckoutsList();
                }

                return(View(_medicalRequestList));
            }

            catch (Exception ex)
            {
                return(View("Error", new HandleErrorInfo(ex, "Medical", "Requests")));
            }
        }