以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  选择性加载数据  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=159555)

--  作者:deliangzhaoe
--  发布时间:2020/12/30 11:27:00
--  选择性加载数据
表A有:企业名称、服务状态列

想要系统在打开后,其他所有的表只加载企业名称包含在表A企业名称列中,且表A中服务状态=true的行,afteropenproject怎么写代码?

--  作者:有点蓝
--  发布时间:2020/12/30 11:42:00
--  
Dim s As String  = DataTables("表A").GetComboListString("企业名称","服务状态=true")

For Each dt As DataTable In DataTables
dt.LoadFilter = "[企业名称] in (\'" s.replace("|","\',\'") & "\')"
dt.Load
Next

--  作者:deliangzhaoe
--  发布时间:2020/12/30 16:03:00
--  
谢谢,已增加


\'除超级管理员,所有表只加载正在服务的企业的行
If _usergroup <> "超级管理员" Then
    Dim s As String  = DataTables("企业基本信息").GetComboListString("企业名称","服务状态 = true")
    For Each dt As DataTable In DataTables
        If dt.dataCols.Contains("企业名称") Then
            dt.LoadFilter = "[企业名称] in (\'" & s.replace("|","\',\'") & "\')"
            dt.Load
        End If
    Next
End If