Dim nms As String() = {"考试名称","单位名称","年级代码","班级"} '指定生成目录树的各列
Dim qts As String() = {"'","'","'","'"} '指定将各列的值括起来的符号,这里都是字符型,所以都是单引号
Dim trv As WinForm.TreeView = e.Sender
Dim flt As String
Dim nd As WinForm.TreeNode
For Each nd In e.node.allNodes '清除子节点的选中标记
nd.Checked = False
Next
nd = e.Node.ParentNode
Do While nd IsNot Nothing '清除父节点的选中标记
nd.Checked = False
nd = nd.ParentNode
Loop
For Each nd In trv.AllNodes
If nd.Checked Then
Dim rts() As String = nd.FullPath.Split("\")
Dim val As String = ""
For i As Integer = 0 To rts.length - 1
If val > "" Then
val = val & " And "
End If
val = val & nms(i) & " = " & qts(i) & rts(i) & qts(i)
Next
If flt > "" Then
flt = flt & " Or (" & val & ")"
Else
flt = val
End If
End If
Next
Dim schoolName As String = user.group
DataTables("成绩").LoadFilter = Flt & schoolname
DataTables("成绩").Load()
老师,请问上面代码有问题怎么办
选择显示所有数据时是不加载任何数据不勾选时加载所有数据,我为了不加载其他他学校的,用用户分组限制出现新的错误,请指导.