コード例 #1
0
        /// <summary>
        /// Looks for new regions bind.
        /// </summary>
        /// <param name="country">The country.</param>
        private void LookForNewRegionsBind(string country)
        {
            var dt = StaticDataHelper.Region(country);

            // The first row is empty
            if (dt.Any())
            {
                this.Region.DataSource     = dt;
                this.Region.DataValueField = "Value";
                this.Region.DataTextField  = "Name";
                this.RegionTr.Visible      = true;
            }
            else
            {
                this.Region.DataSource = null;
                this.Region.DataBind();
                this.RegionTr.Visible = false;
                this.RegionTr.DataBind();
            }
        }