Foxtable(狐表)用户栏目专家坐堂 → SQLTable Select语句


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

主题:SQLTable Select语句

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110560 积分:562690 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/5/27 17:58:00 [显示全部帖子]

窗口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)

 回到顶部