以文本方式查看主题

-  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=133907)

--  作者:YOU
--  发布时间:2019/4/23 14:45:00
--  [求助]怎么判断关联表,如何排除关联表?
Dim clstbox As WinForm.CheckedListBox = e.Form.Controls("TablesCheckedListBox")
Dim lst As New List(Of String)
For Each t As Table In Tables
    If t.TableType = TableTypeEnum.Normal AndAlso t.IsCopy = False Then
        lst.Add(t.Name)
    End If
Next
lst.Sort
For Each s As String In lst
    clstbox.Items.Add(s)
Next
For Each t As Table In Tables
    t.Visible = (e.Form.Controls("TablesCheckedListBox").Value.Contains(t.Name))
Next
e.Form.Controls("TablesCheckedListBox").Value = GetConfigValue("MainTN","")
TableCaptionVisible = True

--  作者:YOU
--  发布时间:2019/4/23 15:01:00
--  
求助
[此贴子已经被作者于2019/4/23 15:14:38编辑过]

--  作者:YOU
--  发布时间:2019/4/23 15:18:00
--  
[求助]怎么判断关联表,如何排除关联表?
Dim clstbox As WinForm.CheckedListBox = e.Form.Controls("TablesCheckedListBox")
Dim lst As New List(Of String)
For Each t As Table In Tables
    If t.TableType = TableTypeEnum.Normal AndAlso t.IsCopy = False Then
        lst.Add(t.Name)
    End If
Next
lst.Sort
For Each s As String In lst
    clstbox.Items.Add(s)
Next
For Each t As Table In Tables
    t.Visible = (e.Form.Controls("TablesCheckedListBox").Value.Contains(t.Name))
Next
e.Form.Controls("TablesCheckedListBox").Value = GetConfigValue("MainTN","")
TableCaptionVisible = True

--  作者:有点甜
--  发布时间:2019/4/23 16:41:00
--  

比如

 

For Each t As Table In Tables
    If t.TableType = TableTypeEnum.Normal AndAlso t.IsCopy = False AndAlso t.IsRelation = False Then
        msgbox(t.name)
    End If
Next