コード例 #1
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);
                }
            }
        }
コード例 #2
0
        private void ResultadosCandidatos_Load(object sender, EventArgs e)
        {
            MetodosNav nav = new MetodosNav();

            nav.ResultadosPrueba(Id, dataGridView1);
            comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox1.SelectedIndex = 0;
        }
コード例 #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 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);
         }
     }
 }
コード例 #5
0
        private void EditarCasting_Load(object sender, EventArgs e)
        {
            nombre.Enabled = false;
            desc.Enabled   = false;
            Coste.Enabled  = false;
            MetodosNav m = new MetodosNav();

            m.MostrarDetCasting(IdCasting, nombre, desc, Coste);
            desc.MaxLength   = 100;
            Coste.MaxLength  = 8;
            nombre.MaxLength = 30;
        }
コード例 #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 Actualizar_Click(object sender, EventArgs e)
        {
            MetodosNav m = new MetodosNav();
            if(nombre.Text.Length==0 || desc.Text.Length==0 || Coste.Text.Length==0){}else{

            if (m.ActualizarCasting(IdCasting, nombre.Text, desc.Text, Convert.ToDouble(Coste.Text)) == true)
            {
                this.Hide();

            }
            else if (m.ActualizarCasting(IdCasting, nombre.Text, desc.Text, Convert.ToDouble(Coste.Text)) == false)
            {
                return;

            }
            }
        }
コード例 #8
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);
                }
            }
        }//
コード例 #9
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);
                }
            }///
        }
コード例 #10
0
        private void Actualizar_Click(object sender, EventArgs e)
        {
            MetodosNav m = new MetodosNav();

            if (nombre.Text.Length == 0 || desc.Text.Length == 0 || Coste.Text.Length == 0)
            {
            }
            else
            {
                if (m.ActualizarCasting(IdCasting, nombre.Text, desc.Text, Convert.ToDouble(Coste.Text)) == true)
                {
                    this.Hide();
                }
                else if (m.ActualizarCasting(IdCasting, nombre.Text, desc.Text, Convert.ToDouble(Coste.Text)) == false)
                {
                    return;
                }
            }
        }
コード例 #11
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);

                }
            }
        }
コード例 #12
0
 private void EditarCasting_Load(object sender, EventArgs e)
 {
     nombre.Enabled = false;
     desc.Enabled = false;
     Coste.Enabled = false;
     MetodosNav m = new MetodosNav();
     m.MostrarDetCasting(IdCasting, nombre, desc, Coste);
     desc.MaxLength = 100;
     Coste.MaxLength = 8;
     nombre.MaxLength = 30;
 }
コード例 #13
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);
                }

            }
        }