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

📄 qubook.frm

📁 图书管理系统 内有13个窗体 (附送代码) 功能包括查询 添加删除 修改
💻 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    =   6135
   ClientLeft      =   60
   ClientTop       =   465
   ClientWidth     =   8295
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6135
   ScaleWidth      =   8295
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Caption         =   "设置条件"
      Height          =   1815
      Left            =   360
      TabIndex        =   3
      Top             =   720
      Width           =   7575
      Begin VB.CommandButton cmd_again 
         Caption         =   "重置"
         Height          =   375
         Left            =   4080
         TabIndex        =   10
         Top             =   1320
         Width           =   1815
      End
      Begin VB.CommandButton cmd_ok 
         Caption         =   "确定"
         Height          =   375
         Left            =   1200
         TabIndex        =   9
         Top             =   1320
         Width           =   1815
      End
      Begin VB.TextBox txtbulish 
         Height          =   375
         Left            =   5520
         MaxLength       =   20
         TabIndex        =   8
         Top             =   840
         Width           =   1935
      End
      Begin VB.TextBox txtauthor 
         Height          =   375
         Left            =   4320
         MaxLength       =   16
         TabIndex        =   7
         Top             =   840
         Width           =   1095
      End
      Begin VB.TextBox txtyesno 
         Height          =   375
         Left            =   3480
         MaxLength       =   2
         TabIndex        =   6
         Top             =   840
         Width           =   615
      End
      Begin VB.TextBox txtname 
         Height          =   375
         Left            =   1440
         MaxLength       =   40
         TabIndex        =   5
         Top             =   840
         Width           =   1815
      End
      Begin VB.TextBox txtno 
         Height          =   375
         Left            =   240
         MaxLength       =   4
         TabIndex        =   4
         Top             =   840
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "出版社"
         Height          =   495
         Left            =   5520
         TabIndex        =   15
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "作者"
         Height          =   495
         Left            =   4320
         TabIndex        =   14
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "借否"
         Height          =   495
         Left            =   3480
         TabIndex        =   13
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "书名"
         Height          =   495
         Left            =   1440
         TabIndex        =   12
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "图书编号"
         Height          =   495
         Left            =   240
         TabIndex        =   11
         Top             =   480
         Width           =   1095
      End
   End
   Begin VB.CommandButton cmd_back 
      Caption         =   "返回"
      Height          =   495
      Left            =   4560
      TabIndex        =   2
      Top             =   5400
      Width           =   1695
   End
   Begin VB.CommandButton cmd_list 
      Caption         =   "列借书人"
      Height          =   495
      Left            =   1560
      TabIndex        =   1
      Top             =   5400
      Width           =   1695
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "qubook.frx":0000
      Height          =   2535
      Left            =   360
      TabIndex        =   0
      Top             =   2640
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   4471
      _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 MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   960
      Top             =   120
      Visible         =   0   'False
      Width           =   5895
      _ExtentX        =   10398
      _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         =   $"qubook.frx":0015
      OLEDBString     =   $"qubook.frx":00A7
      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 Command1_Click()

End Sub

Private Sub cmd_again_Click()
txtno.Text = ""
txtname.Text = ""
txtyesno.Text = ""
txtauthor.Text = ""
txtbulish.Text = ""
cmd_ok.Enabled = True

End Sub

Private Sub cmd_back_Click()
Unload Me
End Sub

Private Sub cmd_list_Click()
Dim txtsql As String
Dim rs As New ADODB.Recordset
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_ok_Click()
Dim str As String
str = ""
If Trim(txtno.Text) <> "" Then
    If str = "" Then
        str = "图书编号='" + Trim(txtno.Text) + "'"
    Else
        sr = str + "and 图书编号='" + Trim(txtno.Text) + "'"
    End If
End If
If Trim(txtname.Text) <> "" Then
    If str = "" Then
     str = "书名='" + Trim(txtname.Text) + "'"
    Else
      str = str + "and 书名='" + 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) + "'"
    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 Form_Activate()
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
Call encomm
End Sub

Private Sub encomm()
If Adodc1.Recordset.RecordCount = 0 Then
cmd_ok.Enabled = False
Else
cmd_ok.Enabled = True
End If

End Sub

⌨️ 快捷键说明

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