Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:目录树

1楼
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
2楼
有点蓝 发表于:2024/12/2 20:30:00
请上传实例说明
3楼
njzwm 发表于:2024/12/2 23:12:00
蓝老师:
我就是想在年的这个节点上在细分一级“月”,不知道该怎么写,想听您指导,谢谢!

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:目录树.zip


4楼
y2287958 发表于:2024/12/3 8:04:00
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目2.foxdb

共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 4 queries.