📄 cashoutform2.frm
字号:
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 9120
TabIndex = 19
Top = 480
Width = 1815
End
Begin VB.Label Label8
Caption = "用户帐号"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1800
TabIndex = 16
Top = 600
Width = 1575
End
Begin VB.Label Label7
Caption = "今日时间"
Height = 255
Left = 3480
TabIndex = 14
Top = 3480
Width = 735
End
Begin VB.Label Label6
Caption = "到期金额"
Height = 255
Left = 3480
TabIndex = 12
Top = 2760
Width = 735
End
Begin VB.Label Label5
Caption = "总余额"
Height = 255
Left = 720
TabIndex = 11
Top = 2760
Width = 615
End
Begin VB.Label Label4
Caption = "可取金额"
Height = 255
Left = 600
TabIndex = 10
Top = 3480
Width = 855
End
Begin VB.Label Label3
Caption = "活期帐户余额"
Height = 255
Left = 480
TabIndex = 6
Top = 2040
Width = 1215
End
Begin VB.Label Label2
Caption = "定期帐户余额"
Height = 255
Left = 3480
TabIndex = 4
Top = 2040
Width = 1095
End
Begin VB.Label Label1
Caption = "取款金额"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 0
Top = 4440
Width = 1095
End
End
Attribute VB_Name = "cashOutForm2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim tempPoint1 As ADODB.Recordset
Dim tempPoint2 As ADODB.Recordset
Dim textSQL As String
Dim tempZhH As String
Dim tempCount As Integer
Dim keQu As Boolean
Dim quChuJE As Single
Dim keQuJE As Single
Dim huoQiYE As Single
keQuJE = Val(keQuJEText5.Text)
huoQiYE = huoQYEText3.Text
If Trim(quKuanText1.Text = "") Then
MsgBox "请输入金额", vbOKOnly + vbExclamation, ""
quKuanText1.SetFocus
Else
quChuJE = quKuanText1.Text
If (quChuJE < 0) Then
MsgBox "输入非法!", vbOKOnly + vbExclamation, "错误"
Else
If (quChuJE > keQuJE) Then
MsgBox "余额不足", vbOKOnly + vbExclamation, ""
Else
keQu = True
End If
End If
End If
If keQu = True Then
If quChuJE < huoQiYE Then
'活期减少
textSQL = "select * from 帐户信息 where 帐号 ='" & ID_Number & "'"
Set tempPoint1 = ExecuteSQL(textSQL)
tempPoint1.Fields(4) = tempPoint1.Fields(4) - quChuJE
tempPoint1.Fields(6) = tempPoint1.Fields(4) + tempPoint1.Fields(5)
tempZhH = tempPoint1.Fields(2)
tempPoint1.Update
tempPoint1.Close
textSQL = "select * from 活期帐户信息 where 活期帐户号 ='" & tempZhH & "'"
Set tempPoint2 = ExecuteSQL(textSQL)
tempPoint2.MoveLast
tempCount = tempPoint2.Fields(0)
tempCount = tempCount + 1
tempPoint2.AddNew '
tempPoint2.Fields(0) = tempCount
tempPoint2.Fields(1) = tempZhH
tempPoint2.Fields(2) = Date
tempPoint2.Fields(4) = (0 - quChuJE)
tempPoint2.Fields(6) = 1
tempPoint2.Update
tempPoint2.Close
MsgBox "您的帐号为" & ID_Number & Chr(10) & _
"您取出的金额为" & quChuJE & Chr(10) & _
"请清点金额", vbOKOnly + vbExclamation, "交易完成"
'处理框
xuanZe2.Show
Unload Me
Else
'提示 处理框
cashOutDeal.Show
Unload Me
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
LoginSucceeded = False
End Sub
Private Sub Command3_Click()
Unload Me
LoginSucceeded = False
End Sub
Private Sub Command4_Click()
cashOutDeal.Show
Unload Me
End Sub
Private Sub Command5_Click()
cashOutForm2.Width = 13050
Command5.Visible = False
End Sub
Private Sub Command6_Click()
cashOutForm2.Width = 7425
Command5.Visible = True
End Sub
Private Sub Form_Load()
Dim textSQL As String
Dim tempPoint1 As ADODB.Recordset
Dim tempPoint2 As ADODB.Recordset
Dim HZhangHao As String
Dim DZhangHao As String
Dim DYuE As Single
Dim DDaoQi As Single
Dim todayT As Date
Dim daoQiShiJ As Date '读出时间显示用
Dim bianH As String
cashOutForm2.Width = 7425
todayT = Date
If LoginSucceeded = True Then
Text1.Text = ID_Number
End If
jinRiSJText7.Text = Date
textSQL = " select * from 帐户信息 where 帐号 ='" & ID_Number & "'"
Set tempPoint1 = ExecuteSQL(textSQL)
huoQYEText3.Text = tempPoint1.Fields(4)
DYuE = tempPoint1.Fields(5)
dingQYEText2.Text = tempPoint1.Fields(5)
zongYEText4.Text = tempPoint1.Fields(6)
HZhangHao = tempPoint1.Fields(2)
DZhangHao = tempPoint1.Fields(3)
dingQiZhhh2 = tempPoint1.Fields(3) '用于传递至转换定期到期项目
huoQiZhhh2 = tempPoint1.Fields(2) '传递至转换 款项
tempPoint1.Close
textSQL = " select * from 定期帐户信息 where 定期帐户号 ='" & DZhangHao & "'"
Set tempPoint2 = ExecuteSQL(textSQL)
Do While Not tempPoint2.EOF
If (tempPoint2.Fields(7) = 0) Then
If ((todayT - tempPoint2.Fields(3)) >= 0) Then
List4.AddItem "到期"
Else
List4.AddItem ""
End If
daoQiShiJ = tempPoint2.Fields(3)
bianH = tempPoint2.Fields(0)
List1.AddItem daoQiShiJ
List3.AddItem tempPoint2.Fields(5)
List2.AddItem bianH
End If
tempPoint2.MoveNext
Loop
daoQiSJText6.Text = DDaoQi
keQuJEText5.Text = DDaoQi + Val(huoQYEText3)
tempPoint2.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -