以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 目录树 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=194360) |
||||
-- 作者:njzwm -- 发布时间:2024/12/2 20:27:00 -- 目录树 设计一个目录树,但是第二级的“按月份”,照葫芦画瓢就是搞不出来,afterload部分自己也搞过,不行。请老师指点一下,谢谢! Dim t As Table = Tables("员工考勤库") If e.Node.Level = 2 Then Dim ary() As String = e.node.FullName.Split("\\") If ary(1) = "按员工" Then t.filter = "员工=\'" & ary(2) & "\'" ElseIf ary(1) = "按年份" Then t.filter = "年=" & ary(2) ElseIf ary(1) = "按组别" Then t.filter = "组别=" & ary(2) End If End If If e.Node.Level = 3 Then Dim ary() As String = e.node.FullName.Split("\\") If ary(1) = "按年份" And ary(2) = "按月份" Then t.filter = "年=" & ary(2) & " and 月=" & ary(3) & "" End If End If afterload: Dim trv As WinForm.TreeView = e.Form.controls("treeview1") Dim dt As DataTable = DataTables("员工考勤库") Dim kq_yg As WinForm.TreeNode = trv.Nodes("考勤记录").Nodes("按员工") kq_yg.nodes.Clear For Each yg As String In dt.GetValues("员工") kq_yg.Nodes.Add(yg) Next Dim kq_yy As WinForm.TreeNode = trv.Nodes("考勤记录").Nodes("按年份") kq_yy.nodes.Clear For Each ym As String In dt.GetValues("年") kq_yy.Nodes.Add(ym) Next Dim kq_gp As WinForm.TreeNode = trv.Nodes("考勤记录").Nodes("按组别") kq_gp.nodes.Clear For Each gp As String In dt.GetValues("组别") kq_gp.Nodes.Add(gp) Next |
||||
-- 作者:有点蓝 -- 发布时间:2024/12/2 20:30:00 -- 请上传实例说明 |
||||
-- 作者:njzwm -- 发布时间:2024/12/2 23:12:00 -- 蓝老师: 我就是想在年的这个节点上在细分一级“月”,不知道该怎么写,想听您指导,谢谢! |
||||
-- 作者:y2287958 -- 发布时间:2024/12/3 8:04:00 --
|