Foxtable(狐表)用户栏目专家坐堂 → 权限管理错误


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

主题:权限管理错误

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


加好友 发短信
等级:婴狐 帖子:50 积分:377 威望:0 精华:0 注册:2013/4/11 10:40:00
权限管理错误  发帖心情 Post By:2013/4/27 13:36:00 [只看该作者]

我用这个权限小例http://www.foxtable.com/bbs/dispbbs.asp?boardid=5&Id=23959&page=2

导入到我自己做的系统里面

可是在项目属性那afteropenproject这里放入




For Each t As Table In Tables
    t.Visible = False
    For Each c As col In t.Cols
        c.Visible = False
        c.AllowEdit = False
    Next
Next

Forms("登录窗口").Show()

Dim roles() As String = _userGroup.Split(",")

For Each role As String In roles
    Dim drs As List(Of DataRow) = DataTables("权限").Select("可见 = '" & role & "' or 可见 like '" & role & ",*' or 可见 like '*," & role & ",*' Or 可见 like '*," & role & "'")
    For Each dr As DataRow In drs
        If dr.Isnull("表名") AndAlso dr.Isnull("列名") Then
            For Each t As Table In Tables
                t.Visible = True
            Next
        Else If dr.isnull("列名") Then
            Tables(dr("表名")).Visible = True
            For Each c As col In Tables(dr("表名")).Cols
                c.Visible = True
            Next
        Else
            Tables(dr("表名")).Visible = True
            For Each c As col In Tables(dr("表名")).Cols
                If dr("列名") = c.name OrElse dr("列名") Like c.name & ",*" OrElse dr("列名") Like "*," & c.name & ",*" OrElse dr("列名") Like "*," & c.name Then
                    c.Visible = True
                End If
            Next
        End If
    Next

    drs = DataTables("权限").Select("可编辑 = '" & role & "' or 可编辑 like '" & role & ",*' or 可编辑 like '*," & role & ",*' Or 可编辑 like '*," & role & "'")
    For Each dr As DataRow In drs
        If dr.Isnull("表名") AndAlso dr.Isnull("列名") Then
            For Each t As Table In Tables
                t.Visible = True
                t.AllowEdit = True
            Next
        Else If dr.isnull("列名") Then
            Tables(dr("表名")).Visible = True
            For Each c As col In Tables(dr("表名")).Cols
                c.Visible = True
                c.AllowEdit = True
            Next
        Else
            Tables(dr("表名")).Visible = True
            For Each c As col In Tables(dr("表名")).Cols
                If dr("列名") = c.name OrElse dr("列名") Like c.name & ",*" OrElse dr("列名") Like "*," & c.name & ",*" OrElse dr("列名") Like "*," & c.name Then
                    c.Visible = True
                    c.AllowEdit = True
                End If
            Next
        End If
    Next
Next



却提示错误代码:Dim roles() As String = _userGroup.Split(",")


不然我放入代码  怎么回事啊?

 回到顶部