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

📄 form12.frm

📁 银行的客户端模块
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form12 
   BorderStyle     =   0  'None
   Caption         =   "开户界面"
   ClientHeight    =   8805
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   8385
   LinkTopic       =   "Form12"
   ScaleHeight     =   8805
   ScaleWidth      =   8385
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text9 
      Enabled         =   0   'False
      Height          =   375
      Left            =   6120
      TabIndex        =   27
      Top             =   5400
      Width           =   1215
   End
   Begin VB.TextBox Text8 
      Height          =   375
      Left            =   3840
      TabIndex        =   25
      Text            =   "10"
      Top             =   5400
      Width           =   1215
   End
   Begin VB.ComboBox Combo3 
      Height          =   300
      ItemData        =   "Form12.frx":0000
      Left            =   1560
      List            =   "Form12.frx":000A
      TabIndex        =   23
      Text            =   "请选择"
      Top             =   5400
      Width           =   1215
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   5280
      TabIndex        =   19
      Text            =   "0"
      Top             =   960
      Width           =   1335
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      ItemData        =   "Form12.frx":001C
      Left            =   5280
      List            =   "Form12.frx":0026
      TabIndex        =   17
      Text            =   "储蓄卡类型"
      Top             =   480
      Width           =   1455
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "Form12.frx":0036
      Left            =   1560
      List            =   "Form12.frx":0040
      TabIndex        =   15
      Text            =   "账号类型"
      Top             =   480
      Width           =   1575
   End
   Begin VB.CommandButton Command2 
      Caption         =   "完成"
      Height          =   495
      Left            =   1680
      TabIndex        =   14
      Top             =   6120
      Width           =   1095
   End
   Begin VB.TextBox Text6 
      Height          =   375
      Left            =   1560
      TabIndex        =   12
      Top             =   4680
      Width           =   4095
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   1560
      TabIndex        =   10
      Top             =   3960
      Width           =   4095
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1560
      TabIndex        =   8
      Top             =   3240
      Width           =   3375
   End
   Begin VB.CommandButton Command1 
      Caption         =   "生成随机账号"
      Height          =   375
      Left            =   5880
      TabIndex        =   6
      Top             =   4680
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1560
      TabIndex        =   5
      Top             =   2520
      Width           =   3375
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1560
      TabIndex        =   3
      Top             =   1800
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Top             =   1080
      Width           =   1815
   End
   Begin VB.Label Label14 
      Caption         =   "利率"
      Height          =   255
      Left            =   5520
      TabIndex        =   26
      Top             =   5520
      Width           =   375
   End
   Begin VB.Label Label13 
      Caption         =   "金额"
      Height          =   255
      Left            =   3000
      TabIndex        =   24
      Top             =   5400
      Width           =   615
   End
   Begin VB.Label Label12 
      Caption         =   "币种"
      Height          =   255
      Left            =   720
      TabIndex        =   22
      Top             =   5400
      Width           =   615
   End
   Begin VB.Label Label11 
      Caption         =   "活期期限为0"
      Height          =   255
      Left            =   5400
      TabIndex        =   21
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label10 
      Caption         =   "年"
      Height          =   255
      Left            =   6720
      TabIndex        =   20
      Top             =   1080
      Width           =   375
   End
   Begin VB.Label Label9 
      Caption         =   "存款期限"
      Height          =   255
      Left            =   3840
      TabIndex        =   18
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label Label8 
      Caption         =   "储蓄卡类型"
      Height          =   255
      Left            =   3840
      TabIndex        =   16
      Top             =   480
      Width           =   1095
   End
   Begin VB.Label Label7 
      Caption         =   "账号"
      Height          =   375
      Left            =   360
      TabIndex        =   13
      Top             =   4680
      Width           =   855
   End
   Begin VB.Label Label6 
      Caption         =   "身份证号码"
      Height          =   255
      Left            =   360
      TabIndex        =   11
      Top             =   4080
      Width           =   1095
   End
   Begin VB.Label Label5 
      Caption         =   "地址"
      Height          =   255
      Left            =   360
      TabIndex        =   9
      Top             =   3240
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "确认密码"
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "密码"
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "姓名"
      Height          =   255
      Left            =   360
      TabIndex        =   2
      Top             =   1320
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "帐户类型"
      Height          =   255
      Left            =   360
      TabIndex        =   0
      Top             =   480
      Width           =   735
   End
End
Attribute VB_Name = "Form12"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Dim create_time As Date



Private Sub Combo1_Click()
If Combo1.Text = "储蓄账号" Then
   Label8.Visible = True
   Combo2.Visible = True
   Label9.Visible = True
   Label10.Visible = True
   Label11.Visible = True
   Text7.Visible = True
Else
   Label8.Visible = False
   Combo2.Visible = False
   Label9.Visible = False
   Label10.Visible = False
   Label11.Visible = False
   Text7.Visible = False
End If
If Combo1.Text = "信用卡账号" Then
   cmd.CommandText = "select * from xinxi0504_23_interest_rate where account_type='信用卡帐户'"
   Set rs = cmd.Execute
   Text9.Text = rs.Fields("rate")
End If

End Sub




Private Sub Combo2_Click()
If Combo1.Text = "储蓄账号" And Combo2.Text = "活期" Then
   cmd.CommandText = "select * from xinxi0504_23_interest_rate where account_type='活期'"
   Set rs = cmd.Execute
   Text9.Text = rs.Fields("rate")
ElseIf Combo1.Text = "储蓄账号" And Combo2.Text = "定期" Then
   cmd.CommandText = "select * from xinxi0504_23_interest_rate where account_type='定期'"
   Set rs = cmd.Execute
   Text9.Text = rs.Fields("rate")
End If
End Sub

Private Sub Command1_Click()
Dim a As String
If Combo1.Text = "账号类型" Then
   MsgBox "请选择帐户类型"
Else
   Select Case Combo1.Text
          Case "储蓄账号"
next_chuxu:   a = Str(Round(Rnd(3) * 10000000000#))
              Do Until Len(a) = 11
                 a = Str(Round(Rnd(3) * 10000000000#))
              Loop
              cmd.CommandText = "select account_id from xinxi0504_23_account where account_id='" & Trim(a) & "'"
              Set rs = cmd.Execute
              If rs.EOF = False Then
                 GoTo next_chuxu
              Else
                 Form12.Text6.Text = a
              End If
          Case "信用卡账号"
next_xinyongka:             a = Str(Round(Rnd(3) * 10000000000#))
              Do Until Len(a) = 11
                 a = Str(Round(Rnd(3) * 10000000000#))
              Loop
              cmd.CommandText = "select credit_id from xinxi0504_23_credit where credit_id='" & Trim(a) & "'"
              Set rs = cmd.Execute
              If rs.EOF = False Then
                 GoTo next_xinyongka
              Else
                 Form12.Text6.Text = a
              End If
     End Select
 End If
              
End Sub

Private Sub Command2_Click()
If Combo1.Text = "帐户类型" Then
    MsgBox "请选择帐户类型"
ElseIf Combo1.Text = "储蓄账号" And Combo2.Text = "储蓄卡类型" Then
    MsgBox "请选择储蓄卡类型"
ElseIf Text7.Text = "" And Combo1.Text = "储蓄帐户" Then
    MsgBox "请输入存款期限"
ElseIf Text1.Text = "" Or Len(Text1.Text) > 8 Then
    MsgBox "没有输入姓名或长度错误"
ElseIf Text2.Text = "" Or Len(Text2.Text) > 10 Then
    MsgBox "没有输入密码或长度错误"
ElseIf Text3.Text <> Text2.Text Then
    MsgBox "两次密码不一样"
ElseIf Text4.Text = "" Or Len(Text4.Text) > 30 Then
   MsgBox "没有输入地址或长度错误"
ElseIf Len(Text5.Text) <> 18 Then
   MsgBox "输入身份证错误"
ElseIf Text6.Text = "" Then
   MsgBox "请生成随机账号"
ElseIf Combo3.Text = "请选择" Then
   MsgBox "请选择币种"
ElseIf Combo1.Text = "储蓄账号" Then
  cmd.CommandText = "insert into xinxi0504_23_account values('" & Trim(Text6.Text) & "'," + _
                                               "'" & Trim(Combo2.Text) & "'," + _
                                               "'" & Trim(Text2.Text) & "'," + _
                                               "'" & Str(create_time) & "'," + _
                                               "" & Fix(Val(Trim(Text7.Text))) & "," + _
                                               "'" & Trim(Text1.Text) & "'," + _
                                               "'" & Trim(Text4.Text) & "'," + _
                                               "'" & Trim(Text5.Text) & "'," + _
                                               "'','0'," & Val(Text9.Text) & ")"
  cmd.Execute
  cmd.CommandText = "insert into xinxi0504_23_account_balance values('" & Trim(Text6.Text) & "','" & Trim(Combo3.Text) & "'," & Val(Text8.Text) & ")"
  cmd.Execute
  MsgBox "新建储蓄帐号成功"
  Text6.Text = ""
Else
   cmd.CommandText = "insert into xinxi0504_23_credit values('" & Trim(Text6.Text) & "'," + _
                                               "'" & Trim(Text2.Text) & "'," + _
                                                "'" & Str(create_time) & "'," + _
                                               "'" & Trim(Text1.Text) & "'," + _
                                               "'" & Trim(Text4.Text) & "'," + _
                                               "'" & Trim(Text5.Text) & "'," + _
                                               "'','0'," & Val(Text9.Text) & ")"
  cmd.Execute
  cmd.CommandText = "insert into xinxi0504_23_credit_balance values('" & Trim(Text6.Text) & "','" & Trim(Combo3.Text) & "'," & Val(Text8.Text) & ")"
  cmd.Execute
  MsgBox "新建信用卡帐号成功"
  Text6.Text = ""

End If
End Sub

Private Sub Form_Load()
create_time = DateTime.Date
Label8.Visible = False
Combo2.Visible = False
Label9.Visible = False
Label10.Visible = False
Label11.Visible = False
Text7.Visible = False
Form12.Text6.Enabled = False
Combo1.Text = "账号类型"
Combo2.Text = "储蓄卡类型"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = "0"
Text8.Text = "10"

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





Private Sub Text8_Change()
If Val(Text8.Text) < 10 Then
   MsgBox "开户金额最小为10"
   Text8.SetFocus
End If
End Sub

Private Sub Text8_LostFocus()
If Val(Text8.Text) < 10 Then
   MsgBox "开户金额最小为10"
   Text8.SetFocus
End If
End Sub

⌨️ 快捷键说明

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