Esempio n. 1
0
        private void CmbCarrera_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                Especialidad esp = (Especialidad)cmbCarrera.SelectedItem;

                PlanLogic plan = new PlanLogic();
                cmbPlan.DataSource    = plan.GetPlanesEsp(esp.ID);
                cmbPlan.DisplayMember = "Descripcion";
                cmbPlan.ValueMember   = "ID";
            }
            catch (Exception ex)
            {
                this.Notificar("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        public void CargaPlanes()
        {
            try
            {
                int EspId = int.Parse(ddlCarrera.SelectedValue.ToString());

                PlanLogic plan = new PlanLogic();
                ddlPlan.DataTextField  = "Descripcion";
                ddlPlan.DataValueField = "ID";
                ddlPlan.DataSource     = plan.GetPlanesEsp(EspId);
                ddlPlan.DataBind();
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('" + ex.Message + "')", true);
            }
        }
Esempio n. 3
0
        protected void ddlCarrera_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                ddlPlan.Enabled = true;
                ddlCarrera.Items.Remove("Seleccionar Carrera");
                ddlPlan.Items.Remove("Plan");
                int EspId = int.Parse(ddlCarrera.SelectedValue.ToString());

                PlanLogic plan = new PlanLogic();
                ddlPlan.DataTextField  = "Descripcion";
                ddlPlan.DataValueField = "ID";
                ddlPlan.DataSource     = plan.GetPlanesEsp(EspId);
                ddlPlan.DataBind();
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('" + ex.Message + "')", true);
            }
        }