以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]筛选树如何加入筛选  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=98933)

--  作者:seal51
--  发布时间:2017/4/9 18:11:00
--  [求助]筛选树如何加入筛选

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("报价明细表", "客户编号")
trv.Nodes.Insert("显示所有行",0)

 

上面代码中客户编号如何加入筛选, 只显示未订购的并只显示今年的报价的客户编号

 

 

\'-----------------------------筛选本年度未报价----------------------------------------
Dim y As Integer = Date.Today.Year
Dim dt1 As New Date(y, 1, 1)
Dim dt2 As New Date(y, 12, 31)
Dim Filter As String
Filter = "已订购 = false and 报价日期 >= #" & dt1 & "# And 报价日期 <= #" & dt2 & "#"
Tables("报价未订购_报价明细表").Filter = Filter
\'-----------------------------筛选本年度的报价----------------------------------------


--  作者:有点色
--  发布时间:2017/4/9 20:36:00
--  

不是很简单嘛?

 

Dim y As Integer = Date.Today.Year
Dim dt1 As New Date(y, 1, 1)
Dim dt2 As New Date(y, 12, 31)
Dim Filter As String
Filter = "已订购 = false and 报价日期 >= #" & dt1 & "# And 报价日期 <= #" & dt2 & "#"

Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("报价明细表", "客户编号", filter)
trv.Nodes.Insert("显示所有行",0)