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

📄 inbook.frm

📁 图书管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      ColumnCount     =   8
      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       =   "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 Column03 
         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 Column04 
         DataField       =   "bookpubdate"
         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       =   "bookprice"
         Caption         =   "价格"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         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 Column07 
         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 
         ScrollGroup     =   0
         BeginProperty Column00 
            ColumnWidth     =   1230.236
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   2009.764
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1649.764
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   929.764
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   959.811
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column07 
            Alignment       =   2
            ColumnWidth     =   915.024
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "inbook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public recs As Boolean

Private Sub cmdadd_Click()
  flag = 1
  addeditbook.Show vbModal
End Sub

Private Sub cmdedit_Click()
  flag = 2
  addeditbook.Show vbModal
End Sub

Private Sub cmdok_Click()
  Dim str As String
  str = ""
  If Trim(txtbookid.Text) <> "" Then
     If str = "" Then
        str = "bookid='" & Trim(txtbookid.Text) & "'"
     Else
        str = str & "and bookid='" & Trim(txtbookid.Text) & "'"
     End If
  End If
  If Trim(txtauthor.Text) <> "" Then
     If str = "" Then
        str = "bookauthor='" & Trim(txtauthor.Text) & "'"
     Else
        str = str & "and bookauthor='" & Trim(txtauthor.Text) & "'"
     End If
  End If
  If Trim(txtbookname.Text) <> "" Then
     If str = "" Then
        str = "bookname='" & Trim(txtbookname.Text) & "'"
     Else
        str = str & "and bookname='" & Trim(txtbookname.Text) & "'"
     End If
  End If
  If Trim(txtpubdate.Text) <> "" Then
     If str = "" Then
        str = "bookpubdate='" & Trim(txtpubdate.Text) & "'"
     Else
        str = str & "and bookpubdate='" & Trim(txtpubdate.Text) & "'"
     End If
  End If
  If Trim(txtpub.Text) <> "" Then
     If str = "" Then
        str = "bookpub='" & Trim(txtpub.Text) & "'"
     Else
        str = str & "and bookpub='" & Trim(txtpub.Text) & "'"
     End If
  End If
  If Trim(txtprice.Text) <> "" Then
     If str = "" Then
        str = "bookprice='" & Trim(txtprice.Text) & "'"
     Else
        str = str & "and bookprice='" & Trim(txtprice.Text) & "'"
     End If
  End If
  If str <> "" Then
     Adodc1.RecordSource = "select * from books where " & str
     Adodc1.Refresh
  Else
     Adodc1.RecordSource = "select * from books"
     Adodc1.Refresh
  End If
  recs = Adodc1.Recordset.EOF
  If recs = True Then
     MsgBox "没有任何满足条件的记录!", vbOKOnly + vbExclamation, "信息提示"
  End If
  Call encmd
End Sub

Private Sub cmdomit_Click()
  If MsgBox("真的要删除此本书的信息吗?", vbYesNo, "信息提示") = vbYes Then
     Adodc1.Recordset.Delete
     Adodc1.Refresh
  End If
  recs = Adodc1.Recordset.EOF
  Call encmd
End Sub

Private Sub cmdreset_Click()
  txtbookid = ""
  txtbookauthor = ""
  txtbookname = ""
  txtpubdate = ""
  txtpub = ""
  txtprice = ""
End Sub

Private Sub cmdret_Click()
  Unload Me
End Sub

Private Sub Form_Activate()
  DataGrid1.SetFocus
  Call encmd
  If flag3 = 3 Then
     Frame2.Visible = False
  End If
End Sub

Private Sub Form_Load()
  recs = Adodc1.Recordset.EOF
End Sub

Private Sub encmd()
  If recs = True Then
     cmdedit.Enabled = False
     cmdomit.Enabled = False
  Else
     cmdedit.Enabled = True
     cmdomit.Enabled = True
  End If
End Sub

⌨️ 快捷键说明

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