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


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

主题:SQLTable Select语句

帅哥哟,离线,有人找我吗?
zoyong
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:668 积分:7918 威望:0 精华:0 注册:2015/8/24 9:02:00
SQLTable Select语句  发帖心情 Post By:2017/5/27 17:10:00 [只看该作者]

SQLTable
Select语句   Select * F rom {cn_xjrjz} Where fdate Is Null

窗口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("cn_xjrjz", "FYear|FPeriod")
Dim nd As WinForm.TreeNode
nd = tv.Nodes.Insert("显示全部",0)

窗口按键加载60天数数据
Dim dt As Date = Date.Today.AddDays(-60)
DataTables("cn_xjrjz").LoadFilter = "FDate > '" & dt & "'"
DataTables("cn_xjrjz").Load()
'
Dim tv As WinForm.TreeView    '树目录赋值
tv =e.Form.Controls("TreeView1")
tv.BuildTree("cn_xjrjz", "fdate|FPeriod")
Dim nd As WinForm.TreeNode
nd = tv.Nodes.Insert("显示全部",0)


为什么上面的代码,只显示一张空表

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110569 积分:562735 威望: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)

 回到顶部