📄 frm_lb_cx.frm
字号:
Top = 240
Width = 2415
End
Begin VB.Label Label7
Caption = "借出数量:"
ForeColor = &H00C00000&
Height = 375
Left = 120
TabIndex = 14
Top = 3240
Width = 1215
End
Begin VB.Label Label6
Caption = "条形码:"
ForeColor = &H00C00000&
Height = 375
Left = 120
TabIndex = 13
Top = 2760
Width = 1215
End
Begin VB.Label Label5
Caption = "复本数:"
ForeColor = &H00C00000&
Height = 375
Left = 120
TabIndex = 12
Top = 2280
Width = 1215
End
Begin VB.Label Label4
Caption = "订购价格:"
ForeColor = &H00C00000&
Height = 375
Left = 120
TabIndex = 11
Top = 1800
Width = 1215
End
Begin VB.Label Label3
Caption = "作者:"
ForeColor = &H00C00000&
Height = 255
Left = 120
TabIndex = 9
Top = 1320
Width = 1095
End
Begin VB.Label Label2
Caption = "书籍类别:"
ForeColor = &H00C00000&
Height = 375
Left = 120
TabIndex = 7
Top = 840
Width = 1335
End
Begin VB.Label Label1
Caption = "书籍名称:"
ForeColor = &H00C00000&
Height = 375
Left = 120
TabIndex = 5
Top = 360
Width = 1335
End
End
Begin MSAdodcLib.Adodc Adodc2
Height = 375
Left = 3480
Top = 5520
Width = 2055
_ExtentX = 3625
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=tsgl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=tsgl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from View_tsfl"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSComctlLib.ImageList ImageList1
Left = 7320
Top = 5280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 1
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm_lb_cx.frx":0015
Key = ""
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1200
Top = 5640
Width = 2055
_ExtentX = 3625
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=tsgl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=tsgl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from lbtb"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Frame Frame1
Caption = "检索图书信息"
ForeColor = &H00800080&
Height = 3735
Left = 120
TabIndex = 0
Top = 120
Width = 4095
Begin MSComctlLib.TreeView TreeView1
Height = 3375
Left = 120
TabIndex = 1
Top = 240
Width = 3855
_ExtentX = 6800
_ExtentY = 5953
_Version = 393217
LineStyle = 1
Style = 7
Appearance = 1
End
End
End
Attribute VB_Name = "frm_lb_cx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Call Tree_change
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
Call Tree_change
End Sub
Public Sub Tree_change()
Dim Key, Text, BH As String
Dim Nod As Node
Key = "图书分类"
Text = "图书分类"
Set Node1 = TreeView1.Nodes.Add(, , Key, Text, 0)
Adodc1.RecordSource = "select * from lbtb "
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
Key = Trim(Adodc1.Recordset.Fields("书籍类别"))
Text = Adodc1.Recordset.Fields("书籍类别")
Set node2 = TreeView1.Nodes.Add(Node1.Index, tvwChild, Key, Text, 0)
Adodc2.RecordSource = "select * from View_tsfl where 书籍类别='" + Adodc1.Recordset.Fields("书籍类别") + "' "
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Key = Trim(Adodc2.Recordset.Fields("书籍名称"))
Text = Adodc2.Recordset.Fields("书籍名称")
Set Node3 = TreeView1.Nodes.Add(node2.Index, tvwChild, Key, Text, 0)
Adodc2.Recordset.MoveNext
Loop
Else
End If
Adodc1.Recordset.MoveNext
Loop
Else
End If
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
Dim Tree_Node As String
Tree_Node = TreeView1.SelectedItem.Key
If Tree_Node = "图书分类" Then
Adodc2.RecordSource = "select * from View_tsfl"
Adodc2.Refresh
Else
Adodc2.RecordSource = "select * from View_tsfl where 书籍类别='" + Tree_Node + "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
DataGrid1.Refresh
ElseIf Adodc2.Recordset.RecordCount = 0 Then
Adodc2.RecordSource = "select * from View_tsfl where 书籍名称='" + Tree_Node + "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.RecordSource = "select * from View_tsfl where 书籍类别='" + Adodc2.Recordset.Fields("书籍类别") + "'"
Adodc2.Refresh
Else
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -