Пример #1
0
 public ActionResult Edit([Bind(Include = "LugarViajeId,Descripcion,TipoLugar")] LugarViaje lugarViaje)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lugarViaje).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lugarViaje));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "BusId,Placa")] Bus bus)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bus).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bus));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "ClienteId,Dni,Nombres,Apellidos")] Cliente cliente)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cliente).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cliente));
 }
 public ActionResult Edit([Bind(Include = "EmpleadoId,Dni,Nombres,Apellidos,Area,Cargo")] Administrativo administrativo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(administrativo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(administrativo));
 }
 public ActionResult Edit([Bind(Include = "EmpleadoId,Dni,Nombres,Apellidos,BusId,TipoTripulacion")] Tripulacion tripulacion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tripulacion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BusId = new SelectList(db.Buses, "BusId", "Placa", tripulacion.BusId);
     return(View(tripulacion));
 }
Пример #6
0
 public void StateModified(object Entity)
 {
     _Context.Entry(Entity).State = System.Data.Entity.EntityState.Modified;
 }