日期:2014-05-17 浏览次数:21002 次
private void btnSelect_Click(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.Clear();
string queryselect = "select * from jt where 1=1 ";
if (cb1.Checked)
{
queryselect += " and model = '" + cbbcategory.Text + " '";
}
if (cb2.Checked)
{
queryselect += " and modelnumber" + " like '%" + txtMN.Text + "%'";
}
if (cb3.Checked)
{
queryselect += " and problemdescribe" + " like '%" + cbbQC.Text + "%'";
}
if (cb4.Checked)
{
queryselect += " and author" + " like '%" + txtAuthor.Text + "%'";
}
if (cb7.Checked)
{
queryselect += " and data" + " like '%" + txtData.Text + "%'";