Foxtable(狐表)用户栏目专家坐堂 → [求助]筛选树的反选方法


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

主题:[求助]筛选树的反选方法

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/16 18:24:00 [显示全部帖子]

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
    nd.Checked = not nd.Checked
Next


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/16 19:17:00 [显示全部帖子]

Dim nms As String() = {"状态","部门"} '指定生成目录树的各列
Dim qts As String() = {"'","'","'"} '指定将各列的值括起来的符号,这里都是字符型,所以都是单引号
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim flt As String = ""
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
Tables("人员信息表").Filter  = flt

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/16 23:44:00 [显示全部帖子]

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
For Each nd As WinForm.TreeNode In trv.AllNodes
    nd.Checked = not nd.Checked
Next
Dim nms As String() = {"产品","客户"} '指定生成目录树的各列
Dim qts As String() = {"'","'"} '指定将各列的值括起来的符号,这里都是字符型,所以都是单引号
Dim flt As String = ""
For Each nd As WinForm.TreeNode In trv.AllNodes
    If nd.Checked AndAlso nd.level = 1 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
Tables("订单").Filter  = flt


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/17 10:18:00 [显示全部帖子]

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目1 (2).foxdb


 回到顶部