111,097
社区成员




string sql = "select * from examtable";
List<string> whereList = new List<string>();
if (examdate_comboBox.Text != "") whereList.Add("examdate='" + examdate_comboBox.Text + "'");
if (group_comboBox.Text != "") whereList.Add("groupnum='" + group_comboBox.Text + "'");
if (cardid_textBox.Text != "") whereList.Add("cardid='" + cardid_textBox.Text + "' e");
if (whereList.Count > 0) sql += " where " + string.Join(" and ", whereList.ToArray());