📄 销户.frm
字号:
VERSION 5.00
Begin VB.Form Form7
BackColor = &H00FFC0C0&
Caption = "Form7"
ClientHeight = 5055
ClientLeft = 60
ClientTop = 450
ClientWidth = 10500
LinkTopic = "Form7"
Picture = "销户.frx":0000
ScaleHeight = 5055
ScaleWidth = 10500
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H00FFC0C0&
Caption = "销户界面"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 2535
Left = 2160
TabIndex = 0
Top = 1920
Width = 5655
Begin VB.CommandButton Command3
Caption = "销户"
Height = 495
Left = 3000
Picture = "销户.frx":4F4CC
Style = 1 'Graphical
TabIndex = 11
Top = 1800
Width = 2175
End
Begin VB.TextBox Text3
Height = 495
Left = 3000
TabIndex = 10
Top = 1200
Width = 2175
End
Begin VB.TextBox Text2
Height = 495
Left = 3000
TabIndex = 9
Top = 600
Width = 2175
End
Begin VB.OptionButton Option2
BackColor = &H00FFC0C0&
Caption = "帐"
Height = 255
Left = 3120
TabIndex = 5
Top = 240
Width = 1335
End
Begin VB.OptionButton Option1
BackColor = &H00FFC0C0&
Caption = "卡"
Height = 255
Left = 1080
TabIndex = 4
Top = 240
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 720
Picture = "销户.frx":57DA2
Style = 1 'Graphical
TabIndex = 3
Top = 1800
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "卡号|折号"
Height = 495
Index = 0
Left = 720
Picture = "销户.frx":60678
Style = 1 'Graphical
TabIndex = 2
Top = 1200
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "身份证"
Height = 495
Index = 2
Left = 720
Picture = "销户.frx":68F4E
Style = 1 'Graphical
TabIndex = 1
Top = 600
Width = 1575
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Index = 2
Left = 360
TabIndex = 8
Top = 1320
Width = 375
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Index = 1
Left = 360
TabIndex = 7
Top = 720
Width = 375
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Index = 0
Left = 360
TabIndex = 6
Top = 240
Width = 375
End
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cz As Integer
Dim balance1 As Integer
Private Sub Command2_Click()
Unload Me
Form3.Show
End Sub
Private Sub Command3_Click()
Dim count7 As Integer
If Text2.Text = "" Or Text3.Text = "" Or (Option1.Value = False And Option2.Value = False) Then
MsgBox "带*为必填项!"
Text2.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text2.Text) Then
MsgBox "身份证必须为数字"
Text2.SetFocus
Exit Sub
ElseIf Len(Text2.Text) > 20 Then
MsgBox "身份证号必须小于20位"
Exit Sub
Text2.SetFocus
ElseIf Option1.Value = True Then
Call openconn
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text3.Text) & "'and id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入卡号和证件不匹配!请从新输入"
rs.Close
Unload Me
Form7.Show
Else
balance1 = rs!balance
If balance1 <= 10 Then
rs.Close
rs.Open "select * from access_xx053_06 where c_No='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
conn.Execute "Delete access_xx053_06 where c_No='" & Trim(Text3.Text) & "'"
rs.Close
rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
conn.Execute "Delete card_xx053_06 where c_No='" & Trim(Text3.Text) & "'"
rs.Close
MsgBox "销户成功!"
rs.Open "select * from client_xx053_06 where id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
count7 = rs!count
If count7 = 1 Then
conn.Execute "Delete client_xx053_06 where id='" & Trim(Text2.Text) & "'"
rs.Close
Else
count7 = count7 - 1
rs.Fields(5) = count7
rs.Update
rs.Close
MsgBox "此客户已经没有任何银行信息!"
Unload Me
Form3.Show
End If
Else
MsgBox "余额大于10不能销户,请先转账或取款!"
rs.Close
Unload Me
Form3.Show
End If
End If
Else
Call openconn
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text3.Text) & "'and id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "输入账号和证件不匹配!请从新输入"
rs.Close
Unload Me
Form7.Show
Else
balance1 = rs!balance
If balance1 <= 10 Then
rs.Close
rs.Open "select * from access_xx053_06 where b_No='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
rs.Delete
rs.Close
rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
rs.Delete
rs.Close
MsgBox "销户成功!"
rs.Open "select * from client_xx053_06 where id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
count7 = rs!count
If count7 = 1 Then
rs.Delete
rs.Close
Else
count7 = count7 - 1
rs.Fields(5) = count7
rs.Update
rs.Close
MsgBox "此客户在银行没有任何信息!"
Unload Me
Form3.Show
End If
Else
MsgBox "余额大于10不能销户,请先转账或取款!"
rs.Close
Unload Me
Form3.Show
End If
End If
End If
conn.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -