public ActionResult DeleteHangSX(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HangSanXuatModel spm = new HangSanXuatModel(); if (spm.FindById(id) == null) { return(HttpNotFound()); } spm.DeleteHangSX(id); return(TimHangSX(null, null)); }
public ActionResult EditHangSX(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HangSanXuatModel lm = new HangSanXuatModel(); HangSanXuat sp = lm.FindById(id); if (sp == null) { return(HttpNotFound()); } return(View(sp)); }
public ActionResult MultibleDel(List <string> lstdel) { if (lstdel == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } foreach (var item in lstdel) { HangSanXuatModel spm = new HangSanXuatModel(); if (spm.FindById(item) == null) { return(HttpNotFound()); } spm.DeleteHangSX(item); } return(TimHangSX(null, null)); }