var strSQL = new StringBuilder();
strSQL.Append(" SELET * FROM table_name WHERE 1=1 ");
if (strMedel != string.Empty)
{
strSQL.Append(" AND Model LIKE '%" + strMedel + "%' ");
}
if (strSerialNumber != string.Empty)
{
strSQL.Append(" AND Serial LIKE '%" + strSerialNumber + "%' ");
}
//use strSQL.ToString();