private void textBox1_KeyUp(object sender, KeyEventArgs e)
 {
     if (textBox1.Text.Trim().Equals(""))
     {
         MetodosPerfiles m = new MetodosPerfiles();
         m.MostrarPerfiles(dataGridView1);
         return;
     }
     else
     {
         String Cad = "%" + textBox1.Text + "%";
         if (comboBox1.SelectedIndex == 0)
         {
             String query = " Select *From Candidatos_Perfiles WHERE [Nombre] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
         else if (comboBox1.SelectedIndex == 1)
         {
             String query = "Select *From Candidatos_Perfiles WHERE [Apellido] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
         else if (comboBox1.SelectedIndex == 2)
         {
             String query = "Select *From Candidatos_Perfiles WHERE [Tipo] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
         else if (comboBox1.SelectedIndex == 3)
         {
             String query = "Select *From Candidatos_Perfiles WHERE [Sexo] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
         else if (comboBox1.SelectedIndex == 4)
         {
             String query = "Select *From Candidatos_Perfiles WHERE [Procedencia] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
         else if (comboBox1.SelectedIndex == 5)
         {
             String query = "Select *From Candidatos_Perfiles WHERE [Color del pelo] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
         else if (comboBox1.SelectedIndex == 6)
         {
             String query = "Select *From Candidatos_Perfiles WHERE [Color de los ojos] like '" + Cad + "'";
             MetodosNav nav = new MetodosNav();
             nav.Buscar(query, dataGridView1);
         }
     }
 }
 private void DetallesPerfil_Load(object sender, EventArgs e)
 {
     MetodosPerfiles m = new MetodosPerfiles();
     m.DetallesPerfiles(IdCandidato, txnombre, txapellido, txtipo, txtFechaNac, txdir, maskedTextBox1, mtxCed, txproced, txSexo, espc, txCpe, txCdo, pictureBox1);
 }
 private void VerPerfiles_Load(object sender, EventArgs e)
 {
     MetodosPerfiles met = new MetodosPerfiles();
     met.MostrarPerfiles(dataGridView1);
 }