Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Assay_Test assay_Test = db.Assay_Test.Find(id);

            db.Assay_Test.Remove(assay_Test);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        // GET: Assay_Test/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Assay_Test assay_Test = db.Assay_Test.Find(id);

            if (assay_Test == null)
            {
                return(HttpNotFound());
            }
            return(View(assay_Test));
        }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "assayTestId,assayTestDate,assayTestCost,assayTestHours,basePrice,comments,assayId,testId,compoundSampleId,testResultId")] Assay_Test assay_Test)
 {
     if (ModelState.IsValid)
     {
         db.Entry(assay_Test).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.assayId          = new SelectList(db.Assay, "assayId", "assayId", assay_Test.assayId);
     ViewBag.compoundSampleId = new SelectList(db.Compund_Sample, "compoundSampleId", "receivedBy", assay_Test.compoundSampleId);
     ViewBag.testId           = new SelectList(db.Test, "testId", "testName", assay_Test.testId);
     ViewBag.testResultId     = new SelectList(db.Test_Result, "testResultId", "testResultId", assay_Test.testResultId);
     return(View(assay_Test));
 }
Ejemplo n.º 4
0
        // GET: Assay_Test/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Assay_Test assay_Test = db.Assay_Test.Find(id);

            if (assay_Test == null)
            {
                return(HttpNotFound());
            }
            ViewBag.assayId          = new SelectList(db.Assay, "assayId", "assayId", assay_Test.assayId);
            ViewBag.compoundSampleId = new SelectList(db.Compund_Sample, "compoundSampleId", "receivedBy", assay_Test.compoundSampleId);
            ViewBag.testId           = new SelectList(db.Test, "testId", "testName", assay_Test.testId);
            ViewBag.testResultId     = new SelectList(db.Test_Result, "testResultId", "testResultId", assay_Test.testResultId);
            return(View(assay_Test));
        }
Ejemplo n.º 5
0
        public ActionResult Create([Bind(Include = "assayTestId,assayTestDate,assayTestCost,assayTestHours,basePrice,comments,testId,compoundSampleId,testResultId")] Assay_Test assay_Test)
        {
            if (ModelState.IsValid)
            {
                int oid1 = Convert.ToInt32(TempData["oid"]);

                ViewBag.id         = TempData["id"];
                assay_Test.assayId = ViewBag.id;



                db.Assay_Test.Add(assay_Test);
                db.SaveChanges();
                return(RedirectToAction("ReceiveOrderFrom", "Lab", new { id = oid1 }));
            }

            ViewBag.assayId          = new SelectList(db.Assay, "assayId", "assayId", assay_Test.assayId);
            ViewBag.compoundSampleId = new SelectList(db.Compund_Sample, "compoundSampleId", "receivedBy", assay_Test.compoundSampleId);
            ViewBag.testId           = new SelectList(db.Test, "testId", "testName", assay_Test.testId);
            ViewBag.testResultId     = new SelectList(db.Test_Result, "testResultId", "testResultId", assay_Test.testResultId);
            return(View(assay_Test));
        }