做“目录树形式的授权”出现 这样的错误,afterload事件代码如下:
Dim trv1 As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim trv2 As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim cmd As New SQLCommand
cmd.C
trv1.BuildTree("授权","分组|权限")
For Each u As UserInfo In Users
If u.Type = UserTypeEnum.User Then
If trv2.Nodes.Contains(u.Group) = False Then
trv2.Nodes.Add(u.Group)
End If
trv2.Nodes(u.Group).Nodes.Add(u.Name)
End If
Next
Trv1.Nodes(0).Expand()
trv2.ExpandAll()
此主题相关图片如下:2800.jpg