public ActionResult Collection(int page = 1, int pageSize = 100) { var lstCollection = CollectionDAO.GetAllCollection(); if (lstCollection == null) { lstCollection = new List <CollectionBO>(); } return(View(lstCollection.OrderBy(x => x.displayorder).ToList())); }
public ActionResult SideBar(int currentID, bool isCollectionLoad) { var lstCollection = CollectionDAO.GetAllCollection(); var lstBrand = BrandModel.GetAllBrand(); if (lstCollection.Count == 0 && lstBrand.Count() == 0) { return(RedirectToAction("NotFound", "Error")); } ViewBag.ListCollection = lstCollection; ViewBag.ListBrand = lstBrand; ViewBag.CurrentID = currentID; ViewBag.IsCollectionLoad = isCollectionLoad; return(PartialView()); }
public ActionResult MenuBar(bool isMobile) { List <CollectionBO> lstCollection = CollectionDAO.GetAllCollection(); if (isMobile) { return(PartialView("MenuBarMobile", lstCollection)); } //gio-hang List <CartSession> lstCartItem = new List <CartSession>(); lstCartItem = Session["fancycart"] as List <CartSession>; if (lstCartItem == null) { lstCartItem = new List <CartSession>(); } ViewBag.ListCartItem = lstCartItem; return(PartialView("MenuBar", lstCollection)); }
public ActionResult GetAllCollection() { List <CollectionBO> lstCollection = CollectionDAO.GetAllCollection(); return(PartialView(lstCollection)); }
public void InitSelectListCollection(long?selectedID = null) { ViewBag.CollectionID = new SelectList(CollectionDAO.GetAllCollection(), "id", "name", selectedID); }