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

📄 book.frm

📁 是有关于音像制品的管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form book 
   BackColor       =   &H00C0FFFF&
   Caption         =   "预定信息管理"
   ClientHeight    =   2805
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8940
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   Picture         =   "book.frx":0000
   ScaleHeight     =   2805
   ScaleWidth      =   8940
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox bookNO 
      Height          =   375
      Left            =   5040
      TabIndex        =   8
      Top             =   600
      Width           =   1695
   End
   Begin VB.TextBox bookName 
      Height          =   375
      Left            =   5040
      TabIndex        =   7
      Top             =   1080
      Width           =   3375
   End
   Begin VB.ComboBox bookTypename 
      Height          =   300
      Left            =   5040
      TabIndex        =   6
      Top             =   1560
      Width           =   3375
   End
   Begin VB.TextBox readerNO 
      Height          =   375
      Left            =   1560
      TabIndex        =   3
      Top             =   720
      Width           =   1935
   End
   Begin VB.TextBox readerName 
      Height          =   375
      Left            =   1560
      TabIndex        =   2
      Top             =   1560
      Width           =   1935
   End
   Begin VB.CommandButton cancel 
      Caption         =   "返   回"
      Height          =   375
      Left            =   6480
      TabIndex        =   1
      Top             =   2160
      Width           =   1215
   End
   Begin VB.CommandButton addBookOK 
      Caption         =   "确认预定"
      Height          =   375
      Left            =   1800
      TabIndex        =   0
      Top             =   2160
      Width           =   1095
   End
   Begin VB.Label Label4 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "产品编号:"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   4080
      TabIndex        =   11
      Top             =   600
      Width           =   975
   End
   Begin VB.Label Label5 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "产品名称:"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   4080
      TabIndex        =   10
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label Label7 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "产品类型:"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   4080
      TabIndex        =   9
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "会员编号:"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   600
      TabIndex        =   5
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label2 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "会员姓名:"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   600
      TabIndex        =   4
      Top             =   1560
      Width           =   975
   End
End
Attribute VB_Name = "book"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub addBookOK_Click()
    Dim rs As New ADODB.Recordset
    Dim sql As String
    sql = "select * from book"
    Dim sql2 As String
    sql2 = "select * from book where bookNO ='" & bookNO.Text & "'"
    
    If Trim(readerNO.Text) = "" Or Trim(readerName.Text) = "" Or _
        Trim(bookNO.Text) = "" Or Trim(bookName.Text) = "" Or _
        Trim(bookTypename.Text) = "" Then
        MsgBox "预定信息录入不能为空!", vbOKOnly
    Else
       Set rs = TransactSQL(sql2)
       If rs.EOF = False Then
          MsgBox "所给编号产品已经预定,请核对!", vbOKOnly, "提示"
          rs.Close
       Else
         Set rs = TransactSQL(sql)
          rs.AddNew                '添加新纪录
            rs.Fields(0) = Trim(readerNO.Text)
            rs.Fields(1) = Trim(readerName.Text)
            rs.Fields(2) = Trim(bookNO.Text)
            rs.Fields(3) = Trim(bookName.Text)
            rs.Fields(4) = Trim(bookTypename.Text)
            rs.Update
         MsgBox "预定信息添加成功!", vbOKOnly
         rs.Close
 
        End If
    End If
End Sub

Private Sub cancel_Click()
    Unload Me
End Sub
Private Sub Form_Load()
    bookTypename.AddItem "电影", 0
    bookTypename.AddItem "相声", 1
    bookTypename.AddItem "小品", 2
    bookTypename.AddItem "电视剧", 3
    bookTypename.AddItem "专辑", 4
End Sub

⌨️ 快捷键说明

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