public ActionResult DeleteConfirmed(int id) { Test_Result test_Result = db.Test_Results.Find(id); db.Test_Results.Remove(test_Result); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "testResultID,orderID,testID,dataReportID")] Test_Result test_Result) { if (ModelState.IsValid) { db.Entry(test_Result).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.dataReportID = new SelectList(db.Data_Reports, "dataReportID", "rawData", test_Result.dataReportID); ViewBag.orderID = new SelectList(db.Orders, "orderID", "comment", test_Result.orderID); ViewBag.testID = new SelectList(db.Tests, "testID", "testName", test_Result.testID); return(View(test_Result)); }
public ActionResult PastTestDetails(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Test_Result test_Result = db.Test_Results.Find(id); if (test_Result == null) { return(HttpNotFound()); } return(View(test_Result)); }
// GET: Test_Result/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Test_Result test_Result = db.Test_Results.Find(id); if (test_Result == null) { return(HttpNotFound()); } ViewBag.dataReportID = new SelectList(db.Data_Reports, "dataReportID", "rawData", test_Result.dataReportID); ViewBag.orderID = new SelectList(db.Orders, "orderID", "comment", test_Result.orderID); ViewBag.testID = new SelectList(db.Tests, "testID", "testName", test_Result.testID); return(View(test_Result)); }