根据条件加载数据,无论前边是什么条件,都不加载已经离开的学生数据,中间红色的代码有问题,这个表达式应该如何写?
Dim filter As String
Dim sts() As String = {"学生编号","姓名","性别","年级","班级","团队","服务类型"}
For Each st As String In sts
Dim val As String = e.Form.Controls(st).value
If val > "" Then
val = val.Replace("*","[*]")
If filter = "" Then
filter = st & " like '%" & val & "%'"
Else
filter = filter & " and " & st & " like '%" & val & "%'"
End If
End If
Next
filter = filter & " And "学生状态 <> '离开'"
DataTables("学生信息").LoadFilter = filter
DataTables("学生信息").Load()