Beispiel #1
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            var buscar = txtBuscar.Text;

            if (string.IsNullOrEmpty(buscar) == true)
            {
                listaMedicosBindingSource.DataSource = _medicos.ObtenerMedicos();
            }
            else
            {
                listaMedicosBindingSource.DataSource = _medicos.ObtenerMedicos(buscar);
            }

            listaMedicosBindingSource.ResetBindings(false);
        }
Beispiel #2
0
        public FormReporteMedicos()
        {
            InitializeComponent();

            var _medicosBL     = new MedicosBL();
            var bindingSource1 = new BindingSource();

            bindingSource1.DataSource = _medicosBL.ObtenerMedicos();

            var _especialidadesBL = new EspecialidadesBL();
            var bindingSource2    = new BindingSource();

            bindingSource2.DataSource = _especialidadesBL.ObtenerEspecialidades();

            var _jornadasBL    = new JornadasBL();
            var bindingSource3 = new BindingSource();

            bindingSource3.DataSource = _jornadasBL.ObtenerJornadas();

            var reporte = new ReporteMedicos();

            reporte.Database.Tables["Medico"].SetDataSource(bindingSource1);
            reporte.Database.Tables["Especialidad"].SetDataSource(bindingSource2);
            reporte.Database.Tables["Jornada"].SetDataSource(bindingSource3);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Beispiel #3
0
        public FormReporteCitas()
        {
            InitializeComponent();

            var _citasBL       = new CitasBL();
            var bindingSource1 = new BindingSource();

            bindingSource1.DataSource = _citasBL.ObtenerCitas();

            var _pacientesBL   = new PacientesBL();
            var bindingSource2 = new BindingSource();

            bindingSource2.DataSource = _pacientesBL.ObtenerPacientes();

            var _medicosBL     = new MedicosBL();
            var bindingSource3 = new BindingSource();

            bindingSource3.DataSource = _medicosBL.ObtenerMedicos();

            var reporte = new ReportedeCitas();

            reporte.Database.Tables["Cita"].SetDataSource(bindingSource1);
            reporte.Database.Tables["Paciente"].SetDataSource(bindingSource2);
            reporte.Database.Tables["Medico"].SetDataSource(bindingSource3);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Beispiel #4
0
        public FormCitas()
        {
            InitializeComponent();

            _pacientesBL = new PacientesBL();
            listaPacientesBindingSource.DataSource = _pacientesBL.ObtenerPacientes();

            _medicosBL = new MedicosBL();
            listaMedicosBindingSource.DataSource = _medicosBL.ObtenerMedicos();

            _citasBL = new CitasBL();
            listaCitasBindingSource.DataSource = _citasBL.ObtenerCitas();
        }
Beispiel #5
0
        public FormMedicos()
        {
            InitializeComponent();

            _medicos = new MedicosBL();
            listaMedicosBindingSource.DataSource = _medicos.ObtenerMedicos();

            _especialidades = new EspecialidadesBL();
            listaEspecialidadesBindingSource.DataSource = _especialidades.ObtenerEspecialidades();

            _jornadas = new JornadasBL();
            listaJornadasBindingSource.DataSource = _jornadas.ObtenerJornadas();
        }