public ActionResult DeleteConfirmed(int id) { STIREsult sTIREsult = db.STIREsults.Find(id); db.STIREsults.Remove(sTIREsult); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,STI,Result,PersonID,Deleted,ResultsDate")] STIREsult sTIREsult) { if (ModelState.IsValid) { db.Entry(sTIREsult).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PersonID = new SelectList(db.People, "ID", "Name", sTIREsult.PersonID); return(View(sTIREsult)); }
public ActionResult Create(STIREsult sTIREsult) { if (ModelState.IsValid) { db.STIREsults.Add(sTIREsult); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PersonID = new SelectList(db.People, "ID", "Name", sTIREsult.PersonID); return(View(sTIREsult)); }
// GET: STIREsults/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } STIREsult sTIREsult = db.STIREsults.Find(id); if (sTIREsult == null) { return(HttpNotFound()); } return(View(sTIREsult)); }
// GET: STIREsults/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } STIREsult sTIREsult = db.STIREsults.Find(id); if (sTIREsult == null) { return(HttpNotFound()); } ViewBag.PersonID = new SelectList(db.People, "ID", "Name", sTIREsult.PersonID); return(View(sTIREsult)); }