コード例 #1
0
 public ActionResult Index()
 {
     ViewBag.Title            = "Home Page";
     ViewBag.SlideList        = _homeServices.ListSlide();
     ViewBag.roomsList        = _homeServices.ListRoom();
     ViewBag.bedsList         = _homeServices.ListBed();
     ViewBag.servicesList     = _homeServices.ListServices();
     ViewBag.FooterCategories = _homeServices.ListFooterCategory();
     ViewBag.Footers          = _homeServices.ListFooter();
     ViewBag.About            = _homeServices.ListAbout();
     //ViewBag.ListMenu = _homeServices.ListMenu();
     return(View());
 }
コード例 #2
0
        public ActionResult Home()
        {
            ViewBag.Title     = "Home Page";
            ViewBag.SlideList = _homeServices.ListSlide();
            var seo = _homeServices.GetHomeSeo();

            ViewBag.featuredProduct   = _homeServices.GetFeaturedProducts();
            ViewBag.topHotProduct     = _homeServices.GetTopHot();
            ViewBag.bestSellerProduct = _homeServices.GetBestSellerProducts();
            ViewBag.otherSlide        = _homeServices.GetOtherSlide();
            ViewBag.contentList       = _homeServices.GetHomeContent();
            ViewBag.bannerHome        = _homeServices.GetBannerHome();
            if (seo != null)
            {
                ViewBag.MetaTitle       = seo.MetaTitle ?? string.Empty;
                ViewBag.MetaDescription = seo.MetaDescription ?? string.Empty;
                ViewBag.MetaKeyword     = seo.MetaKeyWord ?? string.Empty;
            }
            return(View());
        }