Ejemplo n.º 1
0
 private void Update()
 {
     using (var db = new RentaCarContext())
     {
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void Modificar()
 {
     using (var db = new RentaCarContext())
     {
         db.NCF.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public void Update()
 {
     this.Vehiculo = null;
     this.cliente = null;
     using (RentaCarContext db = new RentaCarContext())
     {
         db.Cotizaciones.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public void Update()
 {
     this.Provincia = null;
     this.Municipio =null;
     using (var db = new RentaCarContext())
     {
         db.Sucursales.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 5
0
 public void Update()
 {
     using (RentaCarContext db = new RentaCarContext())
     {
         db.Clientes.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 6
0
 public void Update()
 {
     this.Vehiculo = null;
     this.Alquiler = null;
     using (RentaCarContext db = new RentaCarContext())
     {
         db.AlquilerDetalle.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 7
0
        public void Reemplazar()
        {
            this.Vehiculo = null;
            this.Alquiler = null;
            this.Estado = AlquilerDetalle.EstadoReemplazado;
            using (RentaCarContext db = new RentaCarContext())
            {
                db.AlquilerDetalle.Attach(this);
                db.Entry(this).State = System.Data.Entity.EntityState.Modified;
                db.SaveChanges();
            }

            var v = RentaCarNewBll.Vehiculo.GetOne(this.IdVehiculo);
            v.IdEstado = EstadosVehiculo.DISPONIBLE;
            v.Estado = null;
            v.Update();
        }
Ejemplo n.º 8
0
        public void Update()
        {
            this.cliente = null;
            this.SucursalApertura = null;
            this.SucursalCierre = null;
            this.TipoPago = null;
            this.Estado = null;
            this.TipoFacturacion = null;
            this.UsuarioApertura = null;
            this.UsuarioCierre = null;
            this.AlquilerDetalle = null;

            using (RentaCarContext db = new RentaCarContext())
            {
                db.Alquileres.Attach(this);
                db.Entry(this).State = System.Data.Entity.EntityState.Modified;
                db.SaveChanges();
            }
        }
Ejemplo n.º 9
0
 public void Update()
 {
     this.Estado = null;
     this.Sucursal = null;
     using (RentaCarContext db = new RentaCarContext())
     {
         db.Vehiculos.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }