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

📄 main_jcxx_dzlbsz.frm

📁 图书综合管理系统 VB毕业设计 原代码+论文
💻 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 main_jcxx_dzlbsz 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "基础信息管理-【读者类别管理】"
   ClientHeight    =   3660
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7290
   Icon            =   "main_jcxx_dzlbsz.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3660
   ScaleWidth      =   7290
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   0
      Top             =   3165
      Visible         =   0   'False
      Width           =   2025
      _ExtentX        =   3572
      _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=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=NBooks"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "NBooks"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from dzlbb"
      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
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "main_jcxx_dzlbsz.frx":0442
      Height          =   1185
      Left            =   45
      TabIndex        =   16
      Top             =   2415
      Width           =   7200
      _ExtentX        =   12700
      _ExtentY        =   2090
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      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     =   4
      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
      BeginProperty Column02 
         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 Column03 
         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     =   1260.284
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1890.142
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   2280.189
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame1 
      Caption         =   "读者类别信息"
      Height          =   1665
      Left            =   45
      TabIndex        =   0
      Top             =   60
      Width           =   7200
      Begin VB.TextBox Text2 
         Height          =   285
         Left            =   2220
         TabIndex        =   14
         Top             =   1215
         Width           =   4665
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   285
         Left            =   2220
         TabIndex        =   13
         Top             =   810
         Width           =   1140
      End
      Begin VB.ComboBox Combo2 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "main_jcxx_dzlbsz.frx":0457
         Left            =   4755
         List            =   "main_jcxx_dzlbsz.frx":0464
         TabIndex        =   11
         Text            =   "一年"
         Top             =   810
         Width           =   2115
      End
      Begin VB.ComboBox Combo1 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "main_jcxx_dzlbsz.frx":047C
         Left            =   2220
         List            =   "main_jcxx_dzlbsz.frx":048C
         TabIndex        =   10
         Text            =   "A类"
         Top             =   390
         Width           =   4665
      End
      Begin VB.Label Label4 
         Caption         =   "备    注:"
         Height          =   195
         Left            =   1305
         TabIndex        =   15
         Top             =   1260
         Width           =   1410
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "/年"
         ForeColor       =   &H00FF0000&
         Height          =   270
         Left            =   3390
         TabIndex        =   12
         Top             =   870
         Width           =   615
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "收费标准:                  期    限:                       "
         ForeColor       =   &H000000FF&
         Height          =   240
         Left            =   1305
         TabIndex        =   9
         Top             =   870
         Width           =   5310
      End
      Begin VB.Image Image1 
         Height          =   810
         Left            =   300
         Picture         =   "main_jcxx_dzlbsz.frx":04A4
         Stretch         =   -1  'True
         Top             =   330
         Width           =   765
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "类别名称:                      "
         ForeColor       =   &H000000FF&
         Height          =   210
         Left            =   1305
         TabIndex        =   1
         Top             =   465
         Width           =   990
      End
   End
   Begin VB.Frame Frame2 
      Height          =   675
      Left            =   45
      TabIndex        =   2
      Top             =   1680
      Width           =   4875
      Begin VB.CommandButton CmdAdd 
         Caption         =   "添加"
         Height          =   360
         Left            =   75
         TabIndex        =   6
         Top             =   210
         Width           =   1095
      End
      Begin VB.CommandButton CmdDelete 
         Caption         =   "删除"
         Height          =   360
         Left            =   2475
         TabIndex        =   5
         Top             =   210
         Width           =   1095
      End
      Begin VB.CommandButton CmdSave 
         Caption         =   "保存"
         Height          =   360
         Left            =   1275
         TabIndex        =   4
         Top             =   210
         Width           =   1095
      End
      Begin VB.CommandButton CmdEsc 
         Caption         =   "取消"
         Height          =   360
         Left            =   3675
         TabIndex        =   3
         Top             =   210
         Width           =   1095
      End
   End
   Begin VB.Frame Frame3 
      Height          =   675
      Left            =   4890
      TabIndex        =   7
      Top             =   1680
      Width           =   2355
      Begin VB.CommandButton CmdExit 
         Caption         =   "退出"
         Height          =   360
         Left            =   210
         TabIndex        =   8
         Top             =   210
         Width           =   1830
      End
   End
End
Attribute VB_Name = "main_jcxx_dzlbsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs1 As New ADODB.Recordset     '声明数据集对象
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Text1.SetFocus     'Text1获得焦点
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Combo2.SetFocus   'Combo2获得焦点
End Sub
Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Text2.SetFocus   'Text2获得焦点
End Sub
Private Sub CmdAdd_Click()     '添加操作
 '设置控件有效或无效
 Combo1.Enabled = True
 Text1.Enabled = True
 Text2.Enabled = True
 Combo2.Enabled = True
 CmdAdd.Enabled = False
 CmdDelete.Enabled = False
 CmdSave.Enabled = True
 CmdEsc.Enabled = True
 Combo1.SetFocus
End Sub
Private Sub CmdSave_Click()     '保存读者类别信息
 '判断读者类别信息是否存在
 rs1.Open "select * from dzlbb where 类别名称='" & Trim(Combo1.text) & "'", Cnn, adOpenKeyset, adLockOptimistic
 If rs1.RecordCount > 0 Then
  MsgBox "此类别已经存在!"
 Else
  If Combo1.text = "" Then
   MsgBox ("请输入类别名称!")
   Combo1.SetFocus
   Exit Sub
  End If
  If Text1.text = "" Then
    MsgBox ("请输入收费标准!")
    Text2.SetFocus
    Exit Sub
  End If
  If Combo2.text = "" Then
    MsgBox ("请输入期限!")
    Combo2.SetFocus
    Exit Sub
  End If
  '添加读者类别信息
  Adodc1.Recordset.AddNew
  Adodc1.Recordset.Fields("类别名称") = Combo1.text
  Adodc1.Recordset.Fields("收费标准") = Val(Text1.text)
  Adodc1.Recordset.Fields("期限") = Combo2.text
  Adodc1.Recordset.Fields("备注") = Text2.text
  Adodc1.Recordset.Update     '更新数据库
   '清空文本框中的数据
  Combo1.text = ""
  Text1.text = ""
  Text2.text = ""
  Combo2.text = ""
  '设置控件有效或无效
  Combo1.Enabled = False
  Text1.Enabled = False
  Text2.Enabled = False
  Combo2.Enabled = False
  CmdSave.Enabled = False
  CmdEsc.Enabled = False
  CmdAdd.Enabled = True
  CmdDelete.Enabled = True
 End If
 rs1.Close
End Sub
Private Sub CmdDelete_Click()     '删除读者类别信息
 On Error Resume Next
 Adodc1.Recordset.Delete
 Adodc1.Recordset.Update
End Sub
Private Sub CmdEsc_Click()     '取消操作
 '清空文本框中的数据
 Combo1.text = ""
 Text1.text = ""
 Text2.text = ""
 Combo2.text = ""
 '设置控件有效或无效
 Combo1.Enabled = False
 Text1.Enabled = False
 Text2.Enabled = False
 Combo2.Enabled = False
 CmdSave.Enabled = False
 CmdEsc.Enabled = False
 CmdAdd.Enabled = True
 CmdDelete.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
  frm_main.Enabled = True
End Sub
Private Sub CmdExit_Click()
 Unload Me
 frm_main.Enabled = True
End Sub



⌨️ 快捷键说明

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