Foxtable(狐表)用户栏目专家坐堂 → [求助]表名称


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

主题:[求助]表名称

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


加好友 发短信
等级:四尾狐 帖子:860 积分:5493 威望:0 精华:0 注册:2016/10/19 16:45:00
[求助]表名称  发帖心情 Post By:2025/4/29 14:36:00 [显示全部帖子]

老师好,怎样正确把表名称从目录树中导出到列表项目表中的表名称列中,列名排除不导入。

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
    If nd.Nodes.count = 0 Then
        Dim ndr As DataRow = DataTables("列表项目").AddNew
        Dim ary() As String = nd.FullPath.Split("\")
        If ary.length > 0 Then ndr("表名称") = ary(0)
       ' If ary.length > 1 Then ndr("列名") = ary(1)
    End If
Next

 回到顶部
帅哥哟,离线,有人找我吗?
苏州老街
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:860 积分:5493 威望:0 精华:0 注册:2016/10/19 16:45:00
  发帖心情 Post By:2025/4/29 15:12:00 [显示全部帖子]

表名生成目录树

Dim tr As WinForm.TreeView
Dim nd As WinForm.TreeNode
tr = Forms("表列名管理").Controls("TreeView1")
For Each tab As Table In Tables
    nd = Tr.Nodes.Add(tab.Name,tab.Name)
    For Each c As Col In Tables(tab.Name).Cols
        If c.Visible Then
            nd.Nodes.Add(c.Name,c.Name)
        End If
    Next
Next

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


加好友 发短信
等级:四尾狐 帖子:860 积分:5493 威望:0 精华:0 注册:2016/10/19 16:45:00
  发帖心情 Post By:2025/4/29 15:44:00 [显示全部帖子]

老师,我不要列名称

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


加好友 发短信
等级:四尾狐 帖子:860 积分:5493 威望:0 精华:0 注册:2016/10/19 16:45:00
  发帖心情 Post By:2025/4/29 18:01:00 [显示全部帖子]

老师,这个代码怎样修改,谢谢!

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
    If nd.Nodes.count = 0 Then
        Dim ndr As DataRow = DataTables("列表项目").AddNew
        Dim ary() As String = nd.FullPath.Split("\")
        If ary.length > 0 Then ndr("表名称") = ary(0)
       ' If ary.length > 1 Then ndr("列名") = ary(1)
    End If
Next

 回到顶部