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

📄 buy.frm

📁 是有关于音像制品的管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form buy 
   BackColor       =   &H00FFC0FF&
   Caption         =   "购买信息管理"
   ClientHeight    =   3150
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7650
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   Picture         =   "buy.frx":0000
   ScaleHeight     =   3150
   ScaleWidth      =   7650
   StartUpPosition =   3  '窗口缺省
   Begin VB.ComboBox bookTypename 
      Height          =   300
      Left            =   4560
      TabIndex        =   9
      Top             =   1920
      Width           =   2775
   End
   Begin VB.TextBox bookName 
      Height          =   375
      Left            =   4560
      TabIndex        =   8
      Top             =   1320
      Width           =   2775
   End
   Begin VB.TextBox bookNO 
      Height          =   375
      Left            =   4560
      TabIndex        =   7
      Top             =   840
      Width           =   1695
   End
   Begin VB.TextBox readerName 
      Height          =   375
      Left            =   1200
      TabIndex        =   3
      Top             =   1800
      Width           =   1935
   End
   Begin VB.TextBox readerNO 
      Height          =   375
      Left            =   1200
      TabIndex        =   2
      Top             =   960
      Width           =   1935
   End
   Begin VB.CommandButton addBuyOK 
      Caption         =   "确认购买"
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Top             =   2520
      Width           =   1095
   End
   Begin VB.CommandButton cancel 
      Caption         =   "返   回"
      Height          =   375
      Left            =   5160
      TabIndex        =   0
      Top             =   2520
      Width           =   1215
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "产品信息:"
      Height          =   255
      Left            =   3600
      TabIndex        =   13
      Top             =   240
      Width           =   1695
   End
   Begin VB.Label Label7 
      BackColor       =   &H00FFC0FF&
      BackStyle       =   0  'Transparent
      Caption         =   "产品类型:"
      Height          =   255
      Left            =   3600
      TabIndex        =   12
      Top             =   2040
      Width           =   975
   End
   Begin VB.Label Label5 
      BackColor       =   &H00FFC0FF&
      BackStyle       =   0  'Transparent
      Caption         =   "产品名称:"
      Height          =   255
      Left            =   3600
      TabIndex        =   11
      Top             =   1440
      Width           =   975
   End
   Begin VB.Label Label4 
      BackColor       =   &H00FFC0FF&
      BackStyle       =   0  'Transparent
      Caption         =   "产品编号:"
      Height          =   255
      Left            =   3600
      TabIndex        =   10
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "会员信息:"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   360
      Width           =   1335
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFC0FF&
      BackStyle       =   0  'Transparent
      Caption         =   "会员姓名:"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1800
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFC0FF&
      BackStyle       =   0  'Transparent
      Caption         =   "会员编号:"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   1080
      Width           =   975
   End
End
Attribute VB_Name = "buy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub addBuyOK_Click()
    Dim rs As New ADODB.Recordset
    Dim sql As String
    sql = "select * from buy"
    Dim sql2 As String
    sql2 = "select * from buy where bookNO ='" & bookNO.Text & "'"
    Dim sql3 As String
    sql3 = "select * from books 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(sql)
       If rs.EOF = True Then
           MsgBox "没有该编号的会员信息!", vbOKOnly
       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
            ModifyRdFlag1 = bookNO.Text
            ModifyRdFlag2 = True
            bookList.Show
         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 + -