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

📄 return.frm

📁 一个图书管管理软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form reback 
   Caption         =   "归还"
   ClientHeight    =   1845
   ClientLeft      =   8535
   ClientTop       =   5595
   ClientWidth     =   3075
   LinkTopic       =   "Form1"
   ScaleHeight     =   1845
   ScaleWidth      =   3075
   Begin VB.CommandButton Command1 
      Caption         =   "还书"
      Height          =   315
      Left            =   840
      TabIndex        =   2
      Top             =   1365
      Width           =   1065
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   1530
      TabIndex        =   1
      Text            =   "Text2"
      Top             =   795
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   1530
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   315
      Width           =   1215
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "图书编号"
      Height          =   180
      Left            =   210
      TabIndex        =   4
      Top             =   795
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "读者证号"
      Height          =   180
      Left            =   210
      TabIndex        =   3
      Top             =   315
      Width           =   720
   End
End
Attribute VB_Name = "reback"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private strSql As String
Private rs As ADODB.Recordset
Private Sub Command1_Click()
strSql = "select * from book where bookid='" & Text2.Text & "'"
Call getRS(rs, strSql)
If rs.RecordCount = 0 Then
    MsgBox "没有该图书"
    Exit Sub
End If

strSql = "select bookstate from book where bookid='" & Text2.Text & "' and bookstate='借出'"
Call getRS(rs, strSql)
If rs.RecordCount = 1 Then




strSql = "update booktran set returndate='" & Now & "' where bookid='" & Text2.Text & "'"
cn.Execute (strSql)

strSql = "update book set bookstate='在库' where bookid='" & Text2.Text & "'"
cn.Execute (strSql)
MsgBox "还书成功"

Else
MsgBox "没有该书借阅记录"
End If
End Sub

Private Sub Command2_Click()
strSql = "select * from book where bookid='" & Text2.Text & "'"
Call getRS(rs, strSql)

End Sub

Private Sub Form_Load()
Call CnToDB
Text1.Text = ""
Text2.Text = ""
End Sub


⌨️ 快捷键说明

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