private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (CmbProvince.SelectedIndex == “辽宁”) { CmbCity.Items.Clear(); CmbCity.Items.Add(“沈阳”); CmbCity.Items.Add(“大连”); CmbCity.Items.Add(“葫芦岛”); CmbCity.Items.Add(“锦州”); } if(CmbProvince.SelectedIndex == “山西”) { CmbCity.Items.Clear(); CmbCity.Items.Add(“太原”); CmbCity.Items.Add(“大同”); CmbCity.Items.Add(“阳泉”); CmbCity.Items.Add(“晋城”); } if (CmbProvince.SelectedIndex == “浙江”) { CmbCity.Items.Clear(); CmbCity.Items.Add(“杭州”); CmbCity.Items.Add(“宁波”); CmbCity.Items.Add(“温州”); CmbCity.Items.Add(“嘉兴”); } } private void button1_Click(object sender, EventArgs e) { label4.Text = “籍贯:” + CmbProvince.Text + “省”+ comboBox2.Text + “市”; MessageBox.Show(“查询成功”); }
相关文章
- 02-092020-11-29
- 02-092020-11-29
- 02-092020-11-29
- 02-092020-11-29
- 02-092020-11-29
- 02-092020-11-29 epoll函数的基本使用过程
- 02-092020-11-29
- 02-092020-11-29
- 02-092020-11-29
- 02-092020-11-29