📄 frmborrownextedit.frm
字号:
VERSION 5.00
Begin VB.Form frmBorrowNextEdit
BorderStyle = 1 'Fixed Single
Caption = "借阅编辑第二步"
ClientHeight = 5070
ClientLeft = 45
ClientTop = 435
ClientWidth = 8235
Icon = "frmBorrowNextEdit.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5070
ScaleWidth = 8235
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdOk
Caption = "生成信息"
Default = -1 'True
Height = 495
Left = 2160
TabIndex = 11
Top = 4320
Width = 1215
End
Begin VB.CommandButton cmdBack
Cancel = -1 'True
Caption = "返 回"
Height = 495
Left = 4680
TabIndex = 12
Top = 4320
Width = 1215
End
Begin VB.Frame fraBorrow
Caption = "借阅信息"
Enabled = 0 'False
Height = 1575
Left = 240
TabIndex = 16
Top = 120
Width = 7695
Begin VB.TextBox txtReader
Enabled = 0 'False
Height = 330
Left = 5160
TabIndex = 2
Top = 360
Width = 1935
End
Begin VB.TextBox txtCNo
Enabled = 0 'False
Height = 330
Left = 1440
TabIndex = 1
Top = 360
Width = 1935
End
Begin VB.TextBox txtReturnDate
BeginProperty DataFormat
Type = 1
Format = "yyyy-MM-dd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
Enabled = 0 'False
Height = 330
Left = 5160
TabIndex = 4
Top = 960
Width = 1935
End
Begin VB.TextBox txtBorrowDate
BeginProperty DataFormat
Type = 1
Format = "yyyy-MM-dd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
Enabled = 0 'False
Height = 330
Left = 1440
TabIndex = 3
Top = 960
Width = 1935
End
Begin VB.Label lblReader
AutoSize = -1 'True
Caption = "姓 名"
Enabled = 0 'False
Height = 180
Left = 3960
TabIndex = 20
Top = 420
Width = 900
End
Begin VB.Label lblCNo
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "借阅证号"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 480
TabIndex = 19
Top = 420
Width = 720
End
Begin VB.Label lblReturnDate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "应归还日期"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 3960
TabIndex = 18
Top = 1080
Width = 900
End
Begin VB.Label lblBorrowDate
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "借阅日期"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 480
TabIndex = 17
Top = 1080
Width = 720
End
End
Begin VB.Frame frmBook
Caption = "第二步:填写图书信息"
Height = 2175
Left = 240
TabIndex = 0
Top = 1800
Width = 7695
Begin VB.TextBox txtPrice
Enabled = 0 'False
Height = 330
Left = 1440
TabIndex = 9
Top = 1560
Width = 1935
End
Begin VB.TextBox txtAuthor
Enabled = 0 'False
Height = 330
Left = 1440
TabIndex = 7
Top = 960
Width = 1935
End
Begin VB.TextBox txtPublisher
Enabled = 0 'False
Height = 330
Left = 5160
TabIndex = 8
Top = 960
Width = 1935
End
Begin VB.TextBox txtBName
Enabled = 0 'False
Height = 330
Left = 5160
TabIndex = 6
Top = 405
Width = 1935
End
Begin VB.TextBox txtBNo
Height = 330
Left = 1440
MaxLength = 20
TabIndex = 5
Top = 405
Width = 1935
End
Begin VB.TextBox txtTypeName
Enabled = 0 'False
Height = 330
Left = 5160
TabIndex = 10
Top = 1605
Width = 1935
End
Begin VB.Label lblPrice
Caption = "价 格"
Height = 255
Left = 480
TabIndex = 23
Top = 1605
Width = 735
End
Begin VB.Label lblAuthor
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "图书作者"
Height = 180
Left = 480
TabIndex = 22
Top = 1035
Width = 720
End
Begin VB.Label lblPublisher
AutoSize = -1 'True
Caption = " 出版社"
Height = 180
Left = 4080
TabIndex = 21
Top = 1080
Width = 720
End
Begin VB.Label lblBName
AutoSize = -1 'True
Caption = "图书名称"
Height = 180
Left = 4080
TabIndex = 15
Top = 480
Width = 720
End
Begin VB.Label lblBNo
AutoSize = -1 'True
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "图书编号"
Height = 180
Left = 480
TabIndex = 14
Top = 480
Width = 720
End
Begin VB.Label lblTypeName
Caption = "所属类别"
Height = 255
Left = 4080
TabIndex = 13
Top = 1650
Width = 735
End
End
End
Attribute VB_Name = "frmBorrowNextEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'生成信息(及确 定)按钮
Private Sub cmdOK_Click()
'===========生成信息===============
If cmdOK.Caption = "生成信息" Then
'判断框的有效性
If Trim(txtBNo.Text) = "" Then
MsgBox "输入的图书编号为空", vbInformation, "信息提示"
txtBNo.SetFocus
Exit Sub
End If
'判断是否存在此图书编号
If Not objBookInfo.IsExistBNo(txtBNo.Text) Then
MsgBox "无此借阅证号,请输入正确的图书编号", vbInformation, "信息提示"
txtBNo.SetFocus
txtBNo.SelStart = 0
txtBNo.SelLength = Len(txtBNo.Text)
Exit Sub
End If
'确认此借阅证号为正确的
If MsgBox("此图书编号是否为所需的" + vbCrLf _
+ "生成其他信息后,图书编号将不能被修改", vbQuestion + vbYesNo _
+ vbDefaultButton1, "询问") = vbNo Then
Exit Sub
End If
'对控件属性进行修改
txtBNo.Enabled = False
objBookInfo.GetInfo txtBNo.Text
txtBName.Text = Trim(objBookInfo.BookName)
txtAuthor.Text = Trim(objBookInfo.Author)
txtPublisher.Text = Trim(objBookInfo.Publisher)
txtPrice.Text = Trim(Str(objBookInfo.Price))
txtTypeName.Text = Trim(objBookType.GetTypeName(txtBNo.Text))
cmdOK.Caption = "确 定"
'===========确 定=================
Else
'判断此书籍是否已经被借出
If objBorrowInfo.IsExistBNo(txtBNo.Text) Then
MsgBox "此书已经借出,借阅书籍失败", vbInformation, "信息提示"
Unload Me
Exit Sub
End If
'给objBorrowInfo赋值
objBorrowInfo.CardNo = Trim(txtCNo.Text)
objBorrowInfo.BookNo = Trim(txtBNo.Text)
objBorrowInfo.BorrowDate = DateValue(txtBorrowDate.Text)
objBorrowInfo.ReturnDate = DateValue(txtReturnDate.Text)
objBorrowInfo.BorrowState = 0
objBorrowInfo.Insert
MsgBox "借阅成功", vbInformation, "信息提示"
'关闭窗口
Unload Me
End If
End Sub
'返回按钮
Private Sub cmdBack_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -