public ActionResult DeleteConfirmed(int id) { VeDangDat veDangDat = db.VeDangDat.Find(id); db.VeDangDat.Remove(veDangDat); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "mave,masuatchieu,makhachhang,giave,tinhtrang,giodat,maloaive,makm")] VeDangDat veDangDat) { if (ModelState.IsValid) { db.Entry(veDangDat).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(veDangDat)); }
public ActionResult Create([Bind(Include = "mave,masuatchieu,makhachhang,giave,tinhtrang,giodat,maloaive,makm")] VeDangDat veDangDat) { if (ModelState.IsValid) { db.VeDangDat.Add(veDangDat); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(veDangDat)); }
// GET: Admin/VeDangDats/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VeDangDat veDangDat = db.VeDangDat.Find(id); if (veDangDat == null) { return(HttpNotFound()); } return(View(veDangDat)); }