Example #1
0
 protected void ddlPlan_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlPlan.SelectedIndex != -1)
     {
         int idplan = int.Parse(ddlPlan.SelectedValue.ToString());
         ddlMateria.DataSource  = MateriaLogic.GetAllPlan(idplan);
         ddlComision.DataSource = ComisionLogic.GetAllPlan(idplan);
     }
 }
Example #2
0
 private void cbPlan_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cbPlan.SelectedIndex != -1)
     {
         Plan plan = (Plan)cbPlan.SelectedItem;
         cbMateria.DataSource  = MateriaLogic.GetAllPlan(plan.ID);
         cbComision.DataSource = ComisionLogic.GetAllPlan(plan.ID);
     }
     else
     {
         cbMateria.DataSource  = new List <Materia>();
         cbComision.DataSource = new List <Comision>();
     }
     cbMateria.SelectedIndex  = -1;
     cbComision.SelectedIndex = -1;
 }