⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 借书.frm

📁 功能齐全的图书管理系统。包含设计文档
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 借书 
   Caption         =   "借书"
   ClientHeight    =   3495
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   ScaleHeight     =   3495
   ScaleWidth      =   5775
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      Caption         =   "确定"
      Height          =   375
      Left            =   1200
      TabIndex        =   5
      Top             =   2280
      Width           =   975
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   2520
      TabIndex        =   4
      Text            =   "0001"
      Top             =   1510
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   2520
      TabIndex        =   2
      Text            =   "05401"
      Top             =   760
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "返回"
      Height          =   375
      Left            =   3480
      TabIndex        =   0
      Top             =   2280
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "图书编号"
      Height          =   255
      Left            =   1560
      TabIndex        =   3
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "借书证号"
      Height          =   255
      Left            =   1560
      TabIndex        =   1
      Top             =   840
      Width           =   975
   End
End
Attribute VB_Name = "借书"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Command2_Click()
Dim Error_num As Integer
If Text1.Text = "" Or Text2.Text = "" Then
    MsgBox "数据输入不完整,请完成输入!", vbOKOnly, "输入错误!"
    Exit Sub
End If
Mycom.ActiveConnection = Mycon
Mycom.CommandType = adCmdStoredProc
Mycom.CommandText = "借书"
Mycom.Parameters(1) = 0
Mycom.Parameters(2) = Text1.Text
Mycom.Parameters(3) = Text2.Text
Mycom.Execute
Error_num = Mycom.Parameters(1)
If Error_num = 2 Then
    MsgBox "该借书证不存在!请重新输入!"
    Text1.Text = ""
Else
    If Error_num = 3 Then
        MsgBox "该借书证借阅超期!不能再借!"
        Text1.Text = ""
    Else
        If Error_num = 4 Then
            MsgBox "该图书编号不存在!请重新输入!"
            Text2.Text = ""
        Else
            If Error_num = 5 Then
                MsgBox "该借书证借阅数量达到上限!不能再借!"
                Text1.Text = ""
            Else
                If Error_num = 6 Then
                    MsgBox "该图书已被借出!请重新输入!"
                    Text2.Text = ""
                Else: MsgBox "借阅成功!", vbOKOnly, "借阅成功!"
                End If
            End If
        End If
    End If
End If
Set Mycom = Nothing
End Sub

Private Sub Form_Load()
Me.Show
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -