请教下各位大师,设计的权限出现错误,麻烦帮看下,开发密码888,其它123.
For Each t As Table In Tables
t.Visible = False
t.AllowEdit = False
For
Each c As Col In t.Cols
c.Visible = False
c.AllowEdit = False
Next
Next
Dim roles As String = "'" &
_UserGroup.Replace(",", "','") & "'"
Dim drs As List(Of DataRow) = DataTables("权限").Select("角色名 in (" &
roles & ")")
For Each dr As DataRow In drs
If
dr.IsNull("列名") Then
If
Tables(dr("表名")).Visible = False Then
Tables(dr("表名")).Visible = dr("可见")
End If
If
Tables(dr("表名")).AllowEdit = False Then
Tables(dr("表名")).AllowEdit =
dr("可编辑")
End If
Else
If
Tables(dr("表名")).Cols(dr("列名")).Visible = False Then
Tables(dr("表名")).Cols(dr("列名")).Visible =
dr("可见")
End If
If
Tables(dr("表名")).Cols(dr("列名")).AllowEdit = False Then
Tables(dr("表名")).Cols(dr("列名")).AllowEdit = dr("可编辑")
End If
End If
Next