Select Case e.Node.Name
Case e.Node.Name
Dim dr1 As DataRow
Dim dr2 As DataRow
Dim dr3 As DataRow
For Each nm As String In User.Roles.Split(",")
dr1 = DataTables("授权表三").Find("表名 = \'" & e.Node.Name & "\' and 非受限角色 like \'%" & nm & "%\'")
dr2 = DataTables("授权表三").Find("表名 = \'" & e.Node.Name & "\' and 受限角色 like \'%" & nm & "%\' and 列内容 is not null")
dr3 = DataTables("授权表三").Find("表名 = \'" & e.Node.Name & "\' and 用户名列 = 1")
If dr1 IsNot Nothing And Tables.Contains(e.Node.Name) Then
DataTables(e.Node.Name).LoadFilter = ""
ElseIf dr1 Is Nothing And dr2 IsNot Nothing And Tables.Contains(e.Node.Name) Then
DataTables(e.Node.Name).LoadFilter = dr2("列名") & " In ( \'" & dr2("列内容").replace(",","\',\'") & "\')"
ElseIf dr1 Is Nothing And dr2 Is Nothing And dr3 IsNot Nothing And Tables.Contains(e.Node.Name) Then
DataTables(e.Node.Name).LoadFilter = dr3("列名") & " = \'" & User.Name & "\'"
End If
Next
If Tables.Contains(e.Node.Name) Then
DataTables(e.Node.Name).Load
End If
End Select