public void FillTopicsDropDownList(object Sender, EventArgs e) { RCRLogic objLogic = new RCRLogic(); List<DropDownValue> lDropDownValues = new List<DropDownValue>(); int iSelectedCoreTopicsID = Convert.ToInt32(ddlCoreTopics.SelectedValue); lDropDownValues = objLogic.GetTopics(iSelectedCoreTopicsID); ddlTopics.DataSource = lDropDownValues; ddlTopics.DataTextField = "Name"; ddlTopics.DataValueField = "Id"; ddlTopics.DataBind(); ddlTopics.Enabled = true; lDropDownValues = null; objLogic = null; }
private void FillDropDownLists() { RCRLogic objLogic = new RCRLogic(); List<DropDownValue> lDropDownValues = new List<DropDownValue>(); lDropDownValues = objLogic.GetStates(); ddlStates.DataSource = lDropDownValues; ddlStates.DataTextField = "Name"; ddlStates.DataValueField = "Id"; ddlStates.DataBind(); lDropDownValues = objLogic.GetDegrees(); ddlDegrees.DataSource = lDropDownValues; ddlDegrees.DataTextField = "Name"; ddlDegrees.DataValueField = "Id"; ddlDegrees.DataBind(); ddlCA1Degrees.DataSource = lDropDownValues; ddlCA1Degrees.DataTextField = "Name"; ddlCA1Degrees.DataValueField = "Id"; ddlCA1Degrees.DataBind(); ddlCA2Degrees.DataSource = lDropDownValues; ddlCA2Degrees.DataTextField = "Name"; ddlCA2Degrees.DataValueField = "Id"; ddlCA2Degrees.DataBind(); lDropDownValues = objLogic.GetPrograms(); ddlAffiliation.DataSource = lDropDownValues; ddlAffiliation.DataTextField = "Name"; ddlAffiliation.DataValueField = "Id"; ddlAffiliation.DataBind(); ddlCA1Affiliation.DataSource = lDropDownValues; ddlCA1Affiliation.DataTextField = "Name"; ddlCA1Affiliation.DataValueField = "Id"; ddlCA1Affiliation.DataBind(); ddlCA2Affiliation.DataSource = lDropDownValues; ddlCA2Affiliation.DataTextField = "Name"; ddlCA2Affiliation.DataValueField = "Id"; ddlCA2Affiliation.DataBind(); lDropDownValues = objLogic.GetCoreTopics(); ddlCoreTopics.DataSource = lDropDownValues; ddlCoreTopics.DataTextField = "Name"; ddlCoreTopics.DataValueField = "Id"; ddlCoreTopics.DataBind(); lDropDownValues = null; objLogic = null; }