private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (textBox1.Text.Trim().Equals(""))
            {
                m = new MetodosCasting();
                m.VerCastings(dataGridView1);
                return;
            }
            else
            {
                String Cad = "%" + textBox1.Text + "%";

                if (comboBox1.SelectedIndex == 0)
                {
                    String     Query = "SELECT *FROM VistaCasting WHERE [Nombre] like '" + Cad + "'";
                    MetodosNav nav   = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox1.SelectedIndex == 1)
                {
                    String     Query = "SELECT *FROM VistaCasting WHERE [Costo] like '" + Cad + "'";
                    MetodosNav nav   = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
            }
        }
 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);
         }
     }
 }//
예제 #3
0
 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);
         }
     }
 }
예제 #4
0
        private void textBox2_KeyUp(object sender, KeyEventArgs e)
        {
            if (textBox2.Text.Trim().Equals(""))
            {
                MetodosCasting m = new MetodosCasting();
                m.MostrarAgentes(dataGridView1);
                return;
            }
            else
            {
                String Cad = "%"+textBox2.Text+"%";

                if (comboBox2.SelectedIndex == 0)
                {
                    String Query = "SELECT *FROM MostrarAgentes WHERE [# de Empleado] like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox2.SelectedIndex == 1)
                {
                    String Query = "SELECT *FROM MostrarAgentes WHERE [Cédula] like '" + Cad + "'";
                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);

                }
                else if (comboBox2.SelectedIndex == 2)
                {
                    String Query = "SELECT *FROM MostrarAgentes WHERE [Nombre] like '" + Cad + "'";
                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);

                }
                else if (comboBox2.SelectedIndex == 3)
                {
                    String Query = "SELECT *FROM MostrarAgentes WHERE [Apellido] like '" + Cad + "'";
                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox2.SelectedIndex == 4)
                {
                    String Query = "Select *From MostrarAgentes WHERE [Estado] like '" + Cad + "'";
                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
            }///
        }
예제 #5
0
        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (textBox1.Text.Trim().Equals(""))
            {
                MetodosNav nav = new MetodosNav();
                nav.ResultadosPrueba(Id, dataGridView1);
                return;
            }
            else
            {
                String Cad = "%" + textBox1.Text + "%";
                if (comboBox1.SelectedIndex == 0)
                {
                    String query = "Select prueba_candidato.estado as 'Estado de la prueba',fecha as 'Fecha de realización', nombre as 'Nombre', apellido as 'apellido',"
                                   + " dir as 'Dirección', tel as 'Teléfono', tipo as 'Tipo', fecha_nac as 'Fecha de nacimiento'  From Candidatos inner join prueba_candidato"
                                   + " on Candidatos.Pk_candidato= prueba_candidato.fk_cand"
                                   + " inner join Pruebas on Pruebas.Pk_prueba= prueba_candidato.fk_prueba"
                                   + " WHERE Pk_prueba=" + Id + " AND nombre like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(query, dataGridView1);
                }
                else if (comboBox1.SelectedIndex == 1)
                {
                    String query = "Select prueba_candidato.estado as 'Estado de la prueba',fecha as 'Fecha de realización', nombre as 'Nombre', apellido as 'apellido',"
                                   + " dir as 'Dirección', tel as 'Teléfono', tipo as 'Tipo', fecha_nac as 'Fecha de nacimiento'  From Candidatos inner join prueba_candidato"
                                   + " on Candidatos.Pk_candidato= prueba_candidato.fk_cand"
                                   + " inner join Pruebas on Pruebas.Pk_prueba= prueba_candidato.fk_prueba"
                                   + " WHERE Pk_prueba=" + Id + " AND apellido like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(query, dataGridView1);
                }
                else if (comboBox1.SelectedIndex == 2)
                {
                    String query = "Select prueba_candidato.estado as 'Estado de la prueba',fecha as 'Fecha de realización', nombre as 'Nombre', apellido as 'apellido',"
                                   + " dir as 'Dirección', tel as 'Teléfono', tipo as 'Tipo', fecha_nac as 'Fecha de nacimiento'  From Candidatos inner join prueba_candidato"
                                   + " on Candidatos.Pk_candidato= prueba_candidato.fk_cand"
                                   + " inner join Pruebas on Pruebas.Pk_prueba= prueba_candidato.fk_prueba"
                                   + " WHERE Pk_prueba=" + Id + " AND tipo like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(query, dataGridView1);
                }
            }
        }//
예제 #6
0
        private void textBox2_KeyUp(object sender, KeyEventArgs e)
        {
            if (textBox2.Text.Trim().Equals(""))
            {
                MetodosCasting m = new MetodosCasting();
                m.MostrarAgentes(dataGridView1);
                return;
            }
            else
            {
                String Cad = "%" + textBox2.Text + "%";

                if (comboBox2.SelectedIndex == 0)
                {
                    String Query = "SELECT *FROM MostrarAgentes WHERE [# de Empleado] like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox2.SelectedIndex == 1)
                {
                    String     Query = "SELECT *FROM MostrarAgentes WHERE [Cédula] like '" + Cad + "'";
                    MetodosNav nav   = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox2.SelectedIndex == 2)
                {
                    String     Query = "SELECT *FROM MostrarAgentes WHERE [Nombre] like '" + Cad + "'";
                    MetodosNav nav   = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox2.SelectedIndex == 3)
                {
                    String     Query = "SELECT *FROM MostrarAgentes WHERE [Apellido] like '" + Cad + "'";
                    MetodosNav nav   = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox2.SelectedIndex == 4)
                {
                    String     Query = "Select *From MostrarAgentes WHERE [Estado] like '" + Cad + "'";
                    MetodosNav nav   = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
            }///
        }
예제 #7
0
        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (textBox1.Text.Trim().Equals(""))
            {
              MetodosComunes  m = new MetodosComunes();
              m.MostrarCandidatos(dataGridView1);
                return;
            }
            else
            {
                String Cad = "%" + textBox1.Text + "%";
                if (comboBox1.SelectedIndex == 0)
                {
                   String query = "Select Pk_candidato as 'ID', nombre as 'Nombre', apellido as 'Apellido', tipo as 'Tipo', "
                   + "tel as 'Teléfono', dir as 'Dirección', fecha_nac as 'Fecha de nacimiento', Estado as 'Estado' FROM Candidatos"
                   + " WHERE nombre like '"+Cad+"'";

                   MetodosNav nav = new MetodosNav();
                   nav.Buscar(query, dataGridView1);
                }
                else if (comboBox1.SelectedIndex == 1)
                {
                   String query = "Select Pk_candidato as 'ID', nombre as 'Nombre', apellido as 'Apellido', tipo as 'Tipo', "
                   + "tel as 'Teléfono', dir as 'Dirección', fecha_nac as 'Fecha de nacimiento', Estado as 'Estado' FROM Candidatos"
                   + " WHERE apellido like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(query, dataGridView1);

                }
                else if (comboBox1.SelectedIndex == 2)
                {
                    String query = "Select Pk_candidato as 'ID', nombre as 'Nombre', apellido as 'Apellido', tipo as 'Tipo', "
                    + "tel as 'Teléfono', dir as 'Dirección', fecha_nac as 'Fecha de nacimiento', Estado as 'Estado' FROM Candidatos"
                    + " WHERE tipo like '" + Cad + "'";

                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(query, dataGridView1);

                }
            }
        }
예제 #8
0
        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (textBox1.Text.Trim().Equals(""))
            {
                m = new MetodosCasting();
                m.VerCastings(dataGridView1);
                return;
            }
            else
            {
                String Cad = "%"+textBox1.Text+"%";

                if (comboBox1.SelectedIndex == 0)
                {
                    String Query = "SELECT *FROM VistaCasting WHERE [Nombre] like '" +Cad+ "'";
                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }
                else if (comboBox1.SelectedIndex == 1)
                {
                    String Query = "SELECT *FROM VistaCasting WHERE [Costo] like '" +Cad+ "'";
                    MetodosNav nav = new MetodosNav();
                    nav.Buscar(Query, dataGridView1);
                }

            }
        }