예제 #1
0
        private void Paciente_Load(object sender, EventArgs e)
        {
            _obraSocialService = new ObraSocialService(DaoFactory.GetObraSocialDao());
            _pacienteService = new PacienteService(DaoFactory.GetPacienteDao());

            IList<ObraSocial> obraSociales = _obraSocialService.GetAll();
            foreach (ObraSocial os in obraSociales)
            {
                cmbObraSocial.Items.Add(os.RazonSocial);
            }
        }
예제 #2
0
        private void TestForm_Load(object sender, EventArgs e)
        {
            gridMain.AutoGenerateColumns = false;
            //Seteo estado del form al inicio
            Estado = EstadoForm.GRILLA;
            //Crear servicios de negocio
            _pacienteService = new PacienteService(base.DaoFactory.GetPacienteDao());
            _obraSocialService = new ObraSocialService(base.DaoFactory.GetObraSocialDao());
            //Cargar combo Obra Social
            cmbObraSocial.DataSource = _obraSocialService.GetAll();
            cmbObraSocial.ValueMember = "ID";
            cmbObraSocial.DisplayMember = "RazonSocial";
            //Cargar grilla asincronicamente
            backgroundWorker.RunWorkerAsync(Operacion.CARGAR_GRILLA);
            //medusaStatusBar.Loading = false;
            this.ModoEstatico();

            //TEST SEARCH CONTROL
            SearchItem item1 = new SearchItem();
            item1.DisplayMember = "Nombre";
            item1.ValueMember = "Nombre";
            SearchItem item2 = new SearchItem();
            item2.DisplayMember = "Apellido";
            item2.ValueMember = "Apellido";
            IList<SearchItem> listItems = new List<SearchItem>();
            listItems.Add(item1);
            listItems.Add(item2);

            searchControl1.Campos = listItems;
        }
 private void sentenciaYCarga(ObraSocial ob, DataGridView grilla, ObraSocialService obS, bool esAlta)
 {
     obS.altaObraSocial(ob, esAlta);
     cargarGrilla(grilla, obS.recuperarObraSocial());
 }