以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]自定义函数 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=171200) |
-- 作者:lgj716330 -- 发布时间:2021/8/21 17:34:00 -- [求助]自定义函数 定义了函数BBB Dim nd As WinForm.TreeNode =args(0) Select Case nd.name
Case nd.name For Each dr11 As DataRow In DataTables("授权表").DataRows If dr11.IsNull("角色") = False Then Dim nms() As String = dr11("角色").Split(",") For Each nm As String In nms If _UserRoles.contains(nm) Then Dim dr As DataRow dr = DataTables("授权表").Find("表名 = \'" & nd.Name & "\' and 角色 like \'%" & nm & "%\' And 不可见=1 And 列名 is null") If dr Is Nothing Then MainTable = Tables(nd.Name) Else MessageBox.Show("你无权查询此表!") End If Dim dr1 As DataRow dr1 = DataTables("授权表").Find("表名 = \'" & nd.Name & "\' and 角色 like \'%" & nm & "%\' And 不可见=1 And 列名 is not null") If dr1 IsNot Nothing Then RibbonTabs("hlcz").Groups("lcz").Items("UnHideColumn").Enabled=False ContextMenus("Column").Items("UnHide").Visible=False Else RibbonTabs("hlcz").Groups("lcz").Items("UnHideColumn").Enabled=True ContextMenus("Column").Items("UnHide").Visible=True End If End If Next End If Next End Select NodeMouseClick 调用函数的时候参数要怎么写 Functions.Execute("BBB") |
-- 作者:有点蓝 -- 发布时间:2021/8/21 17:37:00 -- Functions.Execute("BBB",e.node) |