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