老师,
这个帖子:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=67353&authorid=0&page=2&star=1
昨天回去测试,有两个问题,不知道怎么改。
第一个 角色的目录树,切换经理与新角色,权限的目录树的选定状态与datetable(“权限管理”)的“角色”列的数据不一致,应该是角色的目录树的下列代码不对,求老师在给看下:
Vars("Tree") = False
For Each nd2 As WinForm.TreeNode In tr2.AllNodes
For Each dr As DataRow In DataTables("权限管理").DataRows
If nd2.Text = dr("功能主模块") And dr("角色").Contains(nd1.Text) Then
nd2.Checked = True
End If
If nd2.Text =dr("一级模块") And dr("角色").Contains(nd1.Text) Then
nd2.Checked = True
nd2.ParentNode.Checked = True
End If
If nd2.Text = dr("二级模块") And dr("角色").Contains(nd1.Text) Then
nd2.Checked = True
nd2.ParentNode.Checked = True
nd2.ParentNode.ParentNode.Checked = True
End If
If nd2.Text = dr("权限") And dr("角色").Contains(nd1.Text) Then
nd2.ParentNode.Checked = True
nd2.ParentNode.ParentNode.Checked = True
nd2.ParentNode.ParentNode.ParentNode.Checked = True
End If
Next
Next
Vars("Tree") = True