VB文档管理系统设计及源代码 第14页
Text3.Enabled = False
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = False
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
If Command3.Caption = "编辑节点" Then
Command3.Caption = "保存节点"
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text1.SetFocus
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = True
Command4.Enabled = False
Command5.Enabled = False
Else
Command3.Caption = "编辑节点"
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
adoPrimaryRS.Fields("卷号") = Text1.Text
adoPrimaryRS.Fields("卷名") = Text2.Text
adoPrimaryRS.Fields("备注") = Text3.Text
adoPrimaryRS.Update
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = False
End If
End Sub
Private Sub Command4_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
TreeView1.Nodes.Clear
Set mynod = TreeView1.Nodes.Add(, , "sort", "案卷名称及卷号" & "(" & "00" & ")")
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=dagl.mdb;"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select 卷号,卷名,备注,创卷人员,创卷日期 from sort ", db, adOpenStatic, adLockOptimistic
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 0 Then
Set mynod = TreeView1.Nodes.Add("sort", tvwChild, "sort" & Str$(i), adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 1 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(0), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 2 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(1), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 3 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(2), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 4 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(3), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 5 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(4), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 6 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(5), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 7 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(6), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 8 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(7), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
i = i + 1
End If
adoPrimaryRS.MoveNext
Loop While Not adoPrimaryRS.EOF
adoPrimaryRS.MoveFirst
i = 0
Do
If Left(adoPrimaryRS.Fields("卷号"), 1) = 9 Then
Set mynod = TreeView1.Nodes.Add("sort" & Str$(8), tvwChild, , adoPrimaryRS.Fields("卷名") & "(" & adoPrimaryRS.Fields("卷号") & ")")
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] 下一页
VB文档管理系统设计及源代码 第14页下载如图片无法显示或论文不完整,请联系qq752018766