public ActionResult DeleteConfirmed(int id) { AVIONES aVIONES = db.AVIONES.Find(id); db.AVIONES.Remove(aVIONES); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "COD_AVION,NOM_AVION,MOD_AVION,CAP_AVION,AEROLINEA")] AVIONES aVIONES) { if (ModelState.IsValid) { db.Entry(aVIONES).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AEROLINEA = new SelectList(db.AEROLINEAS, "COD_AEROLINEA", "NOM_AEROLINEA", aVIONES.AEROLINEA); return(View(aVIONES)); }
// GET: AVIONES/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AVIONES aVIONES = db.AVIONES.Find(id); if (aVIONES == null) { return(HttpNotFound()); } return(View(aVIONES)); }
// GET: AVIONES/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AVIONES aVIONES = db.AVIONES.Find(id); if (aVIONES == null) { return(HttpNotFound()); } ViewBag.AEROLINEA = new SelectList(db.AEROLINEAS, "COD_AEROLINEA", "NOM_AEROLINEA", aVIONES.AEROLINEA); return(View(aVIONES)); }