public ActionResult Edit(Contract contract) { contract.TotalCost = db.Services.Find(contract.ServiceId).Price *((contract.ContractFinishDate - contract.ContractStartDate).TotalDays + 1); db.Entry(contract).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Table")); }
public ActionResult Create([Bind(Include = "ReservacionID")] Reservacion reservacion) { if (ModelState.IsValid) { db.Reservacion.Add(reservacion); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(reservacion)); }
public ActionResult Create([Bind(Include = "AerolineaID,Nombre")] Aerolinea aerolinea) { if (ModelState.IsValid) { db.Aereolinea.Add(aerolinea); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aerolinea)); }
public ActionResult Create([Bind(Include = "PaisID,Nombre")] Pais pais) { if (ModelState.IsValid) { db.Pais.Add(pais); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pais)); }
public ActionResult Create([Bind(Include = "AvionID,Nombre")] Avion avion) { if (ModelState.IsValid) { db.Avion.Add(avion); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(avion)); }
public ActionResult Create([Bind(Include = "PuestoID,estado")] Puesto puesto) { if (ModelState.IsValid) { db.puesto.Add(puesto); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(puesto)); }
public ActionResult Create([Bind(Include = "VueloID,Nombre,HoraSalida,HoraLlegada,Destino,Fecha")] Vuelo vuelo) { if (ModelState.IsValid) { db.Vuelo.Add(vuelo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vuelo)); }
public ActionResult Edit(Administrator administrator) { db.Entry(administrator).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Table")); }
public ActionResult Edit(Service service) { db.Entry(service).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Table")); }
public ActionResult Edit(Base aerobase) { db.Entry(aerobase).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Table")); }
public ActionResult Edit(Aircraft aircraft) { db.Entry(aircraft).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Table")); }
public ActionResult Edit(Customer customer) { db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Table")); }