代码或者函数里忽略掉3开头的科目即可,没有必要增加一个空节点
For Each dr As DataRow In dt.Select("", "科目代码")
If dr.IsNull("科目代码") = False AndAlso dr("科目代码").Length = 4 Then
Dim i As Integer = CInt(dr("科目代码").Substring(0,1))
If i <> 3 Then
nd = tr.Nodes(i).Nodes.Add(dr("科目代码"),dr("科目代码") & " " & dr("科目名称"))
Functions.Execute("AddChildren1",nd,dt)
End If
End If
Next