窗口AfterLoad
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
Dim Filter As String
Filter = "FDate >= '" & dt1 & "' And FDate <= '" & dt2 & "'" 'SQL表格式
DataTables("cn_xjrjz_Table1").LoadFilter = Filter '设置加载条件
DataTables("cn_xjrjz_Table1").Load() '加载数据
Dim tv As WinForm.TreeView '树目录赋值
tv =e.Form.Controls("TreeView1")
tv.BuildTree(DataTables("cn_xjrjz_Table1"), "FYear|FPeriod")
Dim nd As WinForm.TreeNode
nd = tv.Nodes.Insert("显示全部",0)
窗口按键加载60天数数据
Dim dt As Date = Date.Today.AddDays(-60)
DataTables("cn_xjrjz_Table1").LoadFilter = "FDate > '" & dt & "'"
DataTables("cn_xjrjz_Table1").Load()
'
Dim tv As WinForm.TreeView '树目录赋值
tv =e.Form.Controls("TreeView1")
tv.BuildTree(DataTables("cn_xjrjz_Table1"), "fdate|FPeriod")
Dim nd As WinForm.TreeNode
nd = tv.Nodes.Insert("显示全部",0)