Example #1
0
    void BindGeoCode(int city)
    {
        if (city > 0)
        {
            DropDownList ddl_GeoCode = (DropDownList)pl_detail.FindControl("CM_ClientManufactInfo_GeoCode");
            if (ddl_GeoCode != null)
            {
                ddl_GeoCode.DataValueField = "ID";
                ddl_GeoCode.DataTextField  = "Name";

                ddl_GeoCode.DataSource = CM_GeoCodeBLL.GetListByCityCode(CM_ClientBLL.GetORGCOD2ByCity(city));
                ddl_GeoCode.DataBind();
                ddl_GeoCode.Items.Insert(0, new ListItem("请选择...", "0"));
            }
        }
    }
Example #2
0
    void tr_OfficialCity_Selected(object sender, SelectedEventArgs e)
    {
        if (tr_OfficialCity == null)
        {
            return;
        }

        int city = 0;

        int.TryParse(tr_OfficialCity.SelectValue, out city);
        if (city > 0)
        {
            DropDownList ddl_GeoCode = (DropDownList)pl_detail.FindControl("CM_ClientManufactInfo_GeoCode");
            if (ddl_GeoCode != null)
            {
                ddl_GeoCode.DataValueField = "ID";
                ddl_GeoCode.DataTextField  = "Name";

                ddl_GeoCode.DataSource = CM_GeoCodeBLL.GetListByCityCode(CM_ClientBLL.GetORGCOD2ByCity(city));
                ddl_GeoCode.DataBind();
                ddl_GeoCode.Items.Insert(0, new ListItem("请选择...", "0"));
            }
        }
    }