예제 #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int parametro = 0;

            if (DropDownList1.SelectedItem.Text == "Nombre")
            {
                parametro = 1;
            }

            if (DropDownList1.SelectedItem.Text == "Apellido")
            {
                parametro = 2;
            }

            if (DropDownList1.SelectedItem.Text == "Cedula")
            {
                parametro = 3;
            }

            if (DropDownList1.SelectedItem.Text == "Codigo Departamento")
            {
                parametro = 4;
            }

            if (DropDownList1.SelectedItem.Text == "Extension")
            {
                parametro = 5;
            }

            if (DropDownList1.SelectedItem.Text == "Flota")
            {
                parametro = 6;
            }
            if (DropDownList1.SelectedItem.Text == "General")
            {
                parametro = 8;
            }
               DataTable dtTable = new DataTable();
               BSNLYR.bsnssEmployee emp = new BSNLYR.bsnssEmployee();
               dtTable = emp.ConsultarCliente(TextBox1.Text, parametro);
               GridView1.DataSource = dtTable;
               GridView1.DataBind();
        }