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

📄 lookbook.frm

📁 图书管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form lookbook 
   Caption         =   "书籍信息查询"
   ClientHeight    =   7800
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8295
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   9.75
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   7800
   ScaleWidth      =   8295
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame3 
      Caption         =   "预约"
      Height          =   1455
      Left            =   120
      TabIndex        =   9
      Top             =   6120
      Width           =   3855
      Begin VB.CommandButton cmdbook 
         Caption         =   "预约"
         Height          =   495
         Left            =   2760
         TabIndex        =   12
         Top             =   840
         Width           =   855
      End
      Begin VB.TextBox txtreaderid 
         Height          =   375
         Left            =   1560
         TabIndex        =   11
         Top             =   360
         Width           =   2055
      End
      Begin VB.Label Label2 
         Caption         =   "请输入借书证号"
         Height          =   375
         Left            =   120
         TabIndex        =   10
         Top             =   480
         Width           =   1575
      End
   End
   Begin VB.CommandButton cmdret 
      Caption         =   "返回"
      Height          =   495
      Left            =   5520
      TabIndex        =   5
      Top             =   6600
      Width           =   855
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   6600
      Top             =   6000
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "driver={sql server};server=localhost;database=library_mis;uid=sa;pwd="
      OLEDBString     =   "driver={sql server};server=localhost;database=library_mis;uid=sa;pwd="
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select bookprice from books"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame2 
      Caption         =   "查询结果"
      Height          =   4215
      Left            =   120
      TabIndex        =   3
      Top             =   1680
      Width           =   8055
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "lookbook.frx":0000
         Height          =   3735
         Left            =   120
         TabIndex        =   4
         Top             =   360
         Width           =   7815
         _ExtentX        =   13785
         _ExtentY        =   6588
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   6
         BeginProperty Column00 
            DataField       =   "bookid"
            Caption         =   "图书编号"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "bookname"
            Caption         =   "书名"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "bookpub"
            Caption         =   "出版社"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "bookauthor"
            Caption         =   "作者"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "borrow"
            Caption         =   "借否"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column05 
            DataField       =   "booked"
            Caption         =   "预约否"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
            BeginProperty Column02 
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   1289.764
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   764.787
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   884.976
            EndProperty
         EndProperty
      End
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "lookbook.frx":0015
      Left            =   1680
      List            =   "lookbook.frx":0022
      TabIndex        =   1
      Top             =   720
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "查询信息设置"
      Height          =   1215
      Left            =   480
      TabIndex        =   0
      Top             =   240
      Width           =   7095
      Begin VB.CommandButton cmdok 
         Caption         =   "确定"
         Height          =   375
         Left            =   6000
         TabIndex        =   8
         Top             =   480
         Width           =   615
      End
      Begin VB.TextBox txtinfo 
         Height          =   285
         Left            =   3480
         TabIndex        =   7
         Top             =   480
         Width           =   2055
      End
      Begin VB.Label Label1 
         Caption         =   "信息输入"
         Height          =   255
         Index           =   1
         Left            =   2520
         TabIndex        =   6
         Top             =   600
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "查询分类"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   975
      End
   End
End
Attribute VB_Name = "lookbook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim txtsql, msgtext As String
Dim mrc As ADODB.Recordset

Private Sub cmdbook_Click()
  If Adodc1.Recordset.Fields("borrow") = "n" Then
     MsgBox "本书未借出,不用预约!", vbOKOnly, "信息提示"
     Exit Sub
  End If
  txtsql = "select * from booked"
  Set mrc = ExecuteSQL(txtsql, msgtext)
  mrc.AddNew
  mrc.Fields("bookid") = Adodc1.Recordset.Fields("bookid")
  mrc.Fields("readerid") = Val(Trim(txtreaderid.Text))
  mrc.Fields("bookdate") = Date
  mrc.Fields("booked") = "y"
  mrc.Update
  Adodc1.Recordset.Fields("booked") = "y"
  Adodc1.Recordset.Update
  MsgBox "预约成功!", vbOKOnly, "信息提示"
End Sub

Private Sub cmdok_Click()
  If Combo1.Text = "" Then
     MsgBox "请选择查询设置的种类!", vbOKOnly, "信息提示"
     Exit Sub
  End If
  If txtinfo.Text = "" Then
     MsgBox "请输入查询信息!", vbOKOnly, "信息提示"
     Exit Sub
  End If
  If Combo1.Text = "书名" Then
     Adodc1.RecordSource = "select * from books where bookname like '%" & txtinfo.Text & "%'"
     Adodc1.Refresh
     If Adodc1.Recordset.EOF = True Then
        MsgBox "没有检索到任何相关的信息!", vbOKOnly, "信息提示"
        txtinfo.SetFocus
        txtinfo.Text = ""
        Exit Sub
     Else
        'Adodc1.Refresh
        Exit Sub
     End If
     'Adodc1.Recordset.Close
  End If
  If Combo1.Text = "作者" Then
     Adodc1.RecordSource = "select * from books where bookauthor like '%" & txtinfo.Text & "%'"
     Adodc1.Refresh
     If Adodc1.Recordset.EOF = True Then
        MsgBox "没有检索到任何相关的信息", vbOKOnly, "信息提示"
        txtinfo.SetFocus
        txtinfo.Text = ""
        Exit Sub
     Else
        'Adodc1.Refresh
        Exit Sub
     End If
     'Adodc1.Recordset.Close
  End If
  If Combo1.Text = "出版社" Then
     Adodc1.RecordSource = "select * from books where bookpub like '%" & txtinfo.Text & "%'"
     Adodc1.Refresh
     If Adodc1.Recordset.EOF = True Then
        MsgBox "没有检索到任何相关的信息", vbOKOnly, "信息提示"
        txtinfo.SetFocus
        txtinfo.Text = ""
        Exit Sub
     Else
        'Adodc1.Refresh
        Exit Sub
     End If
     'Adodc1.Recordset.Close
  End If
End Sub

Private Sub cmdret_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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