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