Foxtable(狐表)用户栏目专家坐堂 → 类同的代码合并


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

主题:类同的代码合并

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


加好友 发短信
等级:超级版主 帖子:110649 积分:563159 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/6/24 23:38:00 [显示全部帖子]

Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "Select Distinct Year(接单日期) As 年, Month(接单日期) As 月, Day(接单日期) As 日 From {销售订单}"
dt = cmd.ExecuteReader()
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree(dt, "年|月|日","年 > 2020")

Dim trv1 As WinForm.TreeView = e.Form.Controls("TreeView2")
trv1.BuildTree(dt, "年|月|日","年 > 2020")

cmd.CommandText = "Select Distinct Year(申请日期) As 年, Month(申请日期) As 月, Day(申请日期) As 日 From {外协产品申请}"
dt2 = cmd.ExecuteReader()
Dim trv2 As WinForm.TreeView = e.Form.Controls("TreeView3")
trv2.BuildTree(dt2, "年|月|日","年 > 2020")

Dim trv3 As WinForm.TreeView = e.Form.Controls("TreeView4")
trv3.BuildTree(dt2, "年|月|日","年 > 2020")

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


加好友 发短信
等级:超级版主 帖子:110649 积分:563159 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/6/26 8:59:00 [显示全部帖子]

cmd.ConnectionName = "数据源名称"

代码被网站屏蔽了,自己补充完整

 回到顶部