Foxtable(狐表)用户栏目专家坐堂 → 加载树问题


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

主题:加载树问题

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


加好友 发短信
等级:三尾狐 帖子:689 积分:5155 威望:0 精华:0 注册:2017/10/22 10:15:00
加载树问题  发帖心情 Post By:2018/11/9 15:51:00 [只看该作者]

加载树想再多加一级“桩号”目录,红字是我加的代码,但不起作用,请问老师怎么修改

Dim Filter As String = "1=1"

Dim dr = e.node.FullPath.split("\") '获取生成此节点的行
If e.Node.Text <> "加载所有数据" Then
    Select Case e.Node.Level
        Case 0
            Filter = "[项目名称] = '" & dr(0) & "'"
        Case 1
            Filter = "[项目名称] = '" & dr(0) & "'And [施工合同段] = '" & dr(1) & "'"
        Case 2
            Filter = "[项目名称] = '" & dr(0) & "'And [施工合同段] = '" & dr(1) & "' And [章节] = '" & dr(2) & "'"
        Case 3
            Dim arr() As String = dr(3).split("|")
            Filter = "[项目名称] = '" & dr(0) & "'And [施工合同段] = '" & dr(1) & "' And [章节] = '" & dr(2) & "' And [子目号] = '" & arr(0) & "' and 子目名称='" & arr(1) & "'"
        Case 4
            Dim arr() As String = dr(3).split("|")
            Dim arr2() As String = dr(4).split("|")
            Filter = "[项目名称] = '" & dr(0) & "'And [施工合同段] = '" & dr(1) & "' And [章节] = '" & dr(2) & "' And [子目号] = '" & arr(0) & "' and 子目名称='" & arr(1) & "' And [支付编号] = '" & arr2(0) & "' and 细目名称='" & arr2(1) & "'"
        Case 5
            Dim arr() As String = dr(3).split("|")
            Dim arr2() As String = dr(4).split("|") 
            Filter = "[项目名称] = '" & dr(0) & "'And [施工合同段] = '" & dr(1) & "' And [章节] = '" & dr(2) & "' And [子目号] = '" & arr(0) & "' and 子目名称='" & arr(1) & "' And [支付编号] = '" & arr2(0) & "' and 细目名称='" & arr2(1) & "'And [施工合同段] = '" & dr(5) & "'"
    End Select
End If


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/11/9 16:18:00 [只看该作者]

试试改成

 

Filter = "[项目名称] = '" & dr(0) & "'And [施工合同段] = '" & dr(1) & "' And [章节] = '" & dr(2) & "' And [子目号] = '" & arr(0) & "' and 子目名称='" & arr(1) & "' And [支付编号] = '" & arr2(0) & "' and 细目名称='" & arr2(1) & "'And [某列] = '" & dr(5) & "'"

 

如果不行,看代码无法处理。请做一个具体实例上来测试。


 回到顶部