예제 #1
0
        public Vacaciones()
        {
            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();

            _vacacionesBL = new VacacionesBL();
            listaVacacionesBindingSource.DataSource = _vacacionesBL.ObtenerVacaciones();
        }
예제 #2
0
        public ReportedeVacaciones()
        {
            InitializeComponent();

            var _vacacionesBL = new VacacionesBL();
            //var _trabajadoresBL = new TrabajadoresBL();
            var _cargosBL   = new CargosBL();
            var _jornadaBL  = new JornadaBL();
            var _metodoPago = new MetodoPagoBL();

            var bindingSource = new BindingSource();

            bindingSource.DataSource = _vacacionesBL.ObtenerVacaciones();

            //var bindingSource2 = new BindingSource();
            //bindingSource2.DataSource = _trabajadoresBL.ObtenerTrabajador();

            var bindingSource3 = new BindingSource();

            bindingSource3.DataSource = _cargosBL.ObtenerCargos();

            var bindingSource4 = new BindingSource();

            bindingSource4.DataSource = _jornadaBL.ObtenerJornadas();

            var bindingSource5 = new BindingSource();

            bindingSource5.DataSource = _metodoPago.ObtenerMetodoPagos();

            var reporte = new ReporteVacaciones();

            reporte.Database.Tables["Vacacion"].SetDataSource(bindingSource);
            //reporte.Database.Tables["Trabajador"].SetDataSource(bindingSource2);
            reporte.Database.Tables["Cargo"].SetDataSource(bindingSource3);
            reporte.Database.Tables["Jornada"].SetDataSource(bindingSource4);
            reporte.Database.Tables["MetodoPago"].SetDataSource(bindingSource5);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }