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

📄 edreader1.frm

📁 很好的图书管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form edreader1 
   Caption         =   "编辑读者记录"
   ClientHeight    =   6000
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6000
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmd_cancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   2640
      TabIndex        =   11
      Top             =   5280
      Width           =   1095
   End
   Begin VB.CommandButton cmd_ok 
      Caption         =   "确定"
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   5280
      Width           =   1095
   End
   Begin VB.TextBox txtdate 
      Height          =   375
      Left            =   1560
      TabIndex        =   9
      Text            =   "Text6"
      Top             =   4560
      Width           =   2295
   End
   Begin VB.TextBox txtdaynum 
      Height          =   375
      Left            =   1560
      TabIndex        =   8
      Text            =   "Text5"
      Top             =   3960
      Width           =   2295
   End
   Begin VB.TextBox txtsum 
      Height          =   375
      Left            =   1560
      TabIndex        =   7
      Text            =   "Text4"
      Top             =   3360
      Width           =   2295
   End
   Begin VB.TextBox txtmulct 
      Height          =   375
      Left            =   1560
      TabIndex        =   6
      Text            =   "Text3"
      Top             =   2760
      Width           =   2295
   End
   Begin VB.ComboBox cmblevel 
      Height          =   300
      ItemData        =   "edreader1.frx":0000
      Left            =   1560
      List            =   "edreader1.frx":000A
      TabIndex        =   5
      Text            =   "Combo2"
      Top             =   2280
      Width           =   2295
   End
   Begin VB.OptionButton Option2 
      Caption         =   "女"
      Height          =   255
      Left            =   2880
      TabIndex        =   4
      Top             =   1920
      Width           =   615
   End
   Begin VB.OptionButton Option1 
      Caption         =   "男"
      Height          =   255
      Left            =   1800
      TabIndex        =   3
      Top             =   1920
      Width           =   615
   End
   Begin VB.ComboBox cmbunit 
      Height          =   300
      ItemData        =   "edreader1.frx":001A
      Left            =   1560
      List            =   "edreader1.frx":0024
      TabIndex        =   2
      Text            =   "Combo1"
      Top             =   1440
      Width           =   2295
   End
   Begin VB.TextBox txtname 
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Text            =   "Text2"
      Top             =   840
      Width           =   2295
   End
   Begin VB.TextBox txtrno 
      Height          =   375
      Left            =   1560
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   240
      Width           =   2295
   End
   Begin VB.Label Label11 
      Caption         =   "登记日期*"
      Height          =   255
      Left            =   360
      TabIndex        =   20
      Top             =   4560
      Width           =   975
   End
   Begin VB.Label Label10 
      Caption         =   "借书天数"
      Height          =   255
      Left            =   360
      TabIndex        =   19
      Top             =   3960
      Width           =   855
   End
   Begin VB.Label Label9 
      Caption         =   "借书总数"
      Height          =   255
      Left            =   360
      TabIndex        =   18
      Top             =   3360
      Width           =   975
   End
   Begin VB.Label Label8 
      Caption         =   "过期罚款*"
      Height          =   255
      Left            =   360
      TabIndex        =   17
      Top             =   2760
      Width           =   855
   End
   Begin VB.Label Label7 
      Caption         =   "级别"
      Height          =   255
      Left            =   600
      TabIndex        =   16
      Top             =   2280
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "性别"
      Height          =   255
      Left            =   600
      TabIndex        =   15
      Top             =   1920
      Width           =   495
   End
   Begin VB.Label Label3 
      Caption         =   "单位"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   600
      TabIndex        =   14
      Top             =   1440
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "姓名*"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   13
      Top             =   840
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "借书证号*"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   12
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "edreader1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub form_load()
If flag = 2 Then
txtrno.Text = edreader.Adodc1.Recordset.Fields("借书证号") & ""
txtname.Text = edreader.Adodc1.Recordset.Fields("姓名") & ""
If edreader.Adodc1.Recordset.Fields("性别") = "男" Then
Option1.Value = True
Else
Option2.Value = True
End If
cmbunit.Text = edreader.Adodc1.Recordset.Fields("单位") & ""
cmblevel.Text = edreader.Adodc1.Recordset.Fields("级别") & ""
txtmulct.Text = edreader.Adodc1.Recordset.Fields("过期罚款") & ""
txtsum.Text = edreader.Adodc1.Recordset.Fields("借书总数") & ""
txtdaynum.Text = edreader.Adodc1.Recordset.Fields("借书天数") & ""
tatdate.Text = edreader.Adodc1.Recordset.Fields("登记日期") & ""
txtrno.Enabled = False
Else
txtdate.Text = Date
End If
End Sub
Private Sub cmblevel_lostfocus()
If Trim(cmblevel.Text) = "教师" Then
txtmulct.Text = 10
txtdaynum.Text = 60
Else
txtmulct.Text = "20"
txtsum.Text = 5
txtdaynum.Text = 30
End If
End Sub
Private Sub cmd_ok_click()
If Trim(txtrno.Text) = "" Or Trim(txtdate.Text) = "" Or Trim(cmbunit.Text) = "" Then
MsgBox "加*号数据不能为空,请重新设置", vbOKOnly, "信息提示"
Exit Sub
End If
If flag = 1 Then
edreader.Adodc1.Recordset.AddNew
edreader.Adodc1.Recordset.Fields("借书证号") = Trim(txtrno.Text)
edreader.Adodc1.Recordset.Fields("姓名") = Trim(txtname.Text)
If Option1.Value = True Then
edreader.Adodc1.Recordset.Fields("性别") = "男"
Else
edreader.Adodc1.Recordset.Fields("性别") = "女"
End If
edreader.Adodc1.Recordset.Fields("单位") = Trim(cmbunit.Text)
edreader.Adodc1.Recordset.Fields("级别") = Trim(cmblevel.Text)
edreader.Adodc1.Recordset.Fields("过期罚款") = Trim(txtmulct.Text)
edreader.Adodc1.Recordset.Fields("借书总数") = Val(Trim(txtsum.Text))
edreader.Adodc1.Recordset.Fields("借书天数") = Val(Trim(txtdaynum.Text))
edreader.Adodc1.Recordset.Fields("已借天数") = 0
edreader.Adodc1.Recordset.Fields("登记日期") = Format(Trim(txtdate.Text), "yyyy-mm-dd")
edreader.Adodc1.Recordset.Update
resc = resc + 1
Else
edreader.Adodc1.Recordset.Fields("借书证号") = Trim(txtrno.Text)
edreader.Adodc1.Recordset.Fields("姓名") = Trim(txtname.Text)
If Option1.Value = True Then
edreader.Adodc1.Recordset.Fields("性别") = "男"
Else
edreader.Adodc1.Recordset.Fields("性别") = "女"
End If
edreader.Adodc1.Recordset.Fields("单位") = Trim(cmbunit.Text)
edreader.Adodc1.Recordset.Fields("级别") = Trim(cmblevel.Text)
edreader.Adodc1.Recordset.Fields("过期罚款") = Trim(txtmulct.Text)
edreader.Adodc1.Recordset.Fields("借书总数") = Val(Trim(txtsum.Text))
edreader.Adodc1.Recordset.Fields("借书天数") = Val(Trim(txtdaynum.Text))
edreader.Adodc1.Recordset.Fields("已借天数") = 0
edreader.Adodc1.Recordset.Fields("登记日期") = Format(Trim(txtdate.Text), "yyyy-mm-dd")
edreader.Adodc1.Recordset.Update
End If
Unload Me
End Sub
Private Sub cmd_cancel_click()
Unload Me
End Sub



































⌨️ 快捷键说明

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