private void btnActualizar_Click(object sender, EventArgs e) { if (cbPlan.SelectedIndex != -1) { MateriaLogic materialogic = new MateriaLogic(); int idPlan = int.Parse(cbPlan.SelectedValue.ToString()); dgvReporte.DataSource = materialogic.GetAllPlan(idPlan); } }
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); } }
protected void btnActualizar_Click(object sender, EventArgs e) { if (ddlPlan.SelectedValue != string.Empty) { MateriaLogic materialogic = new MateriaLogic(); int idPlan = int.Parse(ddlPlan.SelectedValue.ToString()); GridView1.DataSource = materialogic.GetAllPlan(idPlan); GridView1.DataBind(); } }
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; }
public Inscripcion(Persona alumno) { InitializeComponent(); AlumnoActual = alumno; InscripcionLogic = new InscripcionLogic(); CursoLogic = new CursoLogic(); ComisionLogic = new ComisionLogic(); MateriaLogic = new MateriaLogic(); cbMateria.DataSource = MateriaLogic.GetAllPlan(AlumnoActual.IdPlan); cbMateria.DisplayMember = "Descripcion"; cbMateria.ValueMember = "ID"; cbMateria.SelectedIndex = -1; cbComision.DisplayMember = "Descripcion"; cbComision.ValueMember = "ID"; }