📄 frmborrow_read.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmborrow_read
BorderStyle = 1 'Fixed Single
Caption = "借阅管理"
ClientHeight = 8175
ClientLeft = 45
ClientTop = 435
ClientWidth = 9150
Icon = "frmborrow_read.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 8175
ScaleWidth = 9150
Begin VB.OptionButton opt归还
Caption = "归还"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 4080
TabIndex = 1
Top = 285
Width = 850
End
Begin VB.OptionButton opt借书
Caption = "借书"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1680
TabIndex = 0
Top = 285
Value = -1 'True
Width = 850
End
Begin VB.OptionButton opt续借
Caption = "续借"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 6480
TabIndex = 2
Top = 285
Width = 850
End
Begin VB.CommandButton cmd图书选择
Caption = ".."
Height = 375
Left = 8400
TabIndex = 4
Top = 1080
Width = 375
End
Begin VB.TextBox txt图书编号
Height = 375
Left = 4800
TabIndex = 24
Top = 1080
Width = 3615
End
Begin VB.TextBox txt借阅天数
BackColor = &H8000000F&
Enabled = 0 'False
Height = 270
Left = 5760
TabIndex = 21
Top = 3840
Width = 615
End
Begin VB.TextBox txt借阅数量
Height = 270
Left = 7920
TabIndex = 20
Top = 3840
Width = 615
End
Begin VB.VScrollBar VScroll2
Height = 255
Left = 8520
TabIndex = 5
Top = 3840
Width = 255
End
Begin VB.CommandButton cmd读者选择
Caption = ".."
Height = 375
Left = 4080
TabIndex = 3
Top = 1080
Width = 375
End
Begin VB.TextBox txt读者编号
Height = 375
Left = 360
TabIndex = 17
Top = 1080
Width = 3735
End
Begin VB.CommandButton cmdadd
Caption = "添 加"
Default = -1 'True
Height = 375
Left = 480
Style = 1 'Graphical
TabIndex = 6
Top = 4320
Width = 1215
End
Begin VB.CommandButton cmddel
Caption = "删 除"
Height = 375
Left = 2190
TabIndex = 8
Top = 4320
Width = 1215
End
Begin VB.CommandButton cmdsave
Caption = "执行操作"
Height = 375
Left = 3840
TabIndex = 9
Top = 4320
Width = 1215
End
Begin VB.CommandButton cmdclear
Caption = "清空数据"
Height = 375
Left = 5610
TabIndex = 10
Top = 4320
Width = 1215
End
Begin VB.CommandButton cmdexit
Cancel = -1 'True
Caption = "退 出"
Height = 375
Left = 7320
TabIndex = 11
Top = 4320
Width = 1215
End
Begin VB.TextBox txttotalprice
BackColor = &H8000000F&
Enabled = 0 'False
Height = 375
Left = 4320
TabIndex = 13
Top = 7680
Width = 1665
End
Begin VB.TextBox txttotalsum
BackColor = &H8000000F&
Enabled = 0 'False
Height = 390
Left = 7200
TabIndex = 12
Top = 7680
Width = 1665
End
Begin MSFlexGridLib.MSFlexGrid borrowbookGrid
Height = 2775
Left = 240
TabIndex = 7
Top = 4800
Width = 8655
_ExtentX = 15266
_ExtentY = 4895
_Version = 393216
Rows = 1
Cols = 6
FixedCols = 0
BackColor = -2147483639
BackColorBkg = 14737632
GridColor = 14737632
GridColorFixed = 14737632
SelectionMode = 1
AllowUserResizing= 1
End
Begin MSFlexGridLib.MSFlexGrid lst读者
Height = 2175
Left = 360
TabIndex = 18
Top = 1560
Width = 3975
_ExtentX = 7011
_ExtentY = 3836
_Version = 393216
Rows = 5
FixedRows = 0
FixedCols = 0
BackColor = 16777215
BackColorFixed = 16777215
BackColorSel = 16777215
ForeColorSel = -2147483630
BackColorBkg = 16777215
GridColor = 14737632
GridColorFixed = 14737632
Enabled = 0 'False
GridLines = 0
GridLinesFixed = 0
ScrollBars = 0
SelectionMode = 1
AllowUserResizing= 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.PictureBox Picbg1
Appearance = 0 'Flat
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 1440
Left = -480
Picture = "frmborrow_read.frx":19862
ScaleHeight = 1440
ScaleWidth = 1440
TabIndex = 16
Top = 4920
Width = 1440
End
Begin MSFlexGridLib.MSFlexGrid lst图书
Height = 2175
Left = 4800
TabIndex = 25
Top = 1560
Width = 3975
_ExtentX = 7011
_ExtentY = 3836
_Version = 393216
Rows = 7
FixedRows = 0
FixedCols = 0
BackColor = 16777215
BackColorFixed = 16777215
BackColorSel = 16777215
ForeColorSel = -2147483630
BackColorBkg = 16777215
GridColor = 14737632
GridColorFixed = 14737632
Enabled = 0 'False
GridLines = 0
GridLinesFixed = 0
ScrollBars = 0
SelectionMode = 1
AllowUserResizing= 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "操作方法"
Height = 180
Left = 480
TabIndex = 27
Top = 45
Width = 720
End
Begin VB.Shape Shape2
BorderColor = &H80000010&
Height = 3495
Left = 4680
Top = 720
Width = 4215
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "图书编号:"
Height = 180
Left = 4800
TabIndex = 26
Top = 840
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "借阅天数:"
Height = 180
Left = 4920
TabIndex = 23
Top = 3885
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "借阅数量:"
Height = 180
Left = 7080
TabIndex = 22
Top = 3885
Width = 900
End
Begin VB.Shape Shape1
BorderColor = &H80000010&
Height = 3495
Left = 240
Top = 720
Width = 4335
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "读者编号:"
Height = 180
Left = 360
TabIndex = 19
Top = 840
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "图书价格合计:"
Height = 180
Left = 3000
TabIndex = 15
Top = 7800
Width = 1260
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "借阅总数量:"
Height = 180
Left = 6120
TabIndex = 14
Top = 7800
Width = 1080
End
Begin VB.Shape Shape3
BorderColor = &H80000010&
Height = 495
Left = 240
Top = 120
Width = 8655
End
End
Attribute VB_Name = "frmborrow_read"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'-------------------------------------------------------
' 作者:邹雪桃
' 功能: 借书,还书和续借。先选择想操作的功能(借书/还书/续借)
' 再选择读者,图书,添加,执行操作
'-------------------------------------------------------
Public Function counter_pricesum()
Dim totalprice As Double
Dim totalsum As Integer
Dim i As Integer
totalprice = 0#
totalsum = 0
If borrowbookGrid.TextMatrix(0, 1) = "" Then
txttotalprice.Text = 0#
txttotalsum.Text = 0
Else
With borrowbookGrid
i = 1
While i < .Rows
i = i + 1
totalprice = totalprice + Val(.TextMatrix(i - 1, 2))
totalsum = totalsum + Val(.TextMatrix(i - 1, 3))
Wend
End With
End If
txttotalprice.Text = Format(totalprice, "0.00")
txttotalsum.Text = totalsum
End Function
Public Function borrowbook_update(sql As String)
Dim rs As New ADODB.Recordset
Set rs = TransactSQL(sql)
If Not rs.EOF Then
With borrowbookGrid
.Rows = 1
While Not rs.EOF
.Rows = .Rows + 1
.TextMatrix(.Rows - 1, 0) = rs(0)
.TextMatrix(.Rows - 1, 1) = rs(1)
.TextMatrix(.Rows - 1, 2) = rs(2)
.TextMatrix(.Rows - 1, 3) = rs(3)
.TextMatrix(.Rows - 1, 4) = rs(4)
.TextMatrix(.Rows - 1, 5) = rs(5)
rs.MoveNext
Wend
End With
rs.Close
End If
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -