public ActionResult DeleteConfirmed(int id) { ArrivalTimeTable arrivalTimeTable = db.ArrivalTimeTables.Find(id); db.ArrivalTimeTables.Remove(arrivalTimeTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,AirID,FlightNo,CityID,StatusID,ArrivalTime,TerminalID")] ArrivalTimeTable arrivalTimeTable) { if (ModelState.IsValid) { db.Entry(arrivalTimeTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AirID = new SelectList(db.Airlines_Arrivals, "AirID", "Airline", arrivalTimeTable.AirID); ViewBag.CityID = new SelectList(db.Cities_Arrivals, "CityID", "City", arrivalTimeTable.CityID); ViewBag.StatusID = new SelectList(db.Status_Arrivals, "StatusID", "Status", arrivalTimeTable.StatusID); ViewBag.TerminalID = new SelectList(db.Terminal_Arrivals, "TerminalID", "Terminals", arrivalTimeTable.TerminalID); return(View(arrivalTimeTable)); }
// GET: ArrivalTimeTables/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ArrivalTimeTable arrivalTimeTable = db.ArrivalTimeTables.Find(id); if (arrivalTimeTable == null) { return(HttpNotFound()); } return(View(arrivalTimeTable)); }
// GET: ArrivalTimeTables/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ArrivalTimeTable arrivalTimeTable = db.ArrivalTimeTables.Find(id); if (arrivalTimeTable == null) { return(HttpNotFound()); } ViewBag.AirID = new SelectList(db.Airlines_Arrivals, "AirID", "Airline", arrivalTimeTable.AirID); ViewBag.CityID = new SelectList(db.Cities_Arrivals, "CityID", "City", arrivalTimeTable.CityID); ViewBag.StatusID = new SelectList(db.Status_Arrivals, "StatusID", "Status", arrivalTimeTable.StatusID); ViewBag.TerminalID = new SelectList(db.Terminal_Arrivals, "TerminalID", "Terminals", arrivalTimeTable.TerminalID); return(View(arrivalTimeTable)); }