protected void bt_Add_PropertyInOrganizeCity_Click(object sender, EventArgs e) { if (ddl_PropertyInOrganizeCity.SelectedValue != "0" && (int)ViewState["ClientID"] != 0) { CM_ClientBLL bll = new CM_ClientBLL((int)ViewState["ClientID"]); if (bll.ClientInOrganizeCity_GetOrganizeCitys().FirstOrDefault(p => p.ID == int.Parse(ddl_PropertyInOrganizeCity.SelectedValue)) == null) { bll.ClientInOrganizeCity_Add(int.Parse(ddl_PropertyInOrganizeCity.SelectedValue)); BindGrid(); } else { MessageBox.Show(this, "请勿重复添加该区域!"); return; } } }