public ActionResult EditTest([Bind(Include = "TestID, LTNumber, SampleID, TestTypeID, EmployeeID, StatusID, WorkOrderID")] CompoundTests compoundTests)
 {
     if (ModelState.IsValid)
     {
         db.Entry(compoundTests).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("EditTest"));
     }
     return(View(compoundTests));
 }
        public ActionResult CompoundTestList(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            CompoundTests compoundTests = db.CompoundTests.Find(id);


            return(View(db.CompoundTests.SqlQuery("SELECT * FROM CompoundTests WHERE WorkOrderID = " + id).ToList()));
        }
        public ActionResult EditTest(int?id)
        {
            ViewBag.Status = db.Statuses.ToList();

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            CompoundTests compoundTests = db.CompoundTests.Find(id);

            if (compoundTests == null)
            {
                return(HttpNotFound());
            }
            return(View(compoundTests));
        }