private void BindShi()
        {
            string sheng = ddlSheng.SelectedValue;

            if (sheng != "-1")
            {
                JArray ja = SHI_JSON.Value <JArray>(sheng); // .getJSONArray(sheng);
                ddlShi.DataSource = ja;
                ddlShi.DataBind();
            }

            ddlShi.Items.Insert(0, new ListItem("选择地区市", "-1"));
        }
Example #2
0
        /// <summary>
        /// 绑定市
        /// </summary>
        /// <param name="dpProvince"></param>
        /// <param name="dpCity"></param>
        public void DropCityBinder(ExtAspNet.DropDownList dpProvince, ExtAspNet.DropDownList dpCity)
        {
            dpCity.Items.Clear();
            string province = dpProvince.SelectedValue.ToString();

            if (province != "-1")
            {
                JArray city = SHI_JSON.Value <JArray>(province);
                dpCity.DataSource = city;
                dpCity.DataBind();
            }
            dpCity.Items.Insert(0, new ExtAspNet.ListItem("选择市", "-1"));
        }
Example #3
0
        private void BindShi()
        {
            string sheng = ddlSheng.SelectedValue;

            if (sheng != "-1")
            {
                JArray ja = SHI_JSON.Value <JArray>(sheng);
                ddlShi.DataSource = ja;
                ddlShi.DataBind();
            }

            ddlShi.Items.Insert(0, new ListItem("选择地区市", "-1"));
            ddlShi.SelectedValue = "-1";

            // 是否禁用
            ddlShi.Enabled = !(ddlShi.Items.Count == 1);
        }