以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  窗口目录树问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=86043)

--  作者:大红袍
--  发布时间:2016/6/8 19:25:00
--  

不会做,上传具体实例

 

Dim trv As WinForm.TreeView = e.Sender
Dim flt As String
If e.Node.Text = "显示所有客户" Then
    flt = ""
Else
    For Each nd As WinForm.TreeNode In e.node.Nodes \'清除子节点选中状态
        nd.Checked = False
    Next
    If e.node.ParentNode IsNot Nothing Then \'去掉父节点选中状态
        e.node.ParentNode.Checked = False
    End If
    For Each nd As WinForm.TreeNode In trv.AllNodes
        If nd.Checked Then
            If flt > "" Then
                flt = flt & " Or "  \'注意用or而不是And
            End If
            Select Case nd.Level
                Case 0
                    flt = flt & "( 客户类别 = \'" & nd.Text & "\')" \'注意条件都要用括号括起来
                Case 1
                    flt = flt & "( 客户类别 = \'" & nd.ParentNode.Text & "\' And 客户类别 = \'" & nd.Text & "\')"
            End Select
        End If
    Next
end if
Tables("客户信息表").Filter = flt


--  作者:大红袍
--  发布时间:2016/6/10 21:06:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:中科管理项目测试3.table