示例#1
0
 public ActionResult Index(RequestsFilterOptions filterOptions)
 {
     if (!_securityService.CanRead())
     {
         return(RedirectToAction("ForbiddenError", "Home"));
     }
     ViewData["SecurityService"] = _securityService;
     ViewData["RequestService"]  = _requestService;
     return(View(
                _requestService.GetRequestIndexModelView(filterOptions,
                                                         _requestService.GetFilteredRequests(filterOptions))));
 }
示例#2
0
        public ActionResult Detail(int id)
        {
            var request = _requestService.GetRequestById(id);

            if (!_securityService.CanRead(request))
            {
                return(RedirectToAction("ForbiddenError", "Home"));
            }
            ViewData["SecurityService"] = _securityService;
            return(View(_requestService.GetRequestViewModelBy(request)));
        }