以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  加载树问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=127267)

--  作者:aza520
--  发布时间: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


--  作者:有点甜
--  发布时间: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) & "\'"

 

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