private void buttonFuzzySearch_Click(object sender, EventArgs e) { if (textBoxSearch.Text.Equals("")) { MessageBox.Show("检索关键词为空"); return; } try { switch (comboBoxOption.SelectedIndex) { case 0: ShowSupplierData(SupplierDataAccess.SelectSupplierById(textBoxSearch.Text)); break; case 1: ShowSupplierData(SupplierDataAccess.SelectSupplierByVagueUsername(textBoxSearch.Text)); break; case 2: ShowSupplierData(SupplierDataAccess.SelectSupplierByVagueRealName(textBoxSearch.Text)); break; case 3: ShowSupplierData(SupplierDataAccess.SelectSupplierByVaguePhoneNumber(textBoxSearch.Text)); break; case 4: ShowSupplierData(SupplierDataAccess.SelectSupplierByVagueEmailAddress(textBoxSearch.Text)); break; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }