public ActionResult DeleteConfirmed(int id) { LibTestBlood libTestBlood = db.LibTest.Find(id); db.LibTest.Remove(libTestBlood); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered")] LibTestBlood libTestBlood) { if (ModelState.IsValid) { db.Entry(libTestBlood).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(libTestBlood)); }
public ActionResult Create([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered")] LibTestBlood libTestBlood) { if (ModelState.IsValid) { db.LibTest.Add(libTestBlood); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(libTestBlood)); }
// GET: LibTestBloods/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LibTestBlood libTestBlood = db.LibTest.Find(id); if (libTestBlood == null) { return(HttpNotFound()); } return(View(libTestBlood)); }