Foxtable(狐表)用户栏目专家坐堂 → [求助]列授权


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

主题:[求助]列授权

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


加好友 发短信
等级:超级版主 帖子:112364 积分:572076 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/12/18 22:34:00 [显示全部帖子]

For Each dr As DataRow In DataTables("授权表").Select("(',' + Name + ',' like '%," & User.Name & ",%' or ',' + Config + ',' like '%," & User.group & ",%')")
    If dr.IsNull("列名") Then
        For Each t As Table In Tables
            If t.DataTable.Name = dr("表名") Then
                t.Visible = Not dr("不可见")
                t.AllowEdit = Not dr("不可编辑")
            End If
        Next
    Else
        For Each t As Table In Tables
            If t.DataTable.Name = dr("表名") Then
                Dim cls() As String = dr("列名").split(",")
                For Each c As String In cls
                    If t.Cols.Contains(c) Then
                        t.Cols(c).Visible = Not dr("不可见")
                        t.Cols(c).AllowEdit = Not dr("不可编辑")
                    End If
                Next
            End If
        Next
    End If
Next

 回到顶部