예제 #1
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     try
     {
         deshabilitar();
         limpiar();
         frmBuscaProfesionales frm = new frmBuscaProfesionales();
         frm.ShowDialog();
         Profesionales u = frm.u;
         if (u != null)
         {
             lblId.Text = Convert.ToString(u.Idprofesionales);
             txtProfesional.Text = u.Profesional;
             txtDocumento.Text = u.Documento;
             txtDomicilio.Text = u.Domicilio;
             txtTelefono.Text = u.Telefono;
             txtMail.Text = u.Mail;
             cmbTipoDoc.Text = u.Tipod.Detalle;
             cmbEspecialidades.SelectedValue = u.Idespecialidades;
             if (u.Activo == 0)
             {
                 chkActivo.Checked = false;
                 //tabPageCargaEmpleados.BackColor = Color.LightCoral;
             }
             else if (u.Activo == 1)
             {
                 chkActivo.Checked = true;
                 //tabPageCargaEmpleados.BackColor = SystemColors.Info;
             }
             if (u.Sinturnero == 0)
             {
                 checkBox1.Checked = false;
                 //tabPageCargaEmpleados.BackColor = Color.LightCoral;
             }
             else if (u.Sinturnero == 1)
             {
                 checkBox1.Checked = true;
                 //tabPageCargaEmpleados.BackColor = SystemColors.Info;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error: " + ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     try
     {
         frmBuscaProfesionales frm = new frmBuscaProfesionales();
         frm.ShowDialog();
         profesionales = frm.u;
         if (profesionales != null)
         {
             txtProfesional.Text = profesionales.Profesional;
         }
         dataGridView1.Rows.Clear();
         lista.Clear();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (u != null)
     {
         frmBuscaProfesionales frm = new frmBuscaProfesionales();
         frm.ShowDialog();
         Profesionales prof = frm.u;
         if (prof != null)
         {
             frmHonorariosProfesionales frm1 = new frmHonorariosProfesionales(prof.Idprofesionales.ToString(), u);
             frm1.ShowDialog();
         }
     }
 }