Exemple #1
0
 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
 {
     TareaDropDownList.DataSource     = Tareas.Listar(" IdTarea, Descripcion ", "1=1");
     TareaDropDownList.DataValueField = "IdTarea";
     TareaDropDownList.DataTextField  = "Descripcion";
     TareaDropDownList.DataBind();
 }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         consultatareasGridView.DataSource = Tareas.Listar("*", "1=1");
         consultatareasGridView.DataBind();
     }
 }
Exemple #3
0
 protected void buscarButton_Click(object sender, EventArgs e)
 {
     if (buscarDropDownList.SelectedIndex == 0)
     {
         consultatareasGridView.DataSource = Tareas.Listar("*", "CodigoTarea like '" + buscarTextBox.Text + "%'");
         consultatareasGridView.DataBind();
     }
     if (buscarDropDownList.SelectedIndex == 1)
     {
         consultatareasGridView.DataSource = Tareas.Listar("*", "Descripcion  like '" + buscarTextBox.Text + "%'");
         consultatareasGridView.DataBind();
     }
 }