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

📄 frmissue.frm

📁 学生选课系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmIssue 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "借书管理"
   ClientHeight    =   3330
   ClientLeft      =   45
   ClientTop       =   375
   ClientWidth     =   6165
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3330
   ScaleWidth      =   6165
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdMiss 
      Caption         =   "丢失书籍"
      Height          =   315
      Left            =   1080
      TabIndex        =   28
      Top             =   2160
      Visible         =   0   'False
      Width           =   1290
   End
   Begin VB.CommandButton cmdReserve 
      Caption         =   "预定书籍"
      Height          =   315
      Left            =   1080
      TabIndex        =   27
      Top             =   1500
      Visible         =   0   'False
      Width           =   1290
   End
   Begin VB.Frame Frame3 
      Caption         =   "输入.."
      Height          =   3135
      Left            =   75
      TabIndex        =   19
      Top             =   150
      Width           =   2535
      Begin VB.CommandButton cmdreturn 
         Caption         =   "还书(&R)"
         Height          =   315
         Left            =   1080
         TabIndex        =   24
         Top             =   2280
         Width           =   1215
      End
      Begin VB.CommandButton cmdrenewal 
         Caption         =   "续借(&R)"
         Height          =   315
         Left            =   1080
         TabIndex        =   23
         Top             =   1920
         Width           =   1215
      End
      Begin VB.CommandButton cmdcharge 
         Caption         =   "购买书籍(&C)"
         Height          =   315
         Left            =   1080
         TabIndex        =   22
         Top             =   1560
         Width           =   1215
      End
      Begin VB.TextBox txtBookId 
         Height          =   315
         Left            =   1095
         MaxLength       =   8
         TabIndex        =   1
         Top             =   735
         Width           =   1215
      End
      Begin VB.CommandButton cmdIssue 
         Caption         =   "借书(&I)"
         Height          =   315
         Left            =   1095
         TabIndex        =   2
         Top             =   1185
         Width           =   1215
      End
      Begin VB.TextBox txtMemId 
         Height          =   315
         Left            =   1095
         MaxLength       =   8
         TabIndex        =   0
         Top             =   360
         Width           =   1215
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "会员编号"
         Height          =   180
         Left            =   240
         TabIndex        =   21
         Top             =   435
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "书本编号"
         Height          =   180
         Left            =   240
         TabIndex        =   20
         Top             =   810
         Width           =   720
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "书籍信息"
      Height          =   1815
      Left            =   2715
      TabIndex        =   4
      Top             =   1440
      Width           =   3375
      Begin VB.Label lblreturn 
         Height          =   255
         Left            =   1560
         TabIndex        =   26
         Top             =   1320
         Width           =   1695
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "归还日:"
         Height          =   180
         Left            =   240
         TabIndex        =   25
         Top             =   1320
         Width           =   630
      End
      Begin VB.Label dd 
         AutoSize        =   -1  'True
         Caption         =   "存在:"
         Height          =   180
         Left            =   240
         TabIndex        =   18
         Top             =   1080
         Width           =   450
      End
      Begin VB.Label lblisin 
         Height          =   255
         Left            =   1560
         TabIndex        =   17
         Top             =   1080
         Width           =   1695
      End
      Begin VB.Label lblcondt 
         Height          =   255
         Left            =   1560
         TabIndex        =   16
         Top             =   840
         Width           =   1695
      End
      Begin VB.Label lblres 
         Height          =   255
         Left            =   1560
         TabIndex        =   15
         Top             =   600
         Width           =   1695
      End
      Begin VB.Label lbltitle 
         Height          =   255
         Left            =   1560
         TabIndex        =   14
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "状况:"
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   840
         Width           =   450
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "续借编号:"
         Height          =   180
         Left            =   240
         TabIndex        =   6
         Top             =   600
         Width           =   810
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "书籍名称:"
         Height          =   180
         Left            =   240
         TabIndex        =   5
         Top             =   360
         Width           =   810
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "会员信息"
      Height          =   1215
      Left            =   2715
      TabIndex        =   3
      Top             =   120
      Width           =   3375
      Begin VB.Label lblbooks 
         Height          =   255
         Left            =   1560
         TabIndex        =   13
         Top             =   840
         Width           =   1695
      End
      Begin VB.Label lblfinebal 
         Height          =   255
         Left            =   1560
         TabIndex        =   12
         Top             =   600
         Width           =   1695
      End
      Begin VB.Label lblmemname 
         Height          =   255
         Left            =   1560
         TabIndex        =   11
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "借书数量:"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   840
         Width           =   810
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "费用:"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   600
         Width           =   450
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "会员名称:"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   360
         Width           =   810
      End
   End
End
Attribute VB_Name = "frmIssue"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Connection
Private Sub cmdcharge_Click()
    If Trim(txtMemId) = "" Or Trim(txtBookId) = "" Then
        MsgBox "缺少会员编号或书本编号!", vbInformation, "注意"
    Else
        On Error GoTo aderr
        
        '查询书价
        Dim adoprimaryrs0 As Recordset
        Set adoprimaryrs0 = New Recordset
        adoprimaryrs0.Open "select price,titleid from Titles " & _
                            "where titleId = '" & lbltitle.Caption & _
                            " '", db, adOpenStatic, adLockOptimistic
        Charge = adoprimaryrs0.Fields(0)
        '更新会员账户
        Dim adoprimaryrs10 As Recordset
        Set adoprimaryrs10 = New Recordset
        adoprimaryrs10.Open "select memberid,finebal from members " & _
                            "where memberId = '" & Trim(txtMemId.Text) & _
                            "'", db, adOpenStatic, adLockOptimistic
        Charge = Charge + adoprimaryrs10.Fields(1)
        adoprimaryrs10.Fields(1) = Charge
        adoprimaryrs10.Update
        Txtmemid_LostFocus
        Exit Sub
    End If
aderr:
    MsgBox "错误:" & Err.Description, vbInformation, "注意"

End Sub

Private Sub cmdIssue_Click()
    If Trim(txtMemId) = "" Or Trim(txtBookId) = "" Then
        MsgBox "缺少会员编号或书本编号!", vbInformation, "注意"
    Else
        '检测是否超出最大允许账户欠款数额
        If Val(lblfinebal.Caption) > M.MaxFineBal Then
            MsgBox "您的账户欠款超额,借书前请付清罚款。", vbInformation, "注意"
            txtBookId.Text = ""
            txtMemId.SetFocus
            Exit Sub
        End If
        '检测是否超出最大允许借书数量
        If Val(lblbooks.Caption) >= M.TotalIssueBook Then
            MsgBox "您的借书数量已超出最大允许值。", vbInformation, "注意"
            txtBookId.Text = ""
            txtMemId.SetFocus
            Exit Sub
        End If
    
        If UCase(lblisin.Caption) = "FALSE" Then
            MsgBox "图书馆中没这本书。", vbInformation, "注意"
            txtBookId.Text = ""
            txtMemId.SetFocus
            Exit Sub
        End If
        If UCase(lblcondt.Caption) = "MISSING" Then
            MsgBox "书籍已丢失。", vbInformation, "注意"
            txtBookId.Text = ""
            txtMemId.SetFocus
            Exit Sub
        End If
    
        If Not lblres.Caption = "0" And Trim(lblres.Caption) _
                <> Trim(txtMemId.Text) Then
            MsgBox "这本书已经被" & lblres.Caption & "预定", _

⌨️ 快捷键说明

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