public ActionResult Create(LoaiSanPham lsp) { try { // TODO: Add insert logic here LoaiBUS.ThemLSP(lsp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(String id, LoaiSanPham lsp) { try { // TODO: Add update logic here LoaiBUS.UpdateLSP(id, lsp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Xoa(String id, LoaiSanPham lsp) { try { // TODO: Add delete logic here lsp.TinhTrang = "1"; LoaiBUS.UpdateLSP(id, lsp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Xoa(String id) { return(View(LoaiBUS.ChiTietAdmin(id))); }
// GET: Admin/LoaiSanPham/Edit/5 public ActionResult Edit(String id) { var db = LoaiBUS.ChiTietAdmin(id); return(View(db)); }
// GET: Admin/LoaiSanPham public ActionResult Index() { var db = LoaiBUS.DanhSachAll(); return(View(db)); }
// GET: Admin/Admin/Create public ActionResult Create() { ViewBag.MaNhaSanXuat = new SelectList(HangBUS.DanhSach(), "MaNhaSanXuat", "TenNhaSanXuat"); ViewBag.MaLoaiSanPham = new SelectList(LoaiBUS.DanhSach(), "MaLoaiSanPham", "TenLoaiSanPham"); return(View()); }
// GET: Admin/Admin/Edit/5 public ActionResult Edit(String id) { ViewBag.MaNhaSanXuat = new SelectList(HangBUS.DanhSach(), "MaNhaSanXuat", "TenNhaSanXuat", MobiShopBUS.ChiTietSP(id).MaNhaSanXuat); ViewBag.MaLoaiSanPham = new SelectList(LoaiBUS.DanhSach(), "MaLoaiSanPham", "TenLoaiSanPham", MobiShopBUS.ChiTietSP(id).MaLoaiSanPham); return(View(MobiShopBUS.ChiTietSP(id))); }
// GET: Loai public ActionResult Index(String id, int page = 1, int pagesize = 3) { var dsLSP = LoaiBUS.Chitiet(id).ToPagedList(page, pagesize); return(View(dsLSP)); }