コード例 #1
0
 private void Update()
 {
     using (var db = new RentaCarContext())
     {
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
コード例 #2
0
ファイル: NCF.cs プロジェクト: abatista667/RentaCar
 public void Modificar()
 {
     using (var db = new RentaCarContext())
     {
         db.NCF.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
コード例 #3
0
ファイル: Cotizacion.cs プロジェクト: abatista667/RentaCar
 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();
     }
 }
コード例 #4
0
ファイル: Sucursal.cs プロジェクト: abatista667/RentaCar
 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();
     }
 }
コード例 #5
0
ファイル: Cliente.cs プロジェクト: abatista667/RentaCar
 public void Update()
 {
     using (RentaCarContext db = new RentaCarContext())
     {
         db.Clientes.Attach(this);
         db.Entry(this).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
コード例 #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();
     }
 }
コード例 #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();
        }
コード例 #8
0
ファイル: Alquiler.cs プロジェクト: abatista667/RentaCar
        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();
            }
        }
コード例 #9
0
ファイル: Vehiculo.cs プロジェクト: abatista667/RentaCar
 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();
     }
 }