private void buttonX1_Click(object sender, EventArgs e) { if (comboBox1.SelectedItem != null) { if (comboBox1.SelectedIndex == 0) { SqlHelper help = new SqlHelper(); DataTable dt = help.getDs("select * from Classes_Data", "Classes_Data").Tables[0]; frmClasses frm = new frmClasses(date, dt); frm.Show(); this.Close(); } else { // frmPlanSearch frm = new frmPlanSearch(date); // frm.Show(); // this.Close(); } } else { MessageBox.Show("请选择查找的数据表"); } }