private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == Convert.ToChar(Keys.Enter)) { var buscar = textBox1.Text; vehiculoBindingSource.DataSource = _vehiculo.ObtenerVehiculos(buscar); } }
public FormVehiculos() { InitializeComponent(); _vehiculo = new VehiculoBL(); vehiculoBindingSource.DataSource = _vehiculo.ObtenerVehiculos(); _tipos = new TiposBL(); listaTipoBindingSource.DataSource = _tipos.ObtenerTipos(); }
protected void Page_Load(object sender, EventArgs e) { VehiculoBL vehiculo = new VehiculoBL(); TiendaDTO.Vehiculo ve = vehiculo.ObtenerVehiculo(1); lblIdentificador.Text = ve.Identificador.ToString(); lblPlaca.Text = ve.Placa; lblColor.Text = ve.Color; grvVehiculos.DataSource = vehiculo.ObtenerVehiculos(); grvVehiculos.DataBind(); }
public FormFactura() { InitializeComponent(); _facturaBL = new FacturaBL(); listaFacturasBindingSource.DataSource = _facturaBL.ObtenerFacturas(); _clientesBL = new ClientesBL(); listaClientesBindingSource.DataSource = _clientesBL.ObtenerClientes(); _vehiculosBL = new VehiculoBL(); listaVehiculoBindingSource.DataSource = _vehiculosBL.ObtenerVehiculos(); }
public FormReporteProductos() { InitializeComponent(); var _vehiculoBL = new VehiculoBL(); var bindingSource = new BindingSource(); bindingSource.DataSource = _vehiculoBL.ObtenerVehiculos(); var reporte = new ReporteVehiculo(); reporte.SetDataSource(bindingSource); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }