// GET: Admin/SanPhamAdmin/Create public ActionResult Create() { ViewBag.MaHang = new SelectList(NhaSanXuatBus.DanhSach(), "MaHang", "TenHang"); ViewBag.MaLoai = new SelectList(LoaiSanPhamBus.DanhSach(), "MaLoai", "TenLoai"); ViewBag.MaTinhTrang = new SelectList(TinhTrangSanPhamBus.DanhSach(), "MaTinhTrang", "TenTinhTrang"); return(View()); }
// GET: LoaiSanPham public ActionResult Index(int id, int?page) { int pageNumber = (page ?? 1); int itemsPerPage = 3; var DSSanPham = LoaiSanPhamBus.DanhSachChiTetPage(id, pageNumber, itemsPerPage); return(View(DSSanPham)); }
// GET: Admin/SanPhamAdmin/Edit/5 public ActionResult Edit(int id) { ViewBag.MaHang = new SelectList(NhaSanXuatBus.DanhSach(), "MaHang", "TenHang"); ViewBag.MaLoai = new SelectList(LoaiSanPhamBus.DanhSach(), "MaLoai", "TenLoai"); ViewBag.MaTinhTrang = new SelectList(TinhTrangSanPhamBus.DanhSach(), "MaTinhTrang", "TenTinhTrang"); var db = SanPhamBus.ChiTiet(id); return(View(db)); }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here LoaiSanPhamBus.Xoa(id); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(int id, LoaiSP lsp) { try { //TODO: Add update logic here LoaiSanPhamBus.Sua(id, lsp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(LoaiSP lsp) { try { // TODO: Add insert logic here LoaiSanPhamBus.Them(lsp); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: Menu public ActionResult Index() { return(View(LoaiSanPhamBus.DanhSach())); }
// GET: Admin/LoaiSanPhamAdmin/Delete/5 public ActionResult Delete(int id) { var db = LoaiSanPhamBus.ChiTiet(id); return(View(db)); }
// GET: Admin/LoaiSanPhamAdmin public ActionResult Index() { var db = LoaiSanPhamBus.DanhSach(); return(View(db)); }