bwhere = True End If
If chkFStudentName.Value = 1 And txtFStudentName.Text <> "" Then If bwhere Then wherestr = wherestr + " and "
wherestr = wherestr + " studentname like '%" & txtFStudentName & "%'" bwhere = True End If
If chkFStudentClass.Value = 1 And txtFStudentClass.Text <> "" Then If bwhere Then wherestr = wherestr + " and "
wherestr = wherestr + " class like '%" & txtFStudentClass & "%'" bwhere = True End If
If chkFStudentGender.Value = 1 Then
If bwhere Then wherestr = wherestr + " and " If cmbFStuGender.ListIndex = 0 Then
wherestr = wherestr + " gender like '%" & "男" & "%'" ElseIf cmbFStuGender.ListIndex = 1 Then
wherestr = wherestr + " gender like '%" & "女" & "%'" End If
bwhere = True End If
If chkFAcceptanceTime.Value = 1 And txtFYear.Text <> "" Then If txtFMon.Text = "" Then txtFMon.Text = "00" If bwhere Then wherestr = wherestr + " and " If optnFore.Value Then
wherestr = wherestr + " acceptancetime<'" & txtFYear + "-" + txtFMon & "'" Else
wherestr = wherestr + " acceptancetime>'" & txtFYear + "-" + txtFMon & "'" End If
bwhere = True End If
If chkFHometown.Value = 1 And txtFHometown.Text <> "" Then If bwhere Then wherestr = wherestr + " and "
wherestr = wherestr + " hometown like '%" & txtFHometown & "%'" bwhere = True End If
If bwhere Then sqlstr = sqlstr + " where " + wherestr
sqlstr = sqlstr + " order by Studentid asc"
http://www.77cn.com.cnmands("cmdFindStudent").CommandText = sqlstr '刷新Grid,这两句不可省 DataE.conLibrary.Close
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库学生信息管理系统VB课程设计(11)在线全文阅读。
相关推荐: