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


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

主题:[求助]列授权

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


加好友 发短信
等级:七尾狐 帖子:1710 积分:11410 威望:0 精华:0 注册:2015/6/22 8:11:00
[求助]列授权  发帖心情 Post By:2017/12/18 22:21: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
    Return
End If
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
                For Each c As Col In t.Cols
                    If c.Name = dr("列名") Then
                        c.Visible = Not dr("不可见")
                        c.AllowEdit = Not dr("不可编辑")
                    End If
                Next
            End If
        Next
    End If
Next

 


图片点击可在新窗口打开查看此主题相关图片如下:图像 13.png
图片点击可在新窗口打开查看


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


加好友 发短信
等级:七尾狐 帖子:1710 积分:11410 威望:0 精华:0 注册:2015/6/22 8:11:00
  发帖心情 Post By:2017/12/19 20:45:00 [显示全部帖子]

谢谢老师

 回到顶部