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

📄 frmupdatebook.frm

📁 java开发的一个图书馆管理软件
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmUpdateBook 
   Caption         =   "正在修改图书"
   ClientHeight    =   4275
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8775
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   4275
   ScaleWidth      =   8775
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdClose 
      Caption         =   "退出"
      Height          =   495
      Left            =   6840
      TabIndex        =   18
      Top             =   3600
      Width           =   1335
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "保存"
      Height          =   495
      Left            =   5400
      TabIndex        =   17
      Top             =   3600
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "书籍信息"
      Height          =   3255
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   8535
      Begin MSComCtl2.DTPicker dtpRigDate 
         Height          =   375
         Left            =   5040
         TabIndex        =   16
         Top             =   1560
         Width           =   3135
         _ExtentX        =   5530
         _ExtentY        =   661
         _Version        =   393216
         Format          =   75956225
         CurrentDate     =   37828
      End
      Begin VB.TextBox txtWriter 
         Height          =   375
         Left            =   960
         TabIndex        =   14
         Top             =   1560
         Width           =   3015
      End
      Begin VB.TextBox txtBookConcern 
         Height          =   375
         Left            =   5040
         TabIndex        =   11
         Top             =   960
         Width           =   3375
      End
      Begin VB.TextBox txtPage 
         Height          =   375
         Left            =   960
         TabIndex        =   9
         Top             =   2160
         Width           =   3015
      End
      Begin VB.TextBox txtPrice 
         Height          =   375
         Left            =   5040
         TabIndex        =   8
         Top             =   2160
         Width           =   3255
      End
      Begin VB.ComboBox cboType 
         Height          =   300
         Left            =   960
         TabIndex        =   6
         Top             =   960
         Width           =   3015
      End
      Begin VB.TextBox txtBookName 
         Height          =   375
         Left            =   5040
         TabIndex        =   3
         Top             =   360
         Width           =   3375
      End
      Begin VB.TextBox txtBookID 
         BackColor       =   &H00FFFFFF&
         Enabled         =   0   'False
         Height          =   375
         Left            =   960
         TabIndex        =   1
         Top             =   360
         Width           =   3015
      End
      Begin VB.Label Label3 
         Caption         =   "登记日期:"
         Height          =   255
         Left            =   4200
         TabIndex        =   15
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "作者姓名:"
         Height          =   375
         Left            =   120
         TabIndex        =   13
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "出版社:"
         Height          =   255
         Left            =   4320
         TabIndex        =   12
         Top             =   1080
         Width           =   735
      End
      Begin VB.Label Label22 
         Caption         =   "书籍页码:"
         Height          =   255
         Left            =   120
         TabIndex        =   10
         Top             =   2280
         Width           =   855
      End
      Begin VB.Label Label26 
         Caption         =   "书籍价格:"
         Height          =   255
         Left            =   4200
         TabIndex        =   7
         Top             =   2280
         Width           =   855
      End
      Begin VB.Label Label24 
         Caption         =   "书籍类别:"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label25 
         Caption         =   "书籍名称:"
         Height          =   255
         Left            =   4080
         TabIndex        =   4
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label27 
         Caption         =   "书籍编号:"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   480
         Width           =   975
      End
   End
End
Attribute VB_Name = "FrmUpdateBook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub cmdClose_Click()
FrmBookManage.Adodc1.Refresh
Unload Me
End Sub

Private Sub cmdSave_Click()
    g_strSql = "select * from bookInfo where 书籍编号='" & txtBookID.Text & "'"
    Set g_rs = g_db.OpenRecordset(g_strSql)
    g_rs.Edit
       '设置记录的字段值
    
    g_rs!书籍名称 = txtBookName.Text
    g_rs!类别代码 = Mid(cboType.Text, 1, 1)
    g_rs!出版社 = txtBookConcern.Text
    g_rs!作者姓名 = txtWriter.Text
    g_rs!书籍价格 = txtPrice.Text
    g_rs!书籍页码 = txtPage.Text
    g_rs!登记日期 = dtpRigDate.Value
    g_rs!是否借出 = False
    
    ' 保存修改!!!
    g_rs.Update
   
    Set g_rs = Nothing
    MsgBox "保存修改完毕!", vbOKOnly, "提示"
    FrmBookManage.Adodc1.Refresh
    Unload Me
End Sub

Private Sub Form_Load()
dtpRigDate.Value = Date
Set g_rs = g_db.OpenRecordset("bookType", dbOpenTable)
        cboType.Clear
        If g_rs.RecordCount > 0 Then
           g_rs.MoveFirst
           Do While Not g_rs.EOF
              cboType.AddItem g_rs!类别代码 + "-" + g_rs!书籍类别
              g_rs.MoveNext
           Loop
        End If
    Set g_rs = Nothing

FrmBookManage.DataGrid1.Col = 0
txtBookID.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 1
txtBookName.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 2
cboType.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 3
txtBookConcern.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 4
txtWriter.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 5
txtPrice.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 6
txtPage.Text = FrmBookManage.DataGrid1.Text
FrmBookManage.DataGrid1.Col = 7
dtpRigDate.Value = FrmBookManage.DataGrid1.Text

Set g_rs = g_db.OpenRecordset("bookType", dbOpenTable)
       
        If g_rs.RecordCount > 0 Then
           g_rs.MoveFirst
           Do While Not g_rs.EOF
              If cboType.Text = g_rs!书籍类别 Then
                   cboType.Text = g_rs!类别代码 + "-" + g_rs!书籍类别
              End If
              g_rs.MoveNext
           Loop
        End If
Set g_rs = Nothing

End Sub

⌨️ 快捷键说明

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