public ActionResult DeleteConfirmed(short id) { Adm_Security_Clearance adm_Security_Clearance = db.Adm_Security_Clearances.Find(id); db.Adm_Security_Clearances.Remove(adm_Security_Clearance); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Security_Clearance,Security_Clearance_Abbreviation")] Adm_Security_Clearance adm_Security_Clearance) { if (ModelState.IsValid) { db.Entry(adm_Security_Clearance).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(adm_Security_Clearance)); }
// GET: Adm_Security_Clearance/Edit/5 public ActionResult Edit(short?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Adm_Security_Clearance adm_Security_Clearance = db.Adm_Security_Clearances.Find(id); if (adm_Security_Clearance == null) { return(HttpNotFound()); } return(View(adm_Security_Clearance)); }
public ActionResult Create([Bind(Include = "ID,Security_Clearance,Security_Clearance_Abbreviation")] Adm_Security_Clearance adm_Security_Clearance) { if (ModelState.IsValid) { db.Adm_Security_Clearances.Add(adm_Security_Clearance); try { db.SaveChanges(); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); } return(RedirectToAction("Index")); } return(View(adm_Security_Clearance)); }