public IActionResult MagazineListGrid()
        {
            var magazines = _magService.GetAllMagazinesIncluding();

            if (!magazines.IsOk())
            {
                TempData["ErrorMessage"] = string.Format("Hiba a lekérés során ({0} : {1})", magazines.Status, magazines.Message);
                return(PartialView("Partials/_MagazineListGrid", new List <Magazine>()));
            }

            // Only grid string query values will be visible here.
            return(PartialView("Partials/_MagazineListGrid", magazines.Data));
        }
Exemple #2
0
        public IActionResult Index()
        {
            var homeVM       = new HomeVM();
            var gyoparResult = _magService.GetAllMagazinesIncluding();

            if (gyoparResult.IsOk())
            {
                homeVM.GY_Magazines     = gyoparResult.Data.Count;
                homeVM.GY_Articles      = gyoparResult.Data.SelectMany(x => x.Articles).Count();
                homeVM.GY_MediaElements = gyoparResult.Data.SelectMany(x => x.MediaElements.Where(y => y.Scope == EKE.Data.Entities.Enums.MediaTypesScope.Cover)).Count();
            }
            ;

            var museumResult = _museumService.GetAllElements();

            if (museumResult.IsOk())
            {
                homeVM.M_Elements      = museumResult.Data.Count;
                homeVM.M_MediaElements = museumResult.Data.SelectMany(x => x.MediaElement.Where(y => y.Scope == EKE.Data.Entities.Enums.MediaTypesScope.Museum)).Count();
                homeVM.M_Tags          = museumResult.Data.SelectMany(x => x.Tags).Count();
            }
            ;
            return(View(homeVM));
        }