Foxtable(狐表)用户栏目专家坐堂 → 加了授权的代码,还是能看到内容


  共有1995人关注过本帖树形打印复制链接

主题:加了授权的代码,还是能看到内容

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106380 积分:541041 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/7/31 20:38:00 [显示全部帖子]

http://www.foxtable.com/webhelp/scr/1600.htm

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

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

 回到顶部