标题:这个vb.net代码怎么注释
只看楼主
jsba0308
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-12-22
 问题点数:0 回复次数:0 
这个vb.net代码怎么注释

Public Function InitTree(ByVal strTable As String, _
ByRef ParentTreeNode As TreeNodeCollection, _
Optional ByRef dsTree As DataSet = Nothing, _
Optional ByVal ParentID As Integer = -1, _
Optional ByVal ParentTable As String = "", _
Optional ByVal ParentItemID As String = "")

Dim collectRows As DataRowCollection = dsTree.Tables(strTable).Rows
Dim collectSubRows As DataRowCollection
Dim nodX As TreeNode
Dim nodeColl As TreeNodeCollection

Dim strSubTable As String
Dim tmpParentTable As String

Dim I, J As Integer
ParentTreeNode.Clear()
TreeViewTrainsport.BeginUpdate()

For I = 0 To collectRows.Count - 1
If collectRows.Item(I).Item("ParentID") = ParentID Or ParentID = -1 Then
nodX = ParentTreeNode.Add(collectRows.Item(I).Item("Name"))
strSubTable = collectRows.Item(I).Item("TableName")

nodX.Tag = strSubTable

Dim collectSubRows As DataRowCollection
Dim nodX As TreeNode

End If
ElseIf collectRows.Item(I).Item("SubItem") Then
InitTree(collectRows.Item(I).Item("SonTable"),nodX.Nodes,dsTree, collectRows.Item(I).Item(strTable & "ID"), ParentTable, ParentItemID)
End If
End If
Application.DoEvents()
Next
TreeViewTrainsport.ExpandAll()
TreeViewTrainsport.SelectedNode = TreeViewTrainsport.Nodes.Item(0).FirstNode
TreeViewTrainsport.EndUpdate()
End Function

搜索更多相关主题的帖子: 注释 代码 
2005-12-22 18:14



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-39530-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.441034 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved