Ejemplo n.º 1
0
        // GET: LoadBrand
        public ActionResult ChiNhanh()
        {
            var product = new BrandDao();

            ViewBag.DSChiNhanh = product.ListAll();
            return(View());
        }
Ejemplo n.º 2
0
        // GET: Admin/Brand
        public ActionResult Index(string name, string state = "0", int page = 1, int pageSize = 8)
        {
            ViewBag.Name = name;

            if (Int32.Parse(state) == 0)
            {
                ViewBag.AllState = "selected";
            }
            else if (Int32.Parse(state) == -1)
            {
                ViewBag.LockState = "selected";
            }
            else if (Int32.Parse(state) == 1)
            {
                ViewBag.OpenState = "selected";
            }
            ViewBag.State = state;

            var brandDao = new BrandDao();
            var model    = brandDao.ListAll(name, Int32.Parse(state), page, pageSize);

            return(View(model));
        }
Ejemplo n.º 3
0
        public void SetViewBagBrand(long?brandID, bool isShow)
        {
            var brandDao = new BrandDao();

            ViewBag.Brands = new SelectList(brandDao.ListAll(isShow), "ID", "Name", brandID);
        }
        public void SetViewBag(int?selectedId = null)
        {
            var dao = new BrandDao();

            ViewBag.MaCD = new SelectList(dao.ListAll(), "ID", "Name", selectedId);
        }