private void btn_buscar_profesional_Click(object sender, EventArgs e)
 {
     using (BuscarProfesionales buscarProfesional = new BuscarProfesionales())
     {
         if (buscarProfesional.ShowDialog().Equals(DialogResult.OK))
         {
             this.profesional          = buscarProfesional.ProfesionalReturn;
             this.txt_profesional.Text = this.profesional.Apellido + ", " + this.profesional.Nombre;
         }
     }
 }
 private void btn_buscar_profesional_Click(object sender, EventArgs e)
 {
     using (BuscarProfesionales buscarProfesional = new BuscarProfesionales())
     {
         if (buscarProfesional.ShowDialog().Equals(DialogResult.OK))
         {
             this.profesional             = buscarProfesional.ProfesionalReturn;
             this.lbl_DocProfesional.Text = profesional.NroDoc.ToString();
             this.pan_regRes.Visible      = true;
             this.btn_seleccionar.Visible = true;
         }
     }
 }
Example #3
0
 private void btn_buscar_profesional_Click(object sender, EventArgs e)
 {
     using (BuscarProfesionales buscarProfesional = new BuscarProfesionales())
     {
         if (buscarProfesional.ShowDialog().Equals(DialogResult.OK))
         {
             this.profesional          = buscarProfesional.ProfesionalReturn;
             this.txt_profesional.Text = this.profesional.Apellido + ", " + this.profesional.Nombre;
             StringBuilder sqlEspecialidadesProfesional = new StringBuilder(ConfigurationManager.AppSettings["query.obtener.especialidades.profesional.select"]);
             sqlEspecialidadesProfesional.Append(" WHERE");
             sqlEspecialidadesProfesional.Append(ConfigurationManager.AppSettings["query.obtener.profesionales.where.nro.doc"].Replace("{2}", this.profesional.NroDoc.ToString()));
             this.cmb_especialidades.Items.Clear();
             ManipulacionComponentes.llenarComboBox(this.cmb_especialidades, sqlEspecialidadesProfesional.ToString(), "Especialidad");
             this.cmb_especialidades.DropDownWidth = ManipulacionComponentes.obtenerDropDownMaxWidthCombo(this.cmb_especialidades);
             this.cmb_especialidades.Visible       = true;
             this.lbl_especialidades.Visible       = true;
         }
     }
 }
Example #4
0
 private void btn_buscar_profesional_Click(object sender, EventArgs e)
 {
     using (BuscarProfesionales buscarProfesional = new BuscarProfesionales())
     {
         if (buscarProfesional.ShowDialog().Equals(DialogResult.OK))
         {
             try
             {
                 //inicializarCampos
                 this.lbl_error_profesional.Visible = false;
                 this.dgv_turnos_disponibles.Rows.Clear();
                 this.profesional          = buscarProfesional.ProfesionalReturn;
                 this.txt_profesional.Text = this.profesional.Apellido + ", " + this.profesional.Nombre;
                 //Ajustamos el ancho del Text de profesional
                 int anchoTextoPx = TextRenderer.MeasureText(this.txt_profesional.Text, this.txt_profesional.Font).Width;
                 if (anchoTextoPx > this.txt_profesional.Width)
                 {
                     this.txt_profesional.Width = anchoTextoPx;
                 }
                 //Obtenemos las especialidades del profesional seleccionado para cargar el Combo correspondiente
                 StringBuilder sqlEspecialidadesProfesional = new StringBuilder(ConfigurationManager.AppSettings["query.obtener.especialidades.profesional.select"]);
                 sqlEspecialidadesProfesional.Append(" WHERE");
                 sqlEspecialidadesProfesional.Append(ConfigurationManager.AppSettings["query.obtener.profesionales.where.nro.doc"].Replace("{2}", this.profesional.NroDoc.ToString()));
                 this.cmb_especialidad.Items.Clear();
                 ManipulacionComponentes.llenarComboBox(this.cmb_especialidad, sqlEspecialidadesProfesional.ToString(), "Especialidad");
                 this.cmb_especialidad.DropDownWidth = ManipulacionComponentes.obtenerDropDownMaxWidthCombo(this.cmb_especialidad);
                 this.especialidades = obtenerEspecialidadesProfesional(this.profesional.NroDoc, sqlEspecialidadesProfesional.ToString());
             }
             catch (Exception ex)
             {
                 Console.WriteLine(ex.ToString());
                 MessageBox.Show("Se produjo un error al consultar las especialidades del profesional: " + this.txt_profesional.Text, "Error en el login", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 return;
             }
         }
     }
 }