Beispiel #1
0
        public ActionResult Index()
        {
            ViewBag.Title        = ConfigHelper.GetByKey("HomeTitle");
            ViewBag.Keywords     = ConfigHelper.GetByKey("HomeKeyword");
            ViewBag.Descriptions = ConfigHelper.GetByKey("HomeDescription");
            var homeVm = new HomeViewModel();

            homeVm.Slide         = _slideDao.GetSlides();
            homeVm.Category      = _productCategory.GetCategory();
            homeVm.ProductHot    = _productDao.GetHomeHotProduct(5);
            homeVm.ProductNew    = _productDao.GetHomeLastest(5);
            homeVm.ProductOnsale = _productDao.GetHomeSale(5);
            homeVm.GetAllHome    = _productDao.GetAllHome(12);
            homeVm.SlideBanner   = _bannerDao.GetBannerByType("banner-slide");
            homeVm.QuangCao1     = _bannerDao.GetBannerByType("quang-cao-1");
            homeVm.QuangCao2     = _bannerDao.GetBannerByType("quang-cao-2");
            return(View(homeVm));
        }