Foxtable(狐表)用户栏目专家坐堂 → 自定义用户管理与可视化授权


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

主题:自定义用户管理与可视化授权

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


加好友 发短信
等级:四尾狐 帖子:810 积分:5250 威望:0 精华:0 注册:2009/2/6 10:38:00
自定义用户管理与可视化授权  发帖心情 Post By:2010/8/31 8:15: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 )
If User.Type = UserTypeEnum.User Then
    For Each dr As DataRow In DataTables("授权表").Select("分组名 = '" & User.Group & "'" )
        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

 

 

以上代码中

1、Tables("授权表").Visible = (User.Type <> UserTypeEnum.User )是什么意思?

2、当使用自定义用户管理时,以上代码要修改哪些地方?

请老大予以指点


 回到顶部