public ActionResult DeleteConfirmed(int id) { Ref_Contract_LCAT ref_Contract_LCAT = db.Ref_Contract_LCATs.Find(id); db.Ref_Contract_LCATs.Remove(ref_Contract_LCAT); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Contract_ID,Vehicle_LCAT_ID,ESF_LCAT,Description,Years_of_Experience_with_Degree")] Ref_Contract_LCAT ref_Contract_LCAT) { if (ModelState.IsValid) { db.Entry(ref_Contract_LCAT).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Contract_ID = new SelectList(db.Contracts, "ID", "Created_By", ref_Contract_LCAT.Contract_ID); ViewBag.Vehicle_LCAT_ID = new SelectList(db.Ref_Contract_Vehicle_LCATs, "ID", "LCAT", ref_Contract_LCAT.Vehicle_LCAT_ID); return(View(ref_Contract_LCAT)); }
// GET: Ref_Contract_LCAT/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Ref_Contract_LCAT ref_Contract_LCAT = db.Ref_Contract_LCATs.Find(id); if (ref_Contract_LCAT == null) { return(HttpNotFound()); } return(View(ref_Contract_LCAT)); }
// GET: Ref_Contract_LCAT/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Ref_Contract_LCAT ref_Contract_LCAT = db.Ref_Contract_LCATs.Find(id); if (ref_Contract_LCAT == null) { return(HttpNotFound()); } ViewBag.Contract_ID = new SelectList(db.Contracts, "ID", "Created_By", ref_Contract_LCAT.Contract_ID); ViewBag.Vehicle_LCAT_ID = new SelectList(db.Ref_Contract_Vehicle_LCATs, "ID", "LCAT", ref_Contract_LCAT.Vehicle_LCAT_ID); return(View(ref_Contract_LCAT)); }