⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deposit1.frm

📁 vb做的银行管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form deposit1 
   Caption         =   "存款"
   ClientHeight    =   3045
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6345
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   15
      Charset         =   134
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3045
   ScaleWidth      =   6345
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      Index           =   1
      Left            =   2040
      TabIndex        =   6
      Top             =   1560
      Width           =   2175
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      Index           =   0
      Left            =   2040
      TabIndex        =   5
      Top             =   1035
      Width           =   2175
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3000
      TabIndex        =   2
      Top             =   2160
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   1
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label Label5 
      Caption         =   "存款金额:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   600
      TabIndex        =   4
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "存款(the First)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   3
      Top             =   120
      Width           =   3495
   End
   Begin VB.Label Label1 
      Caption         =   "帐号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   960
      TabIndex        =   0
      Top             =   1080
      Width           =   615
   End
End
Attribute VB_Name = "deposit1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim str As String
Dim input1 As Boolean
input1 = False
str = "select * from account"
Set cn = New adodb.Connection
Dim rst As Recordset
Set rst = New Recordset
Dim dat1 As Date
Dim dat2 As Date
Dim lastmoney As Double
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
cn.Open
rst.Open str, cn, adOpenDynamic, adLockOptimistic
'''''''''''''''''''''''''''
'保证不为空
''''''''''''''''''''''''''
For i = 0 To 1
 If Text1(i).Text = "" Then
 MsgBox "请把数据全部填上!"
 Exit Sub
 End If
 Next i
 ''''''''''''''''''''''''''
 '查找此帐号
 '''''''''''''''''''''''''
 rst.MoveFirst
Do While Not rst.EOF
 If Trim(rst!AuserID) = Text1(0).Text Then
    input1 = True
    GoTo AAA
End If
rst.MoveNext
Loop

If input1 = flase Then
MsgBox "查无此帐号!请重新输入!"
rst.Close
cn.Close
Exit Sub
End If
''''''''''''''''''''''
'算出时间
''''''''''''''''''''
AAA:
dat1 = Format(Date, yyyy, mm, dd)
dat2 = DateDiff("m", rst!lastdate, dat1)

'''''''''''''''''''''''''''
'算出所得利息
'''''''''''''''''''''''''''
permoney = CDbl(rst!percentage) * dat2
lastmoney = CDbl(rst!Endmoney) + permoney + CDbl(Text1(1).Text)
''''''''''''''''''''''''''
'插入信息
'''''''''''''''''''''''''
rst.Fields("Endmoney") = lastmoney
rst.Fields("lastdate") = dat1
rst.Update
rst.Close
cn.Close
MsgBox "存款成功!"

Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -