📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
Caption = "记牌器管理工具"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 3870
Icon = "form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 3870
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "退出"
Height = 1215
Left = 3000
TabIndex = 8
Top = 1560
Width = 735
End
Begin VB.CommandButton Command6
Caption = "用户续费"
Height = 495
Left = 1560
TabIndex = 6
Top = 1560
Width = 1335
End
Begin VB.TextBox Text1
Height = 495
Left = 2160
TabIndex = 5
Top = 120
Width = 1455
End
Begin VB.CommandButton Command5
Caption = "查询帐号"
Height = 495
Left = 240
TabIndex = 3
Top = 120
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "踢出卡号"
Height = 495
Left = 1560
TabIndex = 2
Top = 2280
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "修改密码"
Height = 495
Left = 120
TabIndex = 1
Top = 2280
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "添加帐号"
Height = 495
Left = 120
TabIndex = 0
Top = 1560
Width = 1215
End
Begin VB.Label Label2
Height = 615
Left = 2040
TabIndex = 7
Top = 840
Width = 1815
End
Begin VB.Label Label1
Height = 255
Left = 240
TabIndex = 4
Top = 840
Width = 1215
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
form2.Show
End Sub
Private Sub Command2_Click()
Unload Me
Unload form1
Unload form2
Unload Form3
Unload Form4
Unload Form5
End Sub
Private Sub Command3_Click()
Form4.Show
End Sub
Private Sub Command4_Click()
Form5.Show
End Sub
Private Sub Command5_Click()
If Text1.Text = "" Then
MsgBox "请输入要查询的号码", vbOKOnly, "输入错误"
Else
Dim gAdoConn As New ADODB.Connection
Dim gStrConn As String
Dim getdate As String
'创建对象
Set gAdoConn = New ADODB.Connection
'定义Connection对象连接参数
'provider参数指定连接数据库驱动,data bank_zhhao参数指定数据库名称
gStrConn = "driver={SQL Server};" & _
"server=61.174.60.164;uid=jincaia;pwd=meilishijie;database=jincai"
'使用连接参数,建立数据库连接
gAdoConn.Open gStrConn
Dim adoSetMima As ADODB.Recordset
Dim strSQL As String
Dim blnChangeAble As Boolean
Dim chaxunhaoma As String
chaxunhaoma = Text1.Text
blnChangeAble = True
Set adoSetMima = New ADODB.Recordset
If blnChangeAble Then
strSQL = "select name,vipdq from users where name='" & Text1.Text & "'"
adoSetMima.Open strSQL, gAdoConn, adOpenKeyset, adLockBatchOptimistic '打开记录集
End If
If adoSetMima.BOF Then
MsgBox "系统中没有该客户的账号!请检查输入是否正确", vbOKOnly, "查询失败"
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
Else
Label1.Caption = "帐号:" + adoSetMima!Name
Label2.Caption = "到期时间:" + adoSetMima!vipdq
End If
adoSetMima.Close
End If
End Sub
Private Sub Command6_Click()
Form3.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -