📄 cashinform.frm
字号:
VERSION 5.00
Begin VB.Form cashInForm2
BorderStyle = 1 'Fixed Single
Caption = "定期存款"
ClientHeight = 2730
ClientLeft = 45
ClientTop = 435
ClientWidth = 6615
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2730
ScaleWidth = 6615
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command4
Caption = "利率查询"
Height = 495
Left = 4920
TabIndex = 9
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "完成"
Height = 495
Left = 3360
TabIndex = 8
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 1800
TabIndex = 7
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确认存款"
Height = 495
Left = 240
TabIndex = 6
Top = 1680
Width = 1335
End
Begin VB.TextBox dateText4
Height = 270
Left = 4320
TabIndex = 5
Top = 480
Width = 1095
End
Begin VB.TextBox jinEText3
Height = 375
Left = 1080
TabIndex = 3
Top = 1080
Width = 1575
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "cashInForm.frx":0000
Left = 1080
List = "cashInForm.frx":0010
TabIndex = 0
Text = "选择期限"
Top = 480
Width = 1575
End
Begin VB.Label Label5
Caption = "当前日期"
Height = 255
Left = 3240
TabIndex = 4
Top = 480
Width = 975
End
Begin VB.Label Label4
Caption = "金额"
Height = 255
Left = 240
TabIndex = 2
Top = 1080
Width = 495
End
Begin VB.Label Label3
Caption = "存款类型"
Height = 255
Left = 120
TabIndex = 1
Top = 480
Width = 735
End
End
Attribute VB_Name = "cashInForm2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim queRen As Boolean
Dim cunRuJE As Single
Dim dingQiZhHH As String
Dim tempPoint1 As ADODB.Recordset
Dim tempPoint2 As ADODB.Recordset
Dim textSQL As String
Dim dateToday As Date
Dim bianHao As Integer
Dim dingQNX As Integer
Dim quChuRiQi As Date
Dim t As String
Dim xianZLL As Single
dateToday = Date
queRen = False
If (Trim(jinEText3.Text) = "") Then
jinEText3.Text = ""
jinEText3.SetFocus
MsgBox "金额空!", vbOKOnly + vbExclamation, ""
Else
If Combo1 = "选择期限" Then
MsgBox "请选择期限", vbOKOnly + vbExclamation, ""
Else
queRen = True
End If
End If
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'判断金额
cunRuJE = Val(jinEText3.Text)
If cunRuJE <= 0 Then
queRen = False
MsgBox "金额错误!", vbOKOnly + vbExclamation, "错误"
End If
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'读存款年限 和 存储取出年限
dingQNX = 0
Select Case Combo1
Case "一年"
dingQNX = 1
quChuRiQi = DateCountP(dateToday, dingQNX)
xianZLL = LLFindOut(dateToday, 1)
Case "两年"
dingQNX = 2
quChuRiQi = DateCountP(dateToday, dingQNX)
xianZLL = LLFindOut(dateToday, 2)
Case "三年"
dingQNX = 3
quChuRiQi = DateCountP(dateToday, dingQNX)
xianZLL = LLFindOut(dateToday, 3)
Case "五年"
dingQNX = 5
quChuRiQi = DateCountP(dateToday, dingQNX)
xianZLL = LLFindOut(dateToday, 5)
End Select
If dingQNX = 0 Then
MsgBox "", vbOKOnly + vbExclamation, ""
End If
If queRen = True And LoginSucceeded Then
textSQL = "select * from 帐户信息 where 帐号 ='" & ID_Number & "'"
Set tempPoint1 = ExecuteSQL(textSQL)
If Not tempPoint1.EOF Then
dingQiZhHH = tempPoint1.Fields(3)
tempPoint1.Close
textSQL = "select * from 定期帐户信息"
Set tempPoint2 = ExecuteSQL(textSQL)
tempPoint2.MoveLast
bianHao = tempPoint2.Fields(0)
bianHao = bianHao + 1
tempPoint2.addNew
tempPoint2.Fields(0) = bianHao
tempPoint2.Fields(1) = Trim(dingQiZhHH)
tempPoint2.Fields(2) = dateToday
tempPoint2.Fields(3) = quChuRiQi
tempPoint2.Fields(4) = xianZLL
tempPoint2.Fields(5) = cunRuJE
tempPoint2.Fields(6) = dingQNX
tempPoint2.Fields(8) = userID
tempPoint2.Fields(9) = userName
tempPoint2.Update
tempPoint2.Close
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'更新 帐户信息
textSQL = "select * from 帐户信息 where 帐号='" & ID_Number & "'"
Set tempPoint1 = ExecuteSQL(textSQL)
If tempPoint1.EOF Then
MsgBox "登陆帐目错误!", vbOKOnly + vbExclamation, "错误"
tempPoint1.Close
Else
tempPoint1.Fields(5) = tempPoint1.Fields(5) + cunRuJE
tempPoint1.Fields(6) = tempPoint1.Fields(4) + tempPoint1.Fields(5)
tempPoint1.Update
tempPoint1.Close
MsgBox "您的帐户为:" & ID_Number & Chr(10) & "您存入的金额为:" & cunRuJE & "元", vbOKOnly + vbExclamation, "存款成功"
jinEText3.Text = ""
End If
Else
tempPoint1.Close
MsgBox "帐户不正确", vbOKOnly + vbExclamation, ""
jinEText3.Text = ""
zhangHaoText1.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
LoginSucceeded = False
Unload Me
xuanZe.Show
End Sub
Private Sub Command3_Click()
LoginSucceeded = False
Unload Me
End Sub
Private Sub Command4_Click()
chaXunZHL = 2
chaXunRiQi = Date
liLvChaXunBiao.Show
End Sub
Private Sub Form_Load()
dateText4.Text = Date
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -