Foxtable(狐表)用户栏目专家坐堂 → 角色问题


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

主题:角色问题

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/22 20:42:00 [显示全部帖子]

If User.IsRole("录入员") Then
    Tables("收入").Visible=False
    Tables("支出").Visible=False
    Tables("当月二保").Visible=False
    Tables("发送内容").Visible=False
    Tables("应收款").Visible=False
    Tables("账务查询").Visible=False
    Tables("账务支出").Visible=False
    Tables("北斗续费").Visible=False
    Tables("月度查询").Visible=False
    Tables("已付款").Visible=False
    Tables("转籍档案").Visible=False
    Tables("日志").Visible=False
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/22 21:01:00 [显示全部帖子]

For Each t As Table In Tables
    t.Visible = False
Next

If User.IsRole("录入员") Then
    Tables("收入").Visible = True
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/22 21:30:00 [显示全部帖子]

For Each t As Table In Tables
    t.Visible = False
Next

If User.IsRole("录入员") Then

    If User.Name = "张三" Then
        Tables("收入").Visible = True

    Else If User.Name = "李四" Then

        Tables("支出").Visible = True

    End If
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/22 21:38:00 [显示全部帖子]

用逗号分隔表的名字

 

For Each t As Table In Tables
    t.Visible = False
Next

If User.IsRole("录入员") Then
    For Each tn As String In user.tag.split(",")
        Tables(tn).Visible = True
    Next
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/22 21:45:00 [显示全部帖子]

 代码写到LoadUserSetting事件

 回到顶部