以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]筛选树复合筛选问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=34132) |
||||
-- 作者:dqlgood -- 发布时间:2013/5/31 11:14:00 -- [求助]筛选树复合筛选问题 如题:
|
||||
-- 作者:Bin -- 发布时间:2013/5/31 11:17:00 -- 请问,你要问的是什么? |
||||
-- 作者:dqlgood -- 发布时间:2013/5/31 11:27:00 -- Dim nms As String() = {"一级分类","二级分类","产品名称"} \'指定生成目录树的各列 Dim qts As String() = {"\'","\'","\'"} \'指定将各列的值括起来的符号,这里都是字符型,所以都是单引号 Dim trv As WinForm.TreeView = e.Sender Dim flt As String Dim nd As WinForm.TreeNode For Each nd In e.node.allNodes \'清除子节点的选中标记 nd.Checked = False Next nd = e.Node.ParentNode Do While nd IsNot Nothing \'清除父节点的选中标记 nd.Checked = False nd = nd.ParentNode Loop For Each nd 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 Dim a,b As Double a = Forms("窗口2").Controls("ComboBox1").text b = Forms("窗口2").Controls("ComboBox2").text If flt Is Nothing Then DataTables("订单").LoadFilter = "[折扣] > " & a & " And [折扣] < " & b DataTables("订单").Load Else DataTables("订单").LoadFilter = flt & " And [折扣] > " & a & " And [折扣] < " & b DataTables("订单").Load End If 问题: 当选择单个节点时满足复合筛选要求,但选择第二个及以上节点节点,附加条件” [折扣] > " & a & " And [折扣] < " & b ”即不起作用。 |
||||
-- 作者:Bin -- 发布时间:2013/5/31 11:29:00 -- .
|
||||
-- 作者:dqlgood -- 发布时间:2013/5/31 11:40:00 -- 谢谢! |