public ActionResult Create(LoaiSanPham l) { try { // TODO: Add insert logic here l.TinhTrang = 0; LoaiSanPhamAdmin.Them(l); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(int id, LoaiSanPham lsp) { try { // TODO: Add update logic here lsp.Maloaisanpham = null; lsp.TinhTrang = 0; LoaiSanPhamAdmin.UpdateDS(lsp); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult xoatam(string id) { // TODO: Add delete logic here LoaiSanPhamAdmin.DeleteDS(id); return(RedirectToAction("Index")); }
// GET: Admin/LoaiSanPhamAdmin/Edit/5 public ActionResult Edit(string id) { return(View(LoaiSanPhamAdmin.Update(id))); }
// GET: Admin/LoaiSanPhamAdmin public ActionResult Index() { return(View(LoaiSanPhamAdmin.DS())); }
public ActionResult KhoiPhucTinhTrang(string id) { // TODO: Add delete logic here LoaiSanPhamAdmin.KhoiPhuc(id); return(RedirectToAction("Index")); }