以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  请教老师加载表代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=99409)

--  作者:wakai
--  发布时间:2017/4/19 0:37:00
--  请教老师加载表代码
要实现开发者加载全部表
其它组别只加载“主窗体”

现代码老不行
If e.User.Type = UserTypeEnum.Developer Then
    e.Cancel =False  \'\'只有开发者才加载
Else
    If DataTables.Contains("主窗体") = False Then \'
        DataTables.Load("主窗体") \'
    End If    
End If

--  作者:有点色
--  发布时间:2017/4/19 8:30:00
--  

改一下代码

 

If e.User.Type = UserTypeEnum.Developer Then
    e.Cancel =False  \'\'只有开发者才加载
Else
    If e.DataTableName <> "主窗体" Then
        e.cancel = true
    End If    
End If
[此贴子已经被作者于2017/4/19 8:30:21编辑过]