📄 revip.frm
字号:
VERSION 5.00
Begin VB.Form ReVip
BorderStyle = 1 'Fixed Single
Caption = "会员续费"
ClientHeight = 3480
ClientLeft = 45
ClientTop = 435
ClientWidth = 7605
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3480
ScaleWidth = 7605
Begin VB.CommandButton Command2
Caption = "关闭(&C)"
Height = 375
Left = 6000
TabIndex = 14
Top = 2880
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "续费(&R)"
Height = 375
Left = 4320
TabIndex = 13
Top = 2880
Width = 1455
End
Begin VB.Frame Frame2
Caption = "续费"
Height = 1575
Left = 120
TabIndex = 6
Top = 1200
Width = 7335
Begin VB.TextBox Text5
Appearance = 0 'Flat
BackColor = &H0080FFFF&
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
TabIndex = 16
Top = 960
Width = 1815
End
Begin VB.TextBox Text4
Appearance = 0 'Flat
BackColor = &H0080FFFF&
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 12
Top = 960
Width = 1815
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
BackColor = &H0080FFFF&
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
TabIndex = 10
Top = 360
Width = 1815
End
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
Enabled = 0 'False
Height = 300
Left = 1200
TabIndex = 8
Top = 360
Width = 1815
End
Begin VB.Label Label7
Caption = "剩余碟数:"
Height = 255
Left = 4080
TabIndex = 15
Top = 1080
Width = 975
End
Begin VB.Label Label6
Caption = "续费时间:"
Height = 375
Left = 240
TabIndex = 11
Top = 1080
Width = 975
End
Begin VB.Label Label5
Caption = "需缴费用:"
Height = 375
Left = 4080
TabIndex = 9
Top = 480
Width = 975
End
Begin VB.Label Label4
Caption = "会员等级:"
Height = 255
Left = 240
TabIndex = 7
Top = 480
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "会员信息"
Height = 975
Left = 120
TabIndex = 0
Top = 120
Width = 7335
Begin VB.TextBox Text2
Appearance = 0 'Flat
BackColor = &H0080FFFF&
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5160
TabIndex = 4
Top = 240
Width = 1815
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
Height = 375
Left = 1200
TabIndex = 2
Top = 240
Width = 1815
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "<输入编号按回车键>"
ForeColor = &H000000FF&
Height = 255
Left = 1200
TabIndex = 5
Top = 720
Width = 1695
End
Begin VB.Label Label2
Caption = "会员姓名:"
Height = 255
Left = 4080
TabIndex = 3
Top = 360
Width = 975
End
Begin VB.Label Label1
Caption = "会员编号:"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 975
End
End
End
Attribute VB_Name = "ReVip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_Change()
Combo1.Text = ""
End Sub
Private Sub Combo1_click()
Dim SQL As String
Dim CDSum As Integer
If Combo1.Text <> "" Then
SQL = "select * from viptype where 会员级别=""" & Combo1.Text & """"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
Text3.Text = gRst("会员交费") & "元"
CDSum = gRst("可借碟片")
End If
CloseRS
SQL = "select 还剩盘数 from vipinfo where 会员ID=""" & Text1.Text & """"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
Text5.Text = CDSum + Format(CStr(gRst("还剩盘数")))
End If
CloseRS
End If
End Sub
Private Sub Command1_Click()
Dim SQL As String
If Text1.Text <> "" Then
If Combo1.Text <> "" Then
SQL = "update vipinfo set 会员级别=""" & Combo1.Text & """,办理日期=#" & Text4.Text & "#,还剩盘数=" & Text5.Text & " where 会员ID=""" & Text1.Text & """"
OpenDBFile
gCon.Execute SQL
CloseDBFile
MsgBox "续费成功,请返回!", vbInformation + vbOKOnly, "提示"
Unload Me
Else
MsgBox "请选择会员级别!", vbInformation + vbOKOnly, "警告"
End If
Else
MsgBox "请先输入会员ID!", vbInformation + vbOKOnly, "警告"
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim SQL As String
SQL = "select 会员级别 from viptype "
OpenDBFile
OpenRS (SQL)
If gRst.RecordCount > 0 Then
gRst.MoveFirst
Do While Not gRst.EOF
Combo1.AddItem gRst("会员级别")
gRst.MoveNext
Loop
End If
CloseRS
Text4.Text = Date
End Sub
Private Sub text1_keypress(keyascii As Integer)
Dim SQL As String
If keyascii = "13" And Text1.Text <> "" Then
SQL = "select * from vipinfo where 会员ID=""" & Text1.Text & """"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
Text2.Text = gRst("会员姓名")
Combo1.Enabled = True
Combo1.SetFocus
Else
MsgBox "对不起,你所查询的会员不存在!", vbInformation + vbOKOnly, "提示"
Text1.Text = ""
Text1.SetFocus
End If
CloseRS
ElseIf keyascii = "13" And Text1.Text = "" Then
MsgBox "对不起请输入你要续费的会员编号!", vbInformation + vbOKOnly, "提示"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -