public ActionResult Index() { ViewBag.Slides = new SlideDAO().ListAll(); var productDAO = new ProductDAO(); var DanhMucDAO = new DanhMucDAO(); var DanhMucSanPhamDAO = new CategoryProductDAO(); ViewBag.NewProducts = productDAO.ListNewProduct(4); ViewBag.NewProducts1 = productDAO.ListNewProduct1(4); ViewBag.ListFeatureProducts = productDAO.ListFeatureProduct(4); ViewBag.SanPhamBanChay = productDAO.SanPhamBanChay(4); ViewBag.DanhMuc = DanhMucDAO.ListAll(); ViewBag.DanhMucSanPham = DanhMucSanPhamDAO.ListCategoryProduct(); ViewBag.SanPham = productDAO.ListAll(); return(View()); }
public void SetViewBag() { DanhMucDAO dao = new DanhMucDAO(); ViewBag.CategoryID = new SelectList(dao.ListAll(), "DanhMucID", "TenDanhMuc"); }
public JsonResult List() { return(Json(DanhMucDAO.ListAll(), JsonRequestBehavior.AllowGet)); }
public void LoadDanhMuc(long?selectedId = null) { var dao = new DanhMucDAO(); ViewBag.DanhMucID = new SelectList(dao.ListAll(), "ID", "TenDanhMuc", selectedId); }