public ActionResult DeleteConfirmed(string id) { SeatLabel seatLabel = db.SeatLabels.Find(id); db.SeatLabels.Remove(seatLabel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "seatID,sgID,claID")] SeatLabel seatLabel) { if (ModelState.IsValid) { db.Entry(seatLabel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.claID = new SelectList(db.Classes, "claID", "claName", seatLabel.claID); ViewBag.sgID = new SelectList(db.SeatGroups, "sgID", "flightSize", seatLabel.sgID); return(View(seatLabel)); }
// GET: SeatLabels/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SeatLabel seatLabel = db.SeatLabels.Find(id); if (seatLabel == null) { return(HttpNotFound()); } return(View(seatLabel)); }
// GET: SeatLabels/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SeatLabel seatLabel = db.SeatLabels.Find(id); if (seatLabel == null) { return(HttpNotFound()); } ViewBag.claID = new SelectList(db.Classes, "claID", "claName", seatLabel.claID); ViewBag.sgID = new SelectList(db.SeatGroups, "sgID", "flightSize", seatLabel.sgID); return(View(seatLabel)); }