Foxtable(狐表)用户栏目专家坐堂 → [求助]怎么判断关联表,如何排除关联表?


  共有1888人关注过本帖树形打印复制链接

主题:[求助]怎么判断关联表,如何排除关联表?

帅哥哟,离线,有人找我吗?
YOU
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:391 积分:596 威望:0 精华:0 注册:2018/3/5 14:40:00
[求助]怎么判断关联表,如何排除关联表?  发帖心情 Post By: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
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:391 积分:596 威望:0 精华:0 注册:2018/3/5 14:40:00
  发帖心情 Post By:2019/4/23 15:01:00 [只看该作者]

求助
[此贴子已经被作者于2019/4/23 15:14:38编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
YOU
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:391 积分:596 威望:0 精华:0 注册:2018/3/5 14:40:00
  发帖心情 Post By: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

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By: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


 回到顶部