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

📄 form19.frm

📁 银行的客户端模块
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form19 
   BorderStyle     =   0  'None
   Caption         =   "转账"
   ClientHeight    =   7230
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   8805
   LinkTopic       =   "Form19"
   ScaleHeight     =   7230
   ScaleWidth      =   8805
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   375
      Left            =   3600
      TabIndex        =   11
      Top             =   4920
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   375
      Left            =   1680
      TabIndex        =   10
      Top             =   4920
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   2760
      TabIndex        =   9
      Top             =   3840
      Width           =   1935
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      ItemData        =   "Form19.frx":0000
      Left            =   2760
      List            =   "Form19.frx":000D
      TabIndex        =   7
      Text            =   "请选择"
      Top             =   3120
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2760
      TabIndex        =   5
      Top             =   2400
      Width           =   2055
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2760
      TabIndex        =   3
      Top             =   1680
      Width           =   2055
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "Form19.frx":0025
      Left            =   2760
      List            =   "Form19.frx":002F
      TabIndex        =   1
      Text            =   "请选择"
      Top             =   1080
      Width           =   1455
   End
   Begin VB.Label Label6 
      Caption         =   "10位"
      Height          =   255
      Left            =   5160
      TabIndex        =   12
      Top             =   1680
      Width           =   855
   End
   Begin VB.Label Label5 
      Caption         =   "金额"
      Height          =   255
      Left            =   1320
      TabIndex        =   8
      Top             =   3840
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "币种"
      Height          =   255
      Left            =   1320
      TabIndex        =   6
      Top             =   3120
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "确认转入账号"
      Height          =   255
      Left            =   1320
      TabIndex        =   4
      Top             =   2520
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "转入账号"
      Height          =   255
      Left            =   1320
      TabIndex        =   2
      Top             =   1800
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "转入帐户类型"
      Height          =   255
      Left            =   1320
      TabIndex        =   0
      Top             =   1080
      Width           =   1215
   End
End
Attribute VB_Name = "Form19"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
If Combo1.Text = "请选择" Then
   MsgBox "请选择转入帐户类型"
ElseIf Combo1.Text = "请选择" Then
    MsgBox "请选择币种"
ElseIf Len(Text1.Text) <> 10 Then
    MsgBox "账号错误"
ElseIf Text2.Text <> Text1.Text Then
    MsgBox "两次输入帐号不一样"
ElseIf Text3.Text = "" Then
   MsgBox "输入转账金额"
Else
   Select Case Combo1.Text
          Case "储蓄帐户"
               cmd.CommandText = "select account_id from xinxi0504_23_account where account_id='" & Trim(Text1.Text) & "' and account_type='活期'"
               Set rs = cmd.Execute
               If rs.EOF = True Then
                  MsgBox "转入帐号错误"
               Else
                  Select Case account_type
                         Case "储蓄帐户"
                              cmd.CommandText = "select * from xinxi0504_23_account_balance where account_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                              Set rs = cmd.Execute
                              If rs.EOF = True Then
                              MsgBox "余额不足"
                              ElseIf Val(Text3.Text) > Val(rs.Fields("balance")) Then
                                 MsgBox "余额不足"
                              Else
                                 cmd.CommandText = "insert into xinxi0504_23_transit_record values('" & account_id & "','" & Trim(Text1.Text) & "','" & Trim(Combo1.Text) & "','" & Str(DateTime.Now) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ",'" & employee_id & "')"
                                 cmd.Execute
                                 cmd.CommandText = "update xinxi0504_23_account_balance set balance=balance-" & Val(Text3.Text) & " where account_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 cmd.Execute
                                 cmd.CommandText = "select * from xinxi0504_23_account_balance where account_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 Set rs = cmd.Execute
                                 Select Case rs.EOF
                                        Case True
                                             cmd.CommandText = "insert into xinxi0504_23_account_balance values('" & Trim(Text1.Text) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ")"
                                             cmd.Execute
                                             
                                        Case False
                                             cmd.CommandText = "update xinxi0504_23_account_balance set balance=balance+" & Val(Text3.Text) & " where account_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                             cmd.Execute
                                 End Select
                                 MsgBox "转账成功"
                                 Combo1.Text = "请选择"
                                 Combo2.Text = "请选择"
                                 Text1.Text = ""
                                 Text2.Text = ""
                                 Text3.Text = ""
                              End If
                          Case "信用卡帐户"
                              cmd.CommandText = "select * from xinxi0504_23_credit_balance where credit_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                              Set rs = cmd.Execute
                              If rs.EOF = True Then
                              MsgBox "余额不足"
                              ElseIf Val(Text3.Text) > Val(rs.Fields("balance")) Then
                                 MsgBox "余额不足"
                              Else
                                 cmd.CommandText = "insert into xinxi0504_23_transit_record values('" & account_id & "','" & Trim(Text1.Text) & "','" & Trim(Combo1.Text) & "','" & Str(DateTime.Now) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ",'" & employee_id & "')"
                                 cmd.Execute
                                 cmd.CommandText = "update xinxi0504_23_credit_balance set balance=balance-" & Val(Text3.Text) & " where credit_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 cmd.Execute
                                 cmd.CommandText = "select * from xinxi0504_23_account_balance where account_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 Set rs = cmd.Execute
                                 Select Case rs.EOF
                                        Case True
                                             cmd.CommandText = "insert into xinxi0504_23_account_balance values('" & Trim(Text1.Text) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ")"
                                             cmd.Execute
                                             
                                        Case False
                                             cmd.CommandText = "update xinxi0504_23_account_balance set balance=balance+" & Val(Text3.Text) & " where account_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                             cmd.Execute
                                 End Select
                                 MsgBox "转账成功"
                                 Combo1.Text = "请选择"
                                 Combo2.Text = "请选择"
                                 Text1.Text = ""
                                 Text2.Text = ""
                                 Text3.Text = ""
                              End If
                   End Select
               End If
         Case "信用卡帐户"
                cmd.CommandText = "select credit_id from xinxi0504_23_credit where credit_id='" & Trim(Text1.Text) & "'"
               Set rs = cmd.Execute
               If rs.EOF = True Then
                  MsgBox "转入帐号错误"
               Else
                  Select Case account_type
                         Case "储蓄帐户"
                              cmd.CommandText = "select * from xinxi0504_23_account_balance where account_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                              Set rs = cmd.Execute
                              If rs.EOF = True Then
                                MsgBox "余额不足"
                              ElseIf Val(Text3.Text) > Val(rs.Fields("balance")) Then
                              
                                 MsgBox "余额不足"
                              Else
                                 cmd.CommandText = "insert into xinxi0504_23_transit_record values('" & account_id & "','" & Trim(Text1.Text) & "','" & Trim(Combo1.Text) & "','" & Str(DateTime.Now) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ",'" & employee_id & "')"
                                 cmd.Execute
                                 
                                 cmd.CommandText = "update xinxi0504_23_account_balance set balance=balance-" & Val(Text3.Text) & " where account_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 cmd.Execute
                                 cmd.CommandText = "select * from xinxi0504_23_credit_balance where credit_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 Set rs = cmd.Execute
                                 Select Case rs.EOF
                                        Case True
                                             cmd.CommandText = "insert into xinxi0504_23_credit_balance values('" & Trim(Text1.Text) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ")"
                                             cmd.Execute
                                             
                                        Case False
                                             cmd.CommandText = "update xinxi0504_23_credit_balance set balance=balance+" & Val(Text3.Text) & " where credit_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                             cmd.Execute
                                 End Select
                                 MsgBox "转账成功"
                                 Combo1.Text = "请选择"
                                 Combo2.Text = "请选择"
                                 Text1.Text = ""
                                 Text2.Text = ""
                                 Text3.Text = ""
                              End If
                          Case "信用卡帐户"
                              cmd.CommandText = "select * from xinxi0504_23_credit_balance where credit_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                              Set rs = cmd.Execute
                              If rs.EOF = True Then
                              MsgBox "余额不足"
                              ElseIf Val(Text3.Text) > Val(rs.Fields("balance")) Then
                                 MsgBox "余额不足"
                              Else
                                 cmd.CommandText = "insert into xinxi0504_23_transit_record values('" & account_id & "','" & Trim(Text1.Text) & "','" & Trim(Combo1.Text) & "','" & Str(DateTime.Now) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ",'" & employee_id & "')"
                                 cmd.Execute
                                 cmd.CommandText = "update xinxi0504_23_credit_balance set balance=balance-" & Val(Text3.Text) & " where credit_id='" & account_id & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 cmd.Execute
                                 cmd.CommandText = "select * from xinxi0504_23_credit_balance where credit_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                 Set rs = cmd.Execute
                                 Select Case rs.EOF
                                        Case True
                                             cmd.CommandText = "insert into xinxi0504_23_credit_balance values('" & Trim(Text1.Text) & "','" & Trim(Combo2.Text) & "'," & Val(Text3.Text) & ")"
                                             cmd.Execute
                                             
                                        Case False
                                             cmd.CommandText = "update xinxi0504_23_credit_balance set balance=balance+" & Val(Text3.Text) & " where credit_id='" & Trim(Text1.Text) & "' and money_type='" & Trim(Combo2.Text) & "'"
                                             cmd.Execute
                                 End Select
                                 MsgBox "转账成功"
                                 Combo1.Text = "请选择"
                                 Combo2.Text = "请选择"
                                 Text1.Text = ""
                                 Text2.Text = ""
                                 Text3.Text = ""
                              End If
                   End Select
               End If
       End Select
End If

End Sub

Private Sub Command2_Click()
Form16.Show
Unload Form19
End Sub

Private Sub Form_Load()
Combo1.Text = "请选择"
Combo2.Text = "请选择"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""


Set rs = New ADODB.Recordset
cmd.CommandType = adCmdText
End Sub

⌨️ 快捷键说明

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