Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
按列子改的可视化权限,不起作用是怎么回事呢
全局变量:
Public _UserGroup As String
AfterOpenProject:
For Each dr As DataRow In DataTables("权限表").Select("用户组 = '" & _UserGroup & "'" )
If dr.IsNull("列名") Then
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
t.Visible = Not dr("不可见")
t.AllowEdit = Not dr("不可编辑")
End If
Next
Else
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
For Each c As Col In t.Cols
If c.Name = dr("列名") Then
c.Visible = Not dr("不可见")
c.AllowEdit = Not dr("不可编辑")
End If
Next
End If
Next
End If
Next
检查一下关键的值:
Messagebox.show("_UserGroup = " & _UserGroup)
MessageBox.show("行数:" & DataTables("权限表").Select("用户组 = '" & _UserGroup & "'" ).Count)
For Each dr As DataRow In DataTables("权限表").Select("用户组 = '" & _UserGroup & "'" )
If dr.IsNull("列名") Then
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
t.Visible = Not dr("不可见")
t.AllowEdit = Not dr("不可编辑")
End If
Next
Else
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
For Each c As Col In t.Cols
If c.Name = dr("列名") Then
c.Visible = Not dr("不可见")
c.AllowEdit = Not dr("不可编辑")
End If
Next
End If
Next
End If
Next
那就是授权表没有进行相关设置。
如果实在搞不定,就做个简单例子发上来。