Foxtable(狐表)用户栏目专家坐堂 → 目录树


  共有8684人关注过本帖平板打印复制链接

主题:目录树

美女呀,离线,留言给我吧!
采菊东篱下
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1881 积分:10368 威望:0 精华:0 注册:2019/4/6 8:45:00
  发帖心情 Post By:2021/2/19 16:44:00 [只看该作者]

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:小区车辆管理21901.foxdb

密码:888888
现在目录树已显示正常了,红色标注的字节筛选代码有问题。
'方法二:
Dim trv As WinForm.TreeView = e.Sender
Dim flt As String
If trv.Nodes(0).Name = e.Node.Name
    If e.Node.Checked
        For Each nd As WinForm.TreeNode In trv.AllNodes
            nd.Checked  = False
        Next
        e.Node.Checked = True
    Else
        flt = "1=2"
    End If
Else
    trv.Nodes(0).Checked = False
End If
If trv.Nodes(0).Name = "月租停车" Then
    Dim nms As String() = {"月租停放","住址_巷","住址_号","住址_房","户主姓名","手机号码","车牌号码"} '指定生成目录树的各列
    Dim qts As String() = {"'","'","","","'","'","'"} '指定将各列的值括起来的符号,这里都是字符型,所以都是单引号
    Dim n As WinForm.TreeNode = e.Node.ParentNode
    Do While n IsNot Nothing '取消父节点的选中标记,因为选中子节点,就不要选中父节点了
        n.Checked = False
        n = n.ParentNode
    Loop
    For Each nd As WinForm.TreeNode In e.Node.AllNodes
        nd.Checked  = e.Node.Checked
    Next
    Do While n IsNot Nothing
        Dim chhh As Boolean = True
        For Each nd As WinForm.TreeNode In n.AllNodes
            If nd.Checked = False Then
                chhh = False
                Exit For
            End If
        Next
        n.Checked = chhh
        n = n.ParentNode
    Loop
    If e.node.Checked = False Then '去除当前字节选勾
        Do While n IsNot Nothing
            n.Checked = False '去掉父节点选中状态
            n = n.ParentNode
        Loop
    End If
    For Each nd As WinForm.TreeNode In trv.AllNodes
        If nd.Checked  Then
            Dim rts() As String = nd.FullPath.Split("\")
            Dim val As String = ""
            For i As Integer = 0 To rts.length - 1
                If val > "" Then
                    val = val & " And "
                End If
                val = val & nms(i) & " = " & qts(i) & rts(i) & qts(i)
            Next
            If flt > "" Then
                flt = flt & " Or (" & val & ")"
            Else
                flt = val
            End If
        End If
    Next
ElseIf trv.Nodes(0).Name = "临时停车" Then
    Dim nms1 As String() = {"临时停车","年","月","车牌号码"} '指定生成目录树的各列
    Dim qts1 As String() = {"'","#","#","'"} '指定将各列的值括起来的符号,这里都是字符型,所以都是单引号
    Dim n1 As WinForm.TreeNode = e.Node.ParentNode
    Do While n1 IsNot Nothing '取消父节点的选中标记,因为选中子节点,就不要选中父节点了
        n1.Checked = False
        n1 = n1.ParentNode
    Loop
    For Each nd1 As WinForm.TreeNode In e.Node.AllNodes
        nd1.Checked  = e.Node.Checked
    Next
    Do While n1 IsNot Nothing
        Dim chhh As Boolean = True
        For Each nd1 As WinForm.TreeNode In n1.AllNodes
            If nd1.Checked = False Then
                chhh = False
                Exit For
            End If
        Next
        n1.Checked = chhh
        n1 = n1.ParentNode
    Loop
    If e.node.Checked = False Then '去除当前字节选勾
        Do While n1 IsNot Nothing
            n1.Checked = False '去掉父节点选中状态
            n1 = n1.ParentNode
        Loop
    End If
    For Each nd1 As WinForm.TreeNode In trv.AllNodes
        If nd1.Checked  Then
            Dim rts1() As String = nd1.FullPath.Split("\")
            Dim val1 As String = ""
            For i1 As Integer = 0 To rts1.length - 1
                If val1 > "" Then
                    val1 = val1 & " And "
                End If
                val1 = val1 & nms1(i1) & " = " & qts1(i1) & rts1(i1) & qts1(i1)
            Next
            If flt > "" Then
                flt = flt & " Or (" & val1 & ")"
            Else
                flt = val1
            End If
        End If
    Next
End If
If flt > "" Then
    flt = flt & " And "
End If
With DataTables("缴费情况")
    .LoadFilter = flt '设置加载条件
    .LoadPage = 0 '加载第一页
    .LoadTop = 20 '每页5行
    .LoadOrder = "日期 DESC,单号 DESC"
    .LoadReverse = True
    .Load()
    e.Form.Controls("TextBox3").Value = 1 & "/" & .TotalPages
End With

 回到顶部
总数 107 1 2 3 4 5 6 7 8 9 10 下一页 ..11