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

📄 edbook.frm

📁 一个用VB编写的小型图书管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         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 Column05 
         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 Column06 
         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 Column07 
         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 
            ColumnWidth     =   1635.024
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1635.024
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1904.882
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   360
      Top             =   0
      Visible         =   0   'False
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      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=Lib.mdb;Persist Security Info=False;"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=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 = "edbook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Dim str As String
  str = ""
  If Trim(Text1(0).Text) <> "" Then
    If str = "" Then
       str = "图书编号='" + Trim(Text1(0).Text) + "'"
    Else
       str = str + " and 图书编号='" + Trim(Text1(0).Text) + "'"
    End If
  End If
  If Trim(Text1(1).Text) <> "" Then
    If str = "" Then
       str = "书名='" + Trim(Text1(1).Text) + "'"
    Else
       str = str + " and 书名='" + Trim(Text1(1).Text) + "'"
    End If
  End If
  If Trim(Text1(2).Text) <> "" Then
    If str = "" Then
       str = "作者='" + Trim(Text1(2).Text) + "'"
    Else
       str = str + " and 作者='" + Trim(Text1(2).Text) + "'"
    End If
  End If
  If Trim(Text1(3).Text) <> "" Then
    If str = "" Then
       str = "出版社='" + Trim(Text1(3).Text) + "'"
    Else
       str = str + " and 出版社='" + Trim(Text1(3).Text) + "'"
    End If
  End If
  If Trim(Text1(4).Text) <> "" Then
    If str = "" Then
       str = "借否='" + Trim(Text1(4).Text) + "'"
    Else
       str = str + " and 借否='" + Trim(Text1(4).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
  recs = Adodc1.Recordset.RecordCount
  If recs = 0 Then
    MsgBox "没有任何满足条件的记录", vbOKOnly, "信息提示"
  End If
  Call encomm
End Sub

Private Sub Command2_Click()
  Text1(0).Text = ""
  Text1(1).Text = ""
  Text1(2).Text = ""
  Text1(3).Text = ""
  Text1(4).Text = ""
End Sub

Private Sub encomm()
  If recs = 0 Then
    Command4.Enabled = False
    Command5.Enabled = False
  Else
    Command4.Enabled = True
    Command5.Enabled = True
  End If
End Sub

Private Sub Command3_Click()
  flag = 1
  edbook1.Show vbModal
End Sub

Private Sub Command4_Click()
  flag = 2
  edbook1.Show vbModal
End Sub

Private Sub Command5_Click()
  If MsgBox("真的要删除[" + Trim(Adodc1.Recordset.Fields("书名")) + "]吗?", vbYesNo, "信息提示") = vbYes Then
    Adodc1.Recordset.Delete
    recs = recs - 1
    Call encomm
  End If
End Sub

Private Sub Command6_Click()
Unload Me
End Sub




Private Sub Form_Activate()
  DataGrid1.SetFocus
  Call encomm
End Sub

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

⌨️ 快捷键说明

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