Exemplo n.º 1
0
        /// <summary>
        /// to get the District Name from the database and bind it to the DropDownDistrict
        /// </summary>

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

            ddlDistrict.DataTextField  = "DistrictName";
            ddlDistrict.DataValueField = "DistrictID";
            ddlDistrict.DataSource     = objMasterBLL.LoadDistrictData();
            ddlDistrict.DataBind();

            // for contact person
            ddlCPDistrict.DataTextField  = "DistrictName";
            ddlCPDistrict.DataValueField = "DistrictID";
            ddlCPDistrict.DataSource     = objMasterBLL.LoadDistrictData();
            ddlCPDistrict.DataBind();
        }
Exemplo n.º 2
0
        /// <summary>
        /// To bind details to dropdownlist
        /// </summary>
        private void FillDistricts()
        {
            MasterBLL objMasterBLL = new MasterBLL();

            ddlDistrict.DataTextField  = "DistrictName";
            ddlDistrict.DataValueField = "DistrictID";
            ddlDistrict.DataSource     = objMasterBLL.LoadDistrictData();
            ddlDistrict.DataBind();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Bind Data to Drop Downs
        /// </summary>
        private void BindDropDownDistrict()
        {
            MasterBLL objMasterBLL = new MasterBLL();

            ddlDistrict.DataTextField  = "DistrictName";
            ddlDistrict.DataValueField = "DistrictID";
            ddlDistrict.DataSource     = objMasterBLL.LoadDistrictData();
            ddlDistrict.DataBind();
            ddlDistrict.Items.Insert(0, (new ListItem("--Select--", "0")));
            ddlDistrict.SelectedIndex = 0;
        }