此主题相关图片如下:qq截图20180524193226.jpg
问题如标题。
在主菜单的系统事件的Load事件
Dim zc As String=Nothing
If _username="超级用户" Then
zc="" 'Else
Dim js() As String=_userrule.split(",")
For Each x As String In js
If zc=Nothing Then
zc="角色名称='" & x & "'"
Else
zc=zc & " Or 角色名称='" & x & "'"
End If
Next
End If
Dim r As DataRow
Dim rt As RibbonMenu.Tab
Dim rt1 As RibbonMenu.Tab
'---------------------------------------------------------
For Each a1 As RibbonMenu.Tab In RibbonTabs
For Each a2 As RibbonMenu.group In a1.Groups
For Each a3 As RibbonMenu.RibbonItem In a2.Items ' ToolBars
'If a3.name.Contains("退出")=True Or a3.name.Contains("标准按钮")=True Then Continue For
If zc="" Then
r=DataTables("角色").sqlfind("功能区='" & a1.name & "' And 菜单分类='" & a2.name & "' And 模块名称='" & a3.name & "'")
Else
r=DataTables("角色").sqlfind("功能区='" & a1.name & "' And 菜单分类='" & a2.name & "' And 模块名称='" & a3.name & "' And " & zc)
End If
If r Is Nothing Then
a3.Visible=False
End If
Next
' If a2.Items.Count =0 Then a2.Visible =False
'''
Next
Next