private void button2_Click(object sender, EventArgs e) { if (Add_City_Is_NumberOrNull()) { MessageBox.Show("城市名不能为空或者纯数字"); return; } if (grp1.Add_City(textBox3.Text.ToString())) { MessageBox.Show("数据添加成功"); } else { MessageBox.Show("已存在此城市"); } }
private void button2_Click(object sender, EventArgs e) { if (Add_City_Is_NumberOrNull()) { MessageBox.Show("城市名不能为空或者纯数字"); return; } if (grp1.Add_City(textBox3.Text.ToString())) { MessageBox.Show("数据添加成功"); } else { MessageBox.Show("已存在此城市"); } }