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


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

主题:视化授权

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


加好友 发短信
等级:一尾狐 帖子:421 积分:2705 威望:0 精华:0 注册:2022/3/25 7:44:00
视化授权  发帖心情 Post By:2022/6/16 9:23:00 [只看该作者]

图片点击可在新窗口打开查看

我在项目事件LoadUserSetting中设置加下代码怎么切换用户进去权限不起作用,老师帮我看看,是那不对

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


从新打开就出现下面弹出图片点击可在新窗口打开查看图片点击可在新窗口打开查看图片点击可在新窗口打开查看

[此贴子已经被作者于2022/6/16 9:40:47编辑过]

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