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

📄 qubook.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 qubook 
   Caption         =   "图书查找"
   ClientHeight    =   5955
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   8565
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5955
   ScaleWidth      =   8565
   Begin VB.CommandButton cmd_back 
      Caption         =   "返回"
      Height          =   495
      Left            =   4680
      TabIndex        =   10
      Top             =   5400
      Width           =   1815
   End
   Begin VB.CommandButton cmd_list 
      Caption         =   "列借书人"
      Height          =   495
      Left            =   1800
      TabIndex        =   9
      Top             =   5400
      Width           =   1695
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "qubook.frx":0000
      Height          =   2055
      Left            =   480
      TabIndex        =   8
      Top             =   3000
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   3625
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         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       =   ""
         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
      EndProperty
   End
   Begin VB.Frame Frame1 
      Caption         =   "设置条件"
      Height          =   1695
      Left            =   480
      TabIndex        =   0
      Top             =   960
      Width           =   7575
      Begin VB.CommandButton cmd_again 
         Caption         =   "重置"
         Height          =   375
         Left            =   3840
         TabIndex        =   7
         Top             =   1200
         Width           =   1695
      End
      Begin VB.CommandButton cmd_ok 
         Caption         =   "确定"
         Height          =   375
         Left            =   1320
         TabIndex        =   6
         Top             =   1200
         Width           =   1695
      End
      Begin VB.TextBox txtpublish 
         Height          =   375
         Left            =   6000
         TabIndex        =   5
         Text            =   "Text5"
         Top             =   720
         Width           =   1335
      End
      Begin VB.TextBox txtauthor 
         Height          =   375
         Left            =   4680
         TabIndex        =   4
         Text            =   "Text4"
         Top             =   720
         Width           =   1095
      End
      Begin VB.TextBox txtyesno 
         Height          =   375
         Left            =   3840
         TabIndex        =   3
         Text            =   "Text3"
         Top             =   720
         Width           =   615
      End
      Begin VB.TextBox txtname 
         Height          =   375
         Left            =   1920
         TabIndex        =   2
         Text            =   "Text2"
         Top             =   720
         Width           =   1575
      End
      Begin VB.TextBox txtno 
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   720
         Width           =   1335
      End
      Begin VB.Label Label5 
         Caption         =   "出 版 社"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   6000
         TabIndex        =   15
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label4 
         Caption         =   "作 者"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4680
         TabIndex        =   14
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "借否"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3840
         TabIndex        =   13
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "书  名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1920
         TabIndex        =   12
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "图书编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   360
         Width           =   1335
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   480
      Top             =   240
      Visible         =   0   'False
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   873
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\library\lib.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\library\lib.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from book"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "qubook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_ok_click()
Dim str As String
If Trim(txtno.Text) <> "" Then
If str = "" Then
str = "图书编号='" + Trim(txtno.Text) + "'"
Else
str = str + "and 图书编号='" + Trim(txtno.Text) + "'"
End If
End If
If Trim(txtname.Text) <> "" Then
If str = "" Then
str = "书名='" + Trim(txtname.Text) + "'"
End If
End If
If Trim(txtauthor.Text) <> "" Then
If str = "" Then
str = "作者='" + Trim(txtauthor.Text) + "'"
Else
str = str + "and 作者='" + Trim(txtauthor.Text) + "'"
Else
str = str + "and 出版社='" + Trim(txtpublish.Text) + "'"
End If
End If
If Trim(txtyesno.Text) <> "" Then
If str = "" Then
str = "借否='" + Trim(txtyesno.Text) + "'"
Else
str = str + "and 借否='" + Trim(txtyesno.Text) + "'"
End If
End If
If str <> "" Then
Adodc1.RecordSource = "select * from book where" + str
Adodc1.Refresh
Else
Adodc1.RecordSource = "select * from book"
Adodc1.Refresh
End If
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有任何满足条件的记录", vbOKOnly, "信息提示"
End If
Call encomm
End Sub
Private Sub cmd_again_click()
txtno.Text = ""
txtname.Text = ""
txtyesno.Text = ""
txtauthor.Text = ""
txtpublish.Text = ""
End Sub

Private Sub cmd_list_click()
Dim txtsql As String
If Adodc1.Recordset.Fields("借否") = "借" Then
no = Trim(Adodc1.Recordset.Fields("图书编号"))
txtsql = "select * from borrow where 图书编号='" + no + "'"
Set rs = exesql(txtsql)
If rs.RecordCount = 0 Then
MsgBox "该图书没有借书记录", vbOKOnly, "信息提示"
Else
MsgBox "借书人:" + Trim(rs.Fields("姓名")) + "单位:" + Trim(rs.Fields("单位")), vbOKOnly, "查找结果"
End If
rs.Close
Else
MsgBox "该书没有外借,不能显示借书人", vbOKOnly, "信息提示"
End If
End Sub
Private Sub cmd_back_click()
Unload Me
End Sub
Private Sub form_activate()
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
Call encomm
End Sub
Private Sub encomm()
If Adodc1.Recordset.RecordCount = 0 Then
cmd_ok.Enabled = True
End If
End Sub












































⌨️ 快捷键说明

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