日期:2014-05-18 浏览次数:20891 次
string strsql = "select * from userinfo where 1=1"; if(!string.IsNullOrEmpty(txtUserName.Text.Trim())) strsql+= " and username='"+txtUserName.Text.Trim()+"'"; if(!string.IsNullOrEmpty(cmbAge.Text.Trim())) strsql+= " and age='"+cmbAge.Text.Trim()+"'"; if(!string.IsNullOrEmpty(datePickerBirthday.Text)) strsql+=" and Birthday ='"+datePickerBirthday.Text+"'";