public ActionResult DeleteConfirmed(int id) { SATScore sATScore = db.SATScores.Find(id); db.SATScores.Remove(sATScore); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,RawValue,ScoreValue,TypeID")] SATScore sATScore) { if (ModelState.IsValid) { db.Entry(sATScore).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TypeID = new SelectList(db.SATTypes, "TypeID", "TypeName", sATScore.TypeID); return(View(sATScore)); }
// GET: ttn_content/Score/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SATScore sATScore = db.SATScores.Find(id); if (sATScore == null) { return(HttpNotFound()); } return(View(sATScore)); }
// GET: ttn_content/Score/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SATScore sATScore = db.SATScores.Find(id); if (sATScore == null) { return(HttpNotFound()); } ViewBag.TypeID = new SelectList(db.SATTypes, "TypeID", "TypeName", sATScore.TypeID); return(View(sATScore)); }