|
Adodc1.RecordSource = "Select * From SprInst Order By NameShort"
Adodc1.Refresh
Set nodX = TreeView1.Nodes.Add(,, "Ins", "Факультеты")
k = 1
s1 = 0: s2 = 0: s3 = 0: s4 = 0
With Adodc1.Recordset
If Adodc1.Recordset.RecordCount = 0 Then Exit Sub
'Список факультетов
MoveFirst
Do While Not.EOF
It = "I" + CStr(!KodInst)
Set nodX = TreeView1.Nodes.Add("Ins", tvwChild, It,!NameShort) '!NameShort)
s1 = s1 + 1
ComBar
NodX.EnsureVisible
Adodc2.RecordSource = "Select * From SprSpec Where NumInst = " &!KodInst & " Order By NameSpec"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
'Список специальностей
Adodc2.Recordset.MoveFirst
Do While Not Adodc2.Recordset.EOF
Cp = "C" + CStr(Adodc2.Recordset!KodSpec)
Set nodX = TreeView1.Nodes.Add(It, tvwChild, Cp, Adodc2.Recordset!NameSpec)
s2 = s2 + 1
ComBar
Adodc3.RecordSource = "Select * From SprPotok Where NumSpec = " & Adodc2.Recordset!KodSpec & " Order By NumLangOb"
Adodc3.Refresh
If Adodc3.Recordset.RecordCount > 0 Then
'Список потоков
Adodc3.Recordset.MoveFirst
Do While Not Adodc3.Recordset.EOF
Pp = "P" + CStr(Adodc3.Recordset!kodPotok)
Set nodX = TreeView1.Nodes.Add(Cp, tvwChild, Pp, Adodc3.Recordset!NamePotok)
s3 = s3 + 1
ComBar
Adodc3.Recordset.MoveNext
Loop
End If
Adodc2.Recordset.MoveNext
Loop
End If
k = k + 1:
ComBar
Дата добавления: 2015-07-11; просмотров: 98 | Нарушение авторских прав