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

📄 系统设置.frm

📁 其中包含比较详细的软件工程的概要设计说明书、详细设计说明书、系统需求规格说明书、项目开发计划书、软件工程课程设计报告、项目可行性研究报告
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 系统设置 
   Caption         =   "图书管理系统"
   ClientHeight    =   2610
   ClientLeft      =   5880
   ClientTop       =   3480
   ClientWidth     =   4635
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   2610
   ScaleWidth      =   4635
   Begin VB.TextBox TxtLenttime 
      Height          =   285
      Left            =   1200
      TabIndex        =   3
      Top             =   1320
      Width           =   3015
   End
   Begin VB.TextBox Txtbookcount 
      Height          =   285
      Left            =   1200
      TabIndex        =   2
      Top             =   840
      Width           =   3015
   End
   Begin VB.TextBox Txtreaderid 
      Height          =   285
      Left            =   1200
      TabIndex        =   1
      Top             =   360
      Width           =   3015
   End
   Begin VB.CommandButton Command7 
      Caption         =   "更改"
      Height          =   375
      Left            =   1920
      TabIndex        =   0
      Top             =   1920
      Width           =   855
   End
   Begin VB.Label Label18 
      AutoSize        =   -1  'True
      Caption         =   "借阅时间"
      Height          =   180
      Left            =   240
      TabIndex        =   6
      Top             =   1320
      Width           =   720
   End
   Begin VB.Label Label19 
      AutoSize        =   -1  'True
      Caption         =   "借书本数"
      Height          =   180
      Left            =   240
      TabIndex        =   5
      Top             =   840
      Width           =   720
   End
   Begin VB.Label Label20 
      AutoSize        =   -1  'True
      Caption         =   "读者号码"
      Height          =   180
      Left            =   240
      TabIndex        =   4
      Top             =   360
      Width           =   720
   End
End
Attribute VB_Name = "系统设置"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command7_Click()
    On Error GoTo ERR
    Dim rsSysRec As ADODB.Recordset
    
    If de.rsSysRecord.State = 0 Then de.SysRecord
    Set rsSysRec = de.rsSysRecord
    
    '读者号没有输入
    If Trim(Txtreaderid) = "" Then MsgBox "请您输入读者号"
    '读者号不存在
    rsSysRec.Filter = "id = '" + Txtreaderid + "'"
    If rsSysRec.RecordCount = 0 Then MsgBox "此读者号不存在!": Txtreaderid.SetFocus: ERR.Raise 3001
    '书本数输入不正确,判断能否输入字母
    If Not Len(CStr(Val(Txtbookcount))) = Len(Txtbookcount) Or Val(Txtbookcount) = 0 Then MsgBox "请输入正确的书本数!": Txtbookcount.SetFocus: ERR.Raise 3001
    '借阅时间输入不正确
    If Not Len(CStr(Val(TxtLenttime))) = Len(TxtLenttime) Or Val(TxtLenttime) = 0 Then MsgBox "请输入正确的借阅时间!": TxtLenttime.SetFocus: ERR.Raise 3001
    '小于1本书,大于10本书,为非法输入
    If Txtbookcount < 1 Or Txtbookcount > 10 Then MsgBox "借书本数范围:(1 - 10)!": Txtbookcount.SetFocus: ERR.Raise 3001
    '小于1天,大于60天,为非法输入
    If TxtLenttime < 1 Or TxtLenttime > 60 Then MsgBox "借阅时间范围:(1 - 60)!": TxtLenttime.SetFocus: ERR.Raise 3001
    '终于可以更改记录了
    With rsSysRec
        .Filter = "id = '" + Trim(Txtreaderid) + "'"
        !maxblnum = Txtbookcount
        !maxbldays = TxtLenttime
        .Update
        .Filter = 0
        MsgBox "此读者的记录信息已更改!"
    End With
ERR:
    If ERR.Number = 3001 Then Exit Sub
End Sub

Private Sub Form_Unload(Cancel As Integer)
    系统操作.Show
End Sub

⌨️ 快捷键说明

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