我在窗口的加载树代码如下,想实现不同用户登录后进行分页加载,每页10行,怎么实现不了,请老师指教。
Dim Filter As String = "1=1"
Dim dr = e.node.FullPath.split("\") '获取生成此节点的行
If e.Node.Text <> "显示所有行" Then
Select Case e.Node.Level
Case 0
Filter = "[项目名称] = '" & dr(0) & "'"
Case 1
Filter = "[项目名称] = '" & dr(0) & "' And [县] = '" & dr(1) & "'"
Case 2
Filter = "[项目名称] = '" & dr(0) & "' And [县] = '" & dr(1) & "' And [乡] = '" & dr(2) & "'"
Case 3
Filter = "[项目名称] = '" & dr(0) & "' And [县] = '" & dr(1) & "' And [乡] = '" & dr(2) & "' And [村] = '" & dr(3) & "'"
Case 4
Filter = "[项目名称] = '" & dr(0) & "' And [县] = '" & dr(1) & "' And [乡] = '" & dr(2) & "' And [村] = '" & dr(3) & "' And [屯] = '" & dr(4) & "'"
Case 5
Filter = "[项目名称] = '" & dr(0) & "' And [县] = '" & dr(1) & "' And [乡] = '" & dr(2) & "' And [村] = '" & dr(3) & "' And [屯] = '" & dr(4) & "'And [组] = '" & dr(5) & "'"
End Select
End If
DataTables("S征地记录").save
If User.Name = "开发者" Or User.Name = "管理员" Then
DataTables("S征地记录").LoadFilter = filter
DataTables("S征地记录").loadfilter = ""
DataTables("S征地记录").LoadOrder="协议书编号 Desc"
DataTables("S征地记录").LoadTop=10
DataTables("S征地记录").Load
Else
DataTables("S征地记录").loadfilter = "(乡 = '" & User.Name & "' or 县 = '" & User.Name & "' or 项目名称 = '" & User.Name & "') and " & Filter
DataTables("S征地记录").loadfilter = ""
DataTables("S征地记录").LoadOrder="协议书编号 Desc"
DataTables("S征地记录").LoadTop=10
DataTables("S征地记录").Load
End If
'Tables("S征地记录").filter = filter