public ActionResult DeleteConfirmed(int id) { dmLaiSuatTruyThu dmlaisuattruythu = db.dmLaiSuatTruyThu.Find(id); db.dmLaiSuatTruyThu.Remove(dmlaisuattruythu); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /dmLaiSuatTruyThu/Delete/5 public ActionResult Delete(int id = 0) { dmLaiSuatTruyThu dmlaisuattruythu = db.dmLaiSuatTruyThu.Find(id); if (dmlaisuattruythu == null) { return(HttpNotFound()); } return(View(dmlaisuattruythu)); }
public ActionResult Edit(dmLaiSuatTruyThu dmlaisuattruythu) { if (ModelState.IsValid) { db.Entry(dmlaisuattruythu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dmlaisuattruythu)); }
public ActionResult Create(dmLaiSuatTruyThu dmlaisuattruythu) { if (ModelState.IsValid) { db.dmLaiSuatTruyThu.Add(dmlaisuattruythu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dmlaisuattruythu)); }