📄 frmmanager1.frm
字号:
End
Begin VB.TextBox txtAddress
BackColor = &H00E0E0E0&
ForeColor = &H000000C0&
Height = 855
Left = 1560
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 13
Top = 1800
Width = 5055
End
Begin VB.TextBox txtLiXi
BackColor = &H00E0E0E0&
ForeColor = &H000000C0&
Height = 270
Left = 1560
Locked = -1 'True
TabIndex = 9
Top = 1080
Width = 1815
End
Begin VB.TextBox txtUserName
BackColor = &H00E0E0E0&
ForeColor = &H000000C0&
Height = 270
Left = 4560
Locked = -1 'True
TabIndex = 3
Top = 360
Width = 2055
End
Begin VB.TextBox txtUserID
BackColor = &H00E0E0E0&
DataField = "档案号"
DataSource = "Data1"
ForeColor = &H000000C0&
Height = 285
Left = 1560
Locked = -1 'True
MaxLength = 50
TabIndex = 2
Top = 360
Width = 1810
End
Begin VB.ComboBox Combo1
BackColor = &H00E0E0E0&
ForeColor = &H000000C0&
Height = 300
ItemData = "frmManager1.frx":030A
Left = 1560
List = "frmManager1.frx":030C
Locked = -1 'True
TabIndex = 1
Top = 720
Width = 1815
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元"
ForeColor = &H00000000&
Height = 180
Index = 5
Left = 3480
TabIndex = 23
Top = 1440
Width = 180
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "支取金额:"
ForeColor = &H00000000&
Height = 180
Index = 2
Left = 600
TabIndex = 21
Top = 1440
Width = 900
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "利率:"
ForeColor = &H00000000&
Height = 180
Index = 11
Left = 3960
TabIndex = 15
Top = 1125
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "利息:"
ForeColor = &H00000000&
Height = 180
Index = 4
Left = 960
TabIndex = 12
Top = 1125
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元"
ForeColor = &H00000000&
Height = 180
Index = 8
Left = 3480
TabIndex = 11
Top = 1080
Width = 180
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "地址:"
Height = 255
Index = 4
Left = 960
TabIndex = 10
Top = 1800
Width = 615
End
Begin VB.Label Label1
BackColor = &H8000000A&
BackStyle = 0 'Transparent
Caption = "大写:"
Height = 255
Index = 0
Left = 3960
TabIndex = 8
Top = 1440
Width = 615
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "本金:"
ForeColor = &H00000000&
Height = 180
Index = 7
Left = 3960
TabIndex = 7
Top = 750
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "储种:"
ForeColor = &H00000000&
Height = 180
Index = 3
Left = 960
TabIndex = 6
Top = 750
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00000000&
Height = 180
Index = 1
Left = 3960
TabIndex = 5
Top = 390
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户帐号:"
ForeColor = &H00000000&
Height = 180
Index = 0
Left = 600
TabIndex = 4
Top = 390
Width = 900
End
End
End
Attribute VB_Name = "frmPickMoney"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Date < CashDay(CDate(txtYear & "/" & txtMonth & "/" & txtday), Combo1) Then
If MsgBox("存款未到期,确实需要提前支取吗?(Y/N)", vbQuestion + vbYesNo, "提示:") = vbNo Then Exit Sub
txtLiXi = txtMoney * (Date - CDate(txtYear & "/" & txtMonth & "/" & txtday)) * 0.000005
txtPay = txtMoney * (1 + (Date - CDate(txtYear & "/" & txtMonth & "/" & txtday)) * 0.000005)
End If
Dim db As Database, RecStr As String
lvw.ListItems.Add , "first", txtUserID
lvw.ListItems("first").SubItems(1) = txtUserName
lvw.ListItems("first").SubItems(2) = Combo1
lvw.ListItems("first").SubItems(3) = txtYear & "-" & txtMonth & "-" & txtday
lvw.ListItems("first").SubItems(4) = CashDay(CDate(txtYear & "/" & txtMonth & "/" & txtday), Combo1)
lvw.ListItems("first").SubItems(5) = txtMoney & "元"
lvw.ListItems("first").SubItems(6) = txtLiXi & "元"
lvw.ListItems("first").SubItems(7) = txtPay & "元"
Set db = OpenDatabase(App.Path & "\bank.mdb")
DBEngine.BeginTrans
RecStr = "Delete * From [存款记录] Where 帐号='" & txtUserID & "'" & "AND 姓名='" & txtUserName & "'"
db.Execute RecStr
db.Close
DBEngine.CommitTrans
AddToRecord
PrintTable
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 + 300, Me.Width, Me.Height
Dim header As ColumnHeader
lvw.View = lvwReport
lvw.ColumnHeaders.Clear
Set header = lvw.ColumnHeaders.Add(, "first", "帐号", 1000) 'set listview width
Set header = lvw.ColumnHeaders.Add(, "second", "姓名", 1000)
Set header = lvw.ColumnHeaders.Add(, "third", "储种", 1000)
Set header = lvw.ColumnHeaders.Add(, "fouth", "起息日期", 1000)
Set header = lvw.ColumnHeaders.Add(, "fifth", "支取日期", 1000)
Set header = lvw.ColumnHeaders.Add(, "sixth", "本金", 1000)
Set header = lvw.ColumnHeaders.Add(, "ninth", "利息", 1000)
Set header = lvw.ColumnHeaders.Add(, "tenth", "支取金额", 1000)
End Sub
Private Sub AddToRecord()
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(App.Path & "\bank.mdb")
Set rs = db.OpenRecordset("取款记录")
With rs
.AddNew
!帐号 = txtUserID
!姓名 = txtUserName
!密码 = txtPwd
!地址 = txtAddress
!储种 = Combo1
!本金 = txtMoney
!利息 = txtLiXi
!取款金额 = txtPay
!存款日期 = txtYear & "/" & txtMonth & "/" & txtday
!取款日期 = Date
!营业员 = CurOperator
!工号 = OperatorID
.Update
End With
End Sub
Private Sub PrintTable()
Dim FName As String
Dim Result As String
If Date >= CashDay(CDate(txtYear & "/" & txtMonth & "/" & txtday), Combo1) Then
Result = "到期"
Else
Result = "提前支取"
End If
FName = Environ("temp") & "\printfrm.htm"
PicName = Environ("temp") & "\backgrd.jpg"
If Dir(FName) <> "" Then Kill FName
If Dir(App.Path & "\backgrd.jpg") <> "" Then FileCopy App.Path & "\backgrd.jpg", PicName
Open FName For Output As #1
Print #1, "<html>"
Print #1, "<head>"
Print #1, "<title>打印结果</title>"
Print #1, "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
Print #1, "</head>"
If Dir(PicName) <> "" Then
Print #1, "<body background=backgrd.jpg>"
Else
Print #1, "<body>"
End If
Print #1, "<BR>"
Print #1, "<BR>"
Print #1, "<table border=1 align=center style=""border-collapse: collapse"" bordercolor=""#111111"" width=""100%"">"
Print #1, "<caption><b><font size=5 face=楷体_GB2312>" & Result & "取款单(模拟打印)</font></b></caption>"
Print #1, "<th>帐号</th>"
Print #1, "<th>姓名</th>"
Print #1, "<th>储种</th>"
Print #1, "<th>本金(元)</th>"
Print #1, "<th>利息(元)</th>"
Print #1, "<th>取款(元)</th>"
Print #1, "<th>大写金额(元)</th>"
Print #1, "<th>存款日期</th>"
Print #1, "<th>取款日期</th>"
Print #1, "<tr>"
Print #1, "<td><font size=2>" & txtUserID & "</font></td>"
Print #1, "<td><font size=2>" & txtUserName & "</font></td>"
Print #1, "<td><font size=2>" & Combo1 & "</font></td>"
Print #1, "<td><font size=2>" & txtMoney & "</font></td>"
Print #1, "<td><font size=2>" & IIf(Val(txtLiXi) < 1, "0" & txtLiXi, txtLiXi) & "</font></td>"
Print #1, "<td><font size=2>" & txtPay & "</font></td>"
Print #1, "<td><font size=2>" & changemoney(Val(txtPay)) & "</font></td>"
Print #1, "<td><font size=2>" & txtYear & "-" & txtMonth & "-" & txtday & "</font></td>"
Print #1, "<td><font size=2>" & Date & "</font></td>"
Print #1, "</table>"
Print #1, "<p align=""Right""><font size=2>营业员:" & CurOperator & " 工号:" & OperatorID & " 日期:" & Date & " </font></p>"
Print #1, "<font size=2>利息计算说明:</font><BR>"
Print #1, "<font size=2>1年到期利率7%</font><BR>"
Print #1, "<font size=2>3年到期利率8%</font><BR>"
Print #1, "<font size=2>5年到期利率9%</font><BR>"
Print #1, "<font size=2>每逾期一天,每天利率0.05‰</font><BR>"
Print #1, "<font size=2>若未到期提前支取,按每天利率0.05‰计。</font><BR>"
Print #1, "</body></html>"
Close #1
ShellExecute 0, vbNullString, FName, vbNullString, vbNullString, vbMaximizedFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -