Beispiel #1
0
        /// <summary>
        /// To get the data from the database and bind it to the dropdown ddloptionGroup
        /// </summary>

        private void BindOptionGroups()
        {
            MasterBLL objMasterBLL = new MasterBLL();

            ddloptionGroup.DataTextField  = "OptionGroupName";
            ddloptionGroup.DataValueField = "OptionGroupID";
            ddloptionGroup.DataSource     = objMasterBLL.LoadOptionGroupData();
            ddloptionGroup.DataBind();
            ListItem firstListItem = new ListItem("--Select--", "0");

            ddloptionGroup.Items.Insert(0, firstListItem);
        }
Beispiel #2
0
        private void LoadddlOptionGrp()
        {
            OptionGroupParametersBLL optGrpOBJ = new OptionGroupParametersBLL();

            ListItem firstListItem = new ListItem(ddloptionGroup.Items[0].Text, ddloptionGroup.Items[0].Value);

            ddloptionGroup.Items.Clear();
            MasterBLL objMasterBLL = new MasterBLL();

            ddloptionGroup.DataTextField  = "OptionGroupName";
            ddloptionGroup.DataValueField = "OptionGroupID";
            ddloptionGroup.DataSource     = objMasterBLL.LoadOptionGroupData();
            ddloptionGroup.DataBind();

            ddloptionGroup.Items.Insert(0, firstListItem);
        }