Sub GetClient(ByVal node As TreeNode)
Dim thisItem As SourceSafeTypeLib.IVSSItem
vsDB = New SourceSafeTypeLib.VSSDatabase
vsDB.Open(strVSSDB, strVSSUser, strVSSPW)
strCurrentPrj = "$/client_import/"
vsDB.CurrentProject() = strCurrentPrj
Try
For Each thisItem In vsDB.VSSItem(vsDB.CurrentProject).Items(False)
If thisItem.Type = VSSITEM_PROJECT Then
Dim newNode As TreeNode = New TreeNode(thisItem.Name)
newNode.SelectAction = TreeNodeSelectAction.Expand
newNode.PopulateOnDemand = True
node.ChildNodes.Add(newNode)
End If
Next
Catch ex As Exception
'Put error handling here
End Try
End Sub
Sub GetVersion(ByVal node As TreeNode)
Dim thisItem As SourceSafeTypeLib.IVSSItem
vsDB = New SourceSafeTypeLib.VSSDatabase
vsDB.Open(strVSSDB, strVSSUser, strVSSPW)
Client = node.Value
strCurrentPrj = "$/client_import/" & Client & "/PROCESSES/"
vsDB.CurrentProject() = strCurrentPrj
Try
For Each thisItem In vsDB.VSSItem(vsDB.CurrentProject).Items(False)
If thisItem.Type = VSSITEM_PROJECT Then
Dim newNode As TreeNode = New TreeNode(thisItem.Name)
node.ChildNodes.Add(newNode)
End If
Next
Catch ex As Exception
End Try
End Sub
Sub GetProcess(ByVal node As TreeNode)
Dim thisItem As SourceSafeTypeLib.IVSSItem
vsDB = New SourceSafeTypeLib.VSSDatabase
vsDB.Open(strVSSDB, strVSSUser, strVSSPW)
Version = node.Value
strCurrentPrj = "$/client_import/" & Client & "/PROCESSES/" & Version
vsDB.CurrentProject() = strCurrentPrj
Try
For Each thisItem In vsDB.VSSItem(vsDB.CurrentProject).Items(False)
If thisItem.Type = VSSITEM_PROJECT Then
Dim newNode As TreeNode = New TreeNode(thisItem.Name)
node.ChildNodes.Add(newNode)
End If
Next
Catch ex As Exception
End Try
End Sub
Sub PopulateNode(ByVal source As Object, ByVal e As TreeNodeEventArgs)
Select Case e.Node.Depth
Case 0
GetClient(e.Node)
Case 1
GetVersion(e.Node)
Case 2
GetProcess(e.Node)
End Select
End Sub