📄 form18.frm
字号:
VERSION 5.00
Begin VB.Form Form18
BorderStyle = 0 'None
Caption = "存款"
ClientHeight = 8625
ClientLeft = 0
ClientTop = 0
ClientWidth = 10110
LinkTopic = "Form18"
ScaleHeight = 8625
ScaleWidth = 10110
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 5040
TabIndex = 7
Top = 4320
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 2760
TabIndex = 6
Top = 4320
Width = 1575
End
Begin VB.TextBox Text1
Height = 375
Left = 3600
TabIndex = 5
Text = "Text1"
Top = 3120
Width = 1815
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "Form18.frx":0000
Left = 3600
List = "Form18.frx":000D
TabIndex = 3
Text = "请选择"
Top = 2160
Width = 1575
End
Begin VB.Label Label4
Caption = "存款金额"
Height = 255
Left = 2160
TabIndex = 4
Top = 3120
Width = 1095
End
Begin VB.Label Label3
Caption = "币种"
Height = 255
Left = 2280
TabIndex = 2
Top = 2160
Width = 855
End
Begin VB.Label Label2
Caption = "Label2"
Height = 375
Left = 4080
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.Label Label1
Caption = "Label1"
Height = 375
Left = 2160
TabIndex = 0
Top = 960
Width = 1095
End
End
Attribute VB_Name = "Form18"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim new_deposit As Integer
Dim deposit_money As Integer
Private Sub Command1_Click()
If Label1.Caption = "储蓄帐户" Then
Label2.Caption = "活期"
cmd.CommandText = "select * from xinxi0504_23_account_balance where account_id='" & Trim(account_id) & "' and money_type='" & Trim(Combo1.Text) & "'"
Set rs = cmd.Execute
Select Case rs.EOF
Case True
new_deposit = 1
Case False
new_deposit = 0
End Select
Else
Label2.Caption = ""
cmd.CommandText = "select * from xinxi0504_23_credit_balance where credit_id='" & Trim(account_id) & "' and money_type='" & Trim(Combo1.Text) & "'"
Set rs = cmd.Execute
Select Case rs.EOF
Case True
new_deposit = 1
Case False
new_deposit = 0
End Select
End If
If Combo1.Text = "请选择" Then
MsgBox "请选择币种"
ElseIf Text1.Text = "" Then
MsgBox "请输入存款金额"
ElseIf Label1.Caption = "储蓄帐户" Then
deposit_money = Val(Text1.Text)
Select Case new_deposit
Case 1
cmd.CommandText = "insert into xinxi0504_23_deposit_record values('" & Trim(account_id) & "','" & Str(DateTime.Now) & "','" & account_type & "','" & Trim(Combo1.Text) & "'," & Val(Trim(Text1.Text)) & ",'" & employee_id & "')"
cmd.Execute
cmd.CommandText = "insert into xinxi0504_23_account_balance values('" & Trim(account_id) & "','" & Trim(Combo1.Text) & "'," & Val(Text1.Text) & ")"
cmd.Execute
MsgBox "存款成功"
Case 0
cmd.CommandText = "insert into xinxi0504_23_deposit_record values('" & Trim(account_id) & "','" & Str(DateTime.Now) & "','" & account_type & "','" & Trim(Combo1.Text) & "'," & Val(Trim(Text1.Text)) & ",'" & employee_id & "')"
cmd.Execute
cmd.CommandText = "update xinxi0504_23_account_balance set balance=balance+" & deposit_money & " where account_id='" & Trim(account_id) & "' and money_type='" & Trim(Combo1.Text) & "'"
cmd.Execute
MsgBox "存款成功"
End Select
ElseIf Label1.Caption = "信用卡帐户" Then
deposit_money = Val(Text1.Text)
Select Case new_deposit
Case 1
cmd.CommandText = "insert into xinxi0504_23_deposit_record values('" & Trim(account_id) & "','" & Str(DateTime.Now) & "','" & account_type & "','" & Trim(Combo1.Text) & "'," & Val(Trim(Text1.Text)) & ",'" & employee_id & "')"
cmd.Execute
cmd.CommandText = "insert into xinxi0504_23_credit_balance values('" & Trim(account_id) & "','" & Trim(Combo1.Text) & "'," & Val(Text1.Text) & ")"
cmd.Execute
MsgBox "存款成功"
Case 0
cmd.CommandText = "insert into xinxi0504_23_deposit_record values('" & Trim(account_id) & "','" & Str(DateTime.Now) & "','" & account_type & "','" & Trim(Combo1.Text) & "'," & Val(Trim(Text1.Text)) & ",'" & employee_id & "')"
cmd.Execute
cmd.CommandText = "update xinxi0504_23_credit_balance set balance=balance+" & deposit_money & " where credit_id='" & Trim(account_id) & "' and money_type='" & Trim(Combo1.Text) & "'"
cmd.Execute
MsgBox "存款成功"
End Select
End If
End Sub
Private Sub Command2_Click()
Form16.Show
Unload Form18
End Sub
Private Sub Form_Load()
Text1.Text = ""
If Label1.Caption = "储蓄帐户" Then
Label2.Caption = "活期"
Else
Label2.Caption = ""
End If
Set rs = New ADODB.Recordset
cmd.CommandType = adCmdText
Label1.Caption = account_type
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -