コード例 #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());
     }
 }
コード例 #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());
     }
 }
コード例 #3
0
 public ActionResult xoatam(string id)
 {
     // TODO: Add delete logic here
     LoaiSanPhamAdmin.DeleteDS(id);
     return(RedirectToAction("Index"));
 }
コード例 #4
0
 // GET: Admin/LoaiSanPhamAdmin/Edit/5
 public ActionResult Edit(string id)
 {
     return(View(LoaiSanPhamAdmin.Update(id)));
 }
コード例 #5
0
 // GET: Admin/LoaiSanPhamAdmin
 public ActionResult Index()
 {
     return(View(LoaiSanPhamAdmin.DS()));
 }
コード例 #6
0
 public ActionResult KhoiPhucTinhTrang(string id)
 {
     // TODO: Add delete logic here
     LoaiSanPhamAdmin.KhoiPhuc(id);
     return(RedirectToAction("Index"));
 }