📄 form1.frm
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form frmaddreaderstyle
Caption = "读者类别管理"
ClientHeight = 4965
ClientLeft = 60
ClientTop = 450
ClientWidth = 5820
LinkTopic = "Form1"
ScaleHeight = 4965
ScaleWidth = 5820
StartUpPosition = 2 '屏幕中心
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel7
Height = 375
Left = 4440
OleObjectBlob = "Form1.frx":0000
TabIndex = 12
Top = 2520
Width = 375
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel6
Height = 375
Left = 4440
OleObjectBlob = "Form1.frx":0060
TabIndex = 11
Top = 1920
Width = 375
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel5
Height = 255
Left = 4440
OleObjectBlob = "Form1.frx":00C0
TabIndex = 10
Top = 1200
Width = 375
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel4
Height = 375
Left = 1320
OleObjectBlob = "Form1.frx":0120
TabIndex = 9
Top = 2520
Width = 1095
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3
Height = 255
Left = 1320
OleObjectBlob = "Form1.frx":0186
TabIndex = 8
Top = 1920
Width = 855
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2
Height = 255
Left = 1320
OleObjectBlob = "Form1.frx":01EC
TabIndex = 7
Top = 1200
Width = 975
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 375
Left = 1320
OleObjectBlob = "Form1.frx":0252
TabIndex = 6
Top = 480
Width = 975
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 3360
TabIndex = 5
Top = 3600
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 1200
TabIndex = 4
Top = 3600
Width = 1215
End
Begin VB.TextBox Text4
Height = 495
Left = 2400
TabIndex = 3
Top = 2400
Width = 1935
End
Begin VB.TextBox Text3
Height = 495
Left = 2400
TabIndex = 2
Top = 1800
Width = 1935
End
Begin VB.TextBox Text2
Height = 495
Left = 2400
TabIndex = 1
Top = 1080
Width = 1935
End
Begin VB.TextBox Text1
Height = 495
Left = 2400
TabIndex = 0
Top = 360
Width = 2295
End
Begin ACTIVESKINLibCtl.Skin Skin1
Left = 0
OleObjectBlob = "Form1.frx":02B8
Top = 0
End
End
Attribute VB_Name = "frmaddreaderstyle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
Dim rs_readerstyle As New ADODB.Recordset
If Trim(Text1.Text) = "" Then
MsgBox "读者种类不能为空 ", vbOK0nly + vbExclamation, ""
Text1.SetFocus
Exit Sub
End If
If Trim(Text2.Text) = "" Then
MsgBox "借书数量不能为空", vbOK0nly + vbExclamation, ""
Text2.SetFocus
Exit Sub
End If
If Trim(Text3.Text) = "" Then
MsgBox "借书期限不能为空", vbOK0nly + vbExclamation, ""
Text3.SetFocus
Exit Sub
End If
If Trim(Text4.Text) = "" Then
MsgBox "有限期限不能为空", vbOK0nly + vbExclamation, ""
Text4.SetFocus
Exit Sub
End If
sql = "select * from 读者类别 where 种类名称='" & Text1.Text & "'"
rs_readerstyle.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs_readerstyle.EOF Then
rs_readerstyle.AddNew
rs_readerstyle.Fields(0) = Trim(Text1.Text)
rs_readerstyle.Fields(1) = Trim(Text2.Text)
rs_readerstyle.Fields(2) = Trim(Text3.Text)
rs_readerstyle.Fields(3) = Trim(Text4.Text)
rs_readerstyle.Update
MsgBox "添加读者类别成功!", vbOKOnly, ""
rs_readerstyle.Close
Else
MsgBox "读者类别重复!", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
rs_readerstyle.Close
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim skn
skn = App.Path & "\Book.skn"
'载入时的一些脚本.
Skin1.LoadSkin skn
Skin1.ApplySkin Me.hWnd ' 应用皮肤到这个窗口和它的子控件中
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -