'生成目录树
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "SELECT DISTINCT 后期完成, Year(交货日期) As 年, Month(交货日期) As 月 From {后期排单}"
dt = cmd.ExecuteReader()
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree(dt,"后期完成|年|月")
trv.Nodes.Insert("加载所有数据",0)
'加载第一页数据
With DataTables("后期排单")
.LoadFilter = "" '清除加载条件
.LoadPage = 0 '加载第一页
.LoadOver="_Identify"
.LoadTop = 100 '每页100行
.Load()
e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With
此主题相关图片如下:1.jpg