예제 #1
0
        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()));
        }
예제 #2
0
        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());
        }
예제 #3
0
        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));
        }
예제 #4
0
        public ActionResult GetAllCollection()
        {
            List <CollectionBO> lstCollection = CollectionDAO.GetAllCollection();

            return(PartialView(lstCollection));
        }
예제 #5
0
 public void InitSelectListCollection(long?selectedID = null)
 {
     ViewBag.CollectionID = new SelectList(CollectionDAO.GetAllCollection(), "id", "name", selectedID);
 }