Ejemplo n.º 1
0
        public ViewResult Index()
        {
            var pageId     = Int32.TryParse(Request.Query["page"], out _) ? Convert.ToInt32(Request.Query["page"]) : 0;
            var activeMenu = _menuService.GetMenu(pageId) ?? _menuService.Anasayfa();
            var model      = new ContentViewModel
            {
                ActiveMenu = activeMenu,
                UstMenu    = activeMenu.AltMenuId == 0 ? null : _menuService.GetMenu(activeMenu.AltMenuId),
                GenelData  = _genelService.GetSingle()
            };

            if (activeMenu.MenuAdi.ToLower().Contains("komite") || activeMenu.MenuAdiEng.ToLower().Contains("commit"))
            {
                model.OrgKomites = _uyeService.GetOrgKomite();
                model.BilKomites = _uyeService.GetBilKomite();
            }
            return(View(model));
        }
 public ViewResult Index()
 {
     var pageId = Int32.TryParse(Request.Query["page"], out _) ? Convert.ToInt32(Request.Query["page"]) : 0;
     var activeMenu = _menuService.GetMenu(pageId) ?? _menuService.Anasayfa();
     var model = new ContentViewModel
     {
         ActiveMenu = activeMenu,
         UstMenu = activeMenu.AltMenuId == 0 ? null : _menuService.GetMenu(activeMenu.AltMenuId),
         GenelData = _genelService.GetSingle()
     };
     return View(model);
 }