public ActionResult Index() { var publicModuleFolder = _hostingEnvironment.ContentRootFileProvider.GetDirectoryContents(NccInfo.ModuleFolder); var coreModuleFolder = _hostingEnvironment.ContentRootFileProvider.GetDirectoryContents(NccInfo.CoreModuleFolder); ViewBag.Modules = _moduleService.LoadAll(); _coreModules = moduleManager.LoadModules(coreModuleFolder); _publicModules = moduleManager.LoadModules(publicModuleFolder); return(View()); }
public ActionResult Index() { var webSite = new NccWebSite(); var webSites = _webSiteService.LoadAll(); if (webSites != null && webSites.Count > 0) { webSite = webSites.FirstOrDefault(); } ViewBag.TotalPublishedPage = _pageService.LoadAllByPageStatus(NccPage.NccPageStatus.Published).Count(); ViewBag.TotalPage = _pageService.LoadAll(true).Count(); ViewBag.TotalPublishedPost = _postService.Count(true, true, true, true); ViewBag.TotalPost = _postService.LoadAll(true).Count(); ViewBag.TotalUser = _userManager.Users.Count(); ViewBag.TotalModule = _moduleService.LoadAll().Count(); ViewBag.TotalTheme = GlobalContext.Themes.Count(); return(View(webSite)); }