Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OrderAssay orderAssay = db.OrderAssays.Find(id);

            db.OrderAssays.Remove(orderAssay);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        // 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));
        }
Exemplo n.º 4
0
        // 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));
        }