public ActionResult DeleteConfirmed(int id) { OrderAssay orderAssay = db.OrderAssays.Find(id); db.OrderAssays.Remove(orderAssay); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "OrderAssayID,OrderID,AssayID,StartDateTime,EndDateTime,StatusID")] OrderAssay orderAssay) { if (ModelState.IsValid) { db.Entry(orderAssay).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AssayID = new SelectList(db.Assays, "AssayID", "AssayName", orderAssay.AssayID); ViewBag.OrderID = new SelectList(db.Orders, "OrderID", "OrderComments", orderAssay.OrderID); ViewBag.StatusID = new SelectList(db.Status, "StatusID", "StatusDesc", orderAssay.StatusID); return(View(orderAssay)); }
// GET: OrderAssays/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OrderAssay orderAssay = db.OrderAssays.Find(id); if (orderAssay == null) { return(HttpNotFound()); } return(View(orderAssay)); }
// GET: OrderAssays/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OrderAssay orderAssay = db.OrderAssays.Find(id); if (orderAssay == null) { return(HttpNotFound()); } ViewBag.AssayID = new SelectList(db.Assays, "AssayID", "AssayName", orderAssay.AssayID); ViewBag.OrderID = new SelectList(db.Orders, "OrderID", "OrderComments", orderAssay.OrderID); ViewBag.StatusID = new SelectList(db.Status, "StatusID", "StatusDesc", orderAssay.StatusID); return(View(orderAssay)); }