public Anticipos() { InitializeComponent(); _sexoBL = new SexoBL(); listaSexosBindingSource.DataSource = _sexoBL.ObtenerSexos(); _trabajadores = new TrabajadoresBL(); listaTrabajadoresBindingSource.DataSource = _trabajadores.ListaTrabajadores; _cargosBL = new CargosBL(); listaCargosBindingSource.DataSource = _cargosBL.ObtenerCargos(); _jornadaBL = new JornadaBL(); listaJornadasBindingSource.DataSource = _jornadaBL.ObtenerJornadas(); _estadocivilBL = new EstadoCivilBL(); listaEstadoCivilesBindingSource.DataSource = _estadocivilBL.ObtenerEstadoCiviles(); _metodopagoBL = new MetodoPagoBL(); listaMetodoPagosBindingSource.DataSource = _metodopagoBL.ObtenerMetodoPagos(); _anticipoBL = new AnticiposBL(); listaAnticiposBindingSource.DataSource = _anticipoBL.ObtenerAnticipos(); }
public ReportedeAnticipo() { InitializeComponent(); var _anticipoBL = new AnticiposBL(); var _cargosBL = new CargosBL(); var _metodoPagoBL = new MetodoPagoBL(); var bindingSource = new BindingSource(); bindingSource.DataSource = _anticipoBL.ObtenerAnticipos(); var bindingSource3 = new BindingSource(); bindingSource3.DataSource = _cargosBL.ObtenerCargos(); var bindingSource4 = new BindingSource(); bindingSource4.DataSource = _metodoPagoBL.ObtenerMetodoPagos(); var reporte = new ReporteAnticipo(); reporte.Database.Tables["Anticipo"].SetDataSource(bindingSource); reporte.Database.Tables["Cargo"].SetDataSource(bindingSource3); reporte.Database.Tables["MetodoPago"].SetDataSource(bindingSource4); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }