public ActionResult BoxBanner(byte priority = 2) { if (priority == (byte)Globals.PriorityBanner.RightAngle) { if (Request.Cookies[_cookieName] != null) { return(null); } //CreateCookie(); } var banners = new BannerController().ListBannerByPriority(priority, _isClearCache); if (banners == null || banners.Count == 0) { return(null); } if (priority == (byte)Globals.PriorityBanner.Rating) { var tmp = banners.ToArray(); var bannerId = tmp[_rd.Next(0, tmp.Length)].BannerId; return(PartialView(banners.Where(p => p.BannerId == bannerId).ToList())); } return(PartialView(banners)); }
public ActionResult PriceDetail(string slug) { var objBanner = new BannerController().GetBannerBySlug(slug, _isClearCache); if (objBanner == null) { Response.Redirect("/404/"); } var isMobile = MvcApplication.IsMobileMode(); var prices = new BannerController().ListBannerByPriority((byte)Globals.PriorityBanner.PriceList, _isClearCache); if (prices != null && prices.Count > 0) { prices = prices.Where(p => p.IsMobile == isMobile).ToList(); } ViewBag.Prices = prices; ViewBag.BreadCrumb = LoadBreadCrumbDetail("/bang-gia/", "Bảng giá", objBanner.NavigationUrl, objBanner.Title); return(View(objBanner)); }
public ActionResult PriceListNew() { var objCategory = new CategoryController().GetCategoryBySlug("bang-gia", _isClearCache); if (objCategory == null || objCategory.CategoryId == -1) { Response.Redirect("/404/"); } var prices = new BannerController().ListBannerByPriority((byte)Globals.PriorityBanner.PriceList, _isClearCache); if (prices != null && prices.Count > 0) { prices = prices.Where(p => p.IsMobile == false).OrderBy(c => c.Position).ToList(); } ViewBag.BreadCrumb = LoadBreadCrumb(objCategory); ViewBag.ObjCategory = objCategory; return(View(prices)); }