以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173291)

--  作者:Cloud
--  发布时间:2021/11/23 9:34:00
--  [求助]

求大神指点:

      下面的权限代码是打√的窗口名为隐藏窗口,如果要反过来打√的窗口为显示要怎么写代码

 

DataTables("授权表").loadfilter="[模块] <> \'日常管理\' and [隐藏] = 1 and [角色] = \'" & Tables("用户表").current("角色") & "\'and [用户名] = \'" & Tables("用户表").current("用户名") & "\'"
DataTables("授权表").load()
If Tables("授权表").Rows.count > 0 Then
    For Each r As Row In Tables("授权表").Rows \'遍历当前表中的列
        \'定义一个标准按钮,按钮的名称等于列名称.
        For Each c As WinForm.Control In e.Form.Controls
            If Typeof c Is WinForm.Button Then \'判断控件是否是文本框
                Dim t As WinForm.Button = c \'使用特定类型的变量引用控件
                If t.Text = r("窗口名")
                    t.Visible = False
                End If
            End If
        Next
    Next
End If

                                     谢谢


--  作者:狐狸爸爸
--  发布时间:2021/11/23 9:46:00
--  
参考:
--  作者:有点蓝
--  发布时间:2021/11/23 9:52:00
--  
[隐藏] = 1
改为
[隐藏] = 0