Foxtable(狐表)用户栏目专家坐堂 → 视化授权


  共有5059人关注过本帖平板打印复制链接

主题:视化授权

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:105948 积分:538809 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/6/16 9:30:00 [只看该作者]

调试一下

For Each t As Table In Tables
    t.Visible = 
True
    t.AllowEdit = 
true
    For Each c As Col In t.Cols
        c.Visible = 
True
        c.AllowEdit = 
True
    Next

Next
Tables
("授权表").Visible = (User.Type <> UserTypeEnum.User )
msgbox(User.Type)
If User.Type = UserTypeEnum.User Then
msgbox("用户名 = '" & User.Name & "'")
    For Each dr As DataRow In DataTables("授权表").Select("用户名 = '" & User.Name & "'" )
        If dr.IsNull("列名"Then
msgbox("表名 = " & dr("表名") & ",不可见=" & dr("不可见") & ",不可编辑=" & dr("不可编辑"))
        
    Tables(dr("表名")).Visible = Not dr("不可见")
            Tables
(dr("表名")).AllowEdit = Not dr("不可编辑")

        Else
msgbox("表名 = " & dr("表名") & ",列名 = " dr("列名"& ",不可见=" & dr("不可见") & ",不可编辑=" & dr("不可编辑"))
            Tables(dr("表名")).Cols(dr("列名")).Visible = Not dr("不可见")
            Tables
(dr("表名")).Cols(dr("列名")).AllowEdit = Not dr("不可编辑")
        End
 
If
    Next
End
 
If

 回到顶部
总数 25 1 2 3 下一页