Foxtable(狐表)用户栏目专家坐堂 → 关于用户、用户级、用户角色


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

主题:关于用户、用户级、用户角色

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


加好友 发短信
等级:四尾狐 帖子:932 积分:6531 威望:0 精华:0 注册:2014/6/25 10:48:00
关于用户、用户级、用户角色  发帖心情 Post By:2020/4/24 15:21:00 [显示全部帖子]

  老师,下面代码我是把原来的用户组改为用户角色,然后提示错误:编译错误,未声名:UserIsRoleEnum,错误代码:Tables("sqb").Visible = (User.Type <> UserIsRoleEnum.User ),关于用户角色的使用,总是用不好,下面的代码该怎么改修呢?请老师指导,谢谢!!
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("sqb").Visible = (User.Type <> UserIsRoleEnum.User )
If User.Type = UserIsRoleEnum.User Then
    For Each dr As DataRow In DataTables("sqb").Select("用户角色 = '" & User.IsRole & "'" )
        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

[此贴子已经被作者于2020/4/24 15:21:40编辑过]

 回到顶部