Пример #1
0
        //[Authorize(Roles = "Admin, Contributor")]
        public ActionResult _sideBar()
        {
            ViewBag.IsAdmin = User.IsInRole("Admin");
            ViewBag.IsContributor = User.IsInRole("Contributor");

            PageListVM PageList = new PageListVM(); ;
            PageList.pageList = _mgr.GetEnabledStaticPages();
            return PartialView(PageList);
        }
Пример #2
0
 public ActionResult ViewStaticPage(int PageId)
 {
     PageListVM PageList = new PageListVM(); ;
     PageList.pageList = _mgr.GetAllStaticPages();
     StaticPage model = PageList.pageList.FirstOrDefault(s => s.PageId == PageId);
     return View(model);
 }