【求助】怎么实现多选组合框里面的值,全部都能够被有效使用呢?
想实现自定义用户登录后 多选组合框里的值能够被拆分成一个个的值 且都能够实现
根据菜单权限表中的数据来显示当前登录用户许可看见或使用的菜单项目内容
下面的代码是该怎么修正呢?
For i As Integer = 0 To ribbontabs.count - 1
RibbonTabs(i).Visible = False
For j As Integer = 0 To RibbonTabs(i).Groups .count - 1
RibbonTabs(i).Groups (j).Visible = False
Next
Next
For Each dr As DataRow In DataTables("菜单权限表").Select("用户名 = '" & _username & "' and 菜单名 is not null" )
If dr.IsNull("分组名") Then
RibbonTabs(dr("菜单名")).Visible = dr("可见")
If dr("可见") = True Then
For j As Integer = 0 To RibbonTabs(dr("菜单名")).Groups .count - 1
RibbonTabs(dr("菜单名")).Groups (j).Visible = True
Next
End If
RibbonTabs(dr("菜单名")).Enabled = dr("可用")
ElseIf dr.IsNull("按钮名") Then
RibbonTabs(dr("菜单名")).Visible = dr("可见")
RibbonTabs(dr("菜单名")).Groups(dr("分组名")).Visible = dr("可见")
RibbonTabs(dr("菜单名")).Groups(dr("分组名")).Enabled = dr("可用")
Else
RibbonTabs(dr("菜单名")).Visible = dr("可见")
RibbonTabs(dr("菜单名")).Groups(dr("分组名")).Visible = dr("可见")
RibbonTabs(dr("菜单名")).Groups(dr("分组名")).Items(dr("按钮名")).Visible = dr("可见")
RibbonTabs(dr("菜单名")).Groups(dr("分组名")).Items(dr("按钮名")).Enabled = dr("可用")
End If
Next
[此贴子已经被作者于2018/1/8 0:19:43编辑过]