Esempio n. 1
0
 public ActionResult Promeni([Bind(Include = "SpotId,NeighID,StatusP,ArriveT,Note")] Parking p)
 {
     if (ModelState.IsValid)
     {
         db.Entry(p).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View());
 }
 public ActionResult Edit([Bind(Include = "idPersonas,Nombre,Correo,Direccion,Rol,Activo,CodSexo")] personas personas)
 {
     if (ModelState.IsValid)
     {
         db.Entry(personas).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Rol     = new SelectList(db.roles, "IdRol", "DescripcionRol", personas.Rol);
     ViewBag.CodSexo = new SelectList(db.sexo, "idSexo", "Sexo1", personas.CodSexo);
     return(View(personas));
 }
 public ActionResult Edit([Bind(Include = "idTipoVehiculo,Descripcion,Tarifa,TarifaPeriodica")] tipovehiculo tipovehiculo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tipovehiculo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TarifaPeriodica = new SelectList(db.taifaperiodica, "idTaifaPeriodica", "Descripcion", tipovehiculo.TarifaPeriodica);
     ViewBag.Tarifa          = new SelectList(db.tarifasminuto, "idTarifasMin", "Descripcion", tipovehiculo.Tarifa);
     return(View(tipovehiculo));
 }
Esempio n. 4
0
 public ActionResult Edit([Bind(Include = "NumeroFactura,IdVehiculo,IdPersona,Fecha_enrtada,Fecha_salida,DetalleObservaciones,Bahia,FacturaPermanente")] facturacion facturacion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(facturacion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Bahia      = new SelectList(db.bahias, "idBahias", "idBahias", facturacion.Bahia);
     ViewBag.IdVehiculo = new SelectList(db.vehiculos, "idVehiculos", "Placa", facturacion.IdVehiculo);
     ViewBag.IdPersona  = new SelectList(db.personas, "idPersonas", "Nombre", facturacion.IdPersona);
     return(View(facturacion));
 }
Esempio n. 5
0
        public async Task <ActionResult> Edit([Bind(Include = "idVehiculos,Placa,Color,Modelo,Marca,TipoVehiculo")] vehiculos vehiculos)
        {
            if (ModelState.IsValid)
            {
                db.Entry(vehiculos).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.Color        = new SelectList(db.colorvehiculo, "idColorVehiculo", "ColorVehiculo1", vehiculos.Color);
            ViewBag.Marca        = new SelectList(db.marcasvehiculo, "idMarcasVehiculo", "MarcasVehiculo1", vehiculos.Marca);
            ViewBag.TipoVehiculo = new SelectList(db.tipovehiculo, "idTipoVehiculo", "Descripcion", vehiculos.TipoVehiculo);
            return(View(vehiculos));
        }