DataTables("会计科目").loadtop = Nothing
DataTables("会计科目").loadfilter = "科目类型='损益'"
DataTables("会计科目").load()
Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim rts() As String = {"损益"}
Dim nd As WinForm.TreeNode
Dim dt As DataTable = DataTables("会计科目")
tr.StopRedraw()
tr.Nodes.Clear
Dim gz As String = "444"
For Each rt As String In rts
此主题相关图片如下:微信截图_20250121182246.png
tr.Nodes.Add(rt)
Next
For Each dr As DataRow In dt.Select("", "科目编码")
If dr.IsNull("科目编码") = False AndAlso dr("科目编码").Length = val(gz(0)) Then
Dim i As Integer = CInt(dr("科目编码").Substring(0, 1))
nd = tr.Nodes(i).Nodes.Add(dr("科目编码"), dr("科目编码") & " " & dr("科目名称"))
Functions.Execute("km", nd, dt, gz, 1)
End If
Next
tr.ResumeRedraw()