Exemple #1
0
 public ActionResult Create(LoaiSanPham l)
 {
     try
     {
         // TODO: Add insert logic here
         l.TinhTrang = 0;
         LoaiSanPhamAdmin.Them(l);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemple #2
0
 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());
     }
 }
Exemple #3
0
 public ActionResult xoatam(string id)
 {
     // TODO: Add delete logic here
     LoaiSanPhamAdmin.DeleteDS(id);
     return(RedirectToAction("Index"));
 }
Exemple #4
0
 // GET: Admin/LoaiSanPhamAdmin/Edit/5
 public ActionResult Edit(string id)
 {
     return(View(LoaiSanPhamAdmin.Update(id)));
 }
Exemple #5
0
 // GET: Admin/LoaiSanPhamAdmin
 public ActionResult Index()
 {
     return(View(LoaiSanPhamAdmin.DS()));
 }
Exemple #6
0
 public ActionResult KhoiPhucTinhTrang(string id)
 {
     // TODO: Add delete logic here
     LoaiSanPhamAdmin.KhoiPhuc(id);
     return(RedirectToAction("Index"));
 }