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

📄 form16.frm

📁 带界面的银行管理系统。包括客户界面和内部管理界面。采用两种方式来实现数据库的连接和实现。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form16 
   BackColor       =   &H00FFFFFF&
   Caption         =   "存款"
   ClientHeight    =   6960
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   7965
   BeginProperty Font 
      Name            =   "楷体_GB2312"
      Size            =   15
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form16"
   Picture         =   "Form16.frx":0000
   ScaleHeight     =   6960
   ScaleWidth      =   7965
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      BackColor       =   &H00C0E0FF&
      Caption         =   "退出"
      Height          =   615
      Left            =   4440
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   5640
      Width           =   2055
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Caption         =   "确定"
      Height          =   615
      Left            =   840
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   5640
      Width           =   2055
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "存款"
      Height          =   5055
      Left            =   360
      TabIndex        =   0
      Top             =   480
      Width           =   6855
      Begin VB.TextBox Text5 
         Height          =   615
         Left            =   5640
         TabIndex        =   14
         Top             =   3720
         Visible         =   0   'False
         Width           =   855
      End
      Begin VB.ComboBox Combo1 
         Height          =   420
         ItemData        =   "Form16.frx":192F0
         Left            =   2880
         List            =   "Form16.frx":19300
         Style           =   2  'Dropdown List
         TabIndex        =   13
         Top             =   3840
         Width           =   2055
      End
      Begin VB.TextBox Text4 
         Height          =   540
         Left            =   2880
         TabIndex        =   11
         Top             =   3000
         Width           =   3135
      End
      Begin VB.TextBox Text3 
         Height          =   495
         Left            =   2880
         TabIndex        =   3
         Top             =   2160
         Width           =   3135
      End
      Begin VB.TextBox Text2 
         Height          =   495
         IMEMode         =   3  'DISABLE
         Left            =   2880
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   1320
         Width           =   3135
      End
      Begin VB.TextBox Text1 
         Height          =   495
         Left            =   2880
         TabIndex        =   1
         Top             =   480
         Width           =   3135
      End
      Begin VB.Label Label5 
         Alignment       =   2  'Center
         BackColor       =   &H00C0E0FF&
         Caption         =   "期限"
         Height          =   495
         Left            =   240
         TabIndex        =   12
         Top             =   3840
         Width           =   1695
      End
      Begin VB.Label Label6 
         Alignment       =   2  'Center
         BackColor       =   &H00C0E0FF&
         Caption         =   "操作帐号"
         Height          =   495
         Left            =   240
         TabIndex        =   10
         Top             =   3000
         Width           =   1695
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         BackColor       =   &H00C0E0FF&
         Caption         =   "元"
         Height          =   495
         Left            =   6240
         TabIndex        =   7
         Top             =   2160
         Width           =   375
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BackColor       =   &H00C0E0FF&
         Caption         =   "所存金额"
         Height          =   495
         Left            =   240
         TabIndex        =   6
         Top             =   2160
         Width           =   1695
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         BackColor       =   &H00C0E0FF&
         Caption         =   "密码"
         Height          =   495
         Left            =   240
         TabIndex        =   5
         Top             =   1320
         Width           =   1695
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00C0E0FF&
         Caption         =   "卡号"
         Height          =   495
         Left            =   240
         TabIndex        =   4
         Top             =   480
         Width           =   1695
      End
   End
End
Attribute VB_Name = "Form16"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rst As New ADODB.Recordset
Dim b As New ADODB.Recordset
Dim a As New ADODB.Recordset
Dim w As Integer
Dim rst1 As New ADODB.Recordset
Private Sub Command1_Click()

con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=wuhao"
   If Text1.Text = "" Then
        MsgBox "卡号不能为空!"
        Text1.SetFocus
  ElseIf Text2.Text = "" Then
        MsgBox "密码不能为空!"
        Text2.SetFocus
  ElseIf Len(Text1.Text) > 15 Then
        MsgBox "卡号不得大于15位"
        Text1.SetFocus
  ElseIf Len(Text2.Text) > 10 Then
        MsgBox "密码不得大于10位"
        Text2.SetFocus
   ElseIf Text4.Text = "" Then
        MsgBox "操作帐号不能为空!"
        Text4.SetFocus
  ElseIf Len(Text4.Text) > 15 Then
        MsgBox "操作帐号不得大于15位"
        Text4.SetFocus
    
        Else
   a.Open "select * from worker_xx053_19 where worker_id='" & Trim(Text4.Text) & "'", con, adOpenKeyset, adLockOptimistic
If (a.EOF) Then
       MsgBox "操作帐号错误,请重新输入", vbExclamation, "信息错误"
       Text4.Text = ""
       a.Close
              
       Else
        
     hello = a.Sort
     a.MoveLast
rst.Open "select * from account_xx053_19  where account_id='" & Trim(Text1.Text) & "'and password='" & Trim(Text2.Text) & "'", con, adOpenKeyset, adLockOptimistic
  If (rst.EOF) Then

     MsgBox "帐号或密码错误,请重新输入", vbExclamation, "信息错误"
         Text1.Text = ""
         Text2.Text = ""
         Text1.SetFocus
         rst.Close
         Else
  rst1.Open "select * from loss_xx053_19 where account_id='" & Trim(Text1.Text) & "'", con, adOpenKeyset, adLockOptimistic
     If (rst1.EOF) Then

     Text5.Text = Now
     b.Open "select * from in_xx053_19 ", con, adOpenKeyset, adLockOptimistic
     b.AddNew
    
     b.Fields(0) = Text1.Text
     'c.Close
     b.Fields(1) = Trim(Text4.Text)
      
     b.Fields(2) = Trim(Text3.Text)
     b.Fields(3) = Trim(Text5.Text)
     b.Fields(4) = Trim(Combo1.Text)
     
      MsgBox "存款成功!", vbExclamation
       
     rs.Open "select * from account_xx053_19 where account_id='" & Trim(Text1.Text) & "'and password='" & Trim(Text2.Text) & "'", con, adOpenKeyset, adLockOptimistic
     w = rs.Fields(3)
      rs.Fields(3) = w + Text3.Text
    
     rs.Update
     rs.Close
           b.Update
      b.Close
    
     Else
      hello = rst1.Sort
     rst1.MoveLast
     MsgBox "该帐号已挂失,请确认后再存款!", vbExclamation
         Text1.Text = ""
         Text2.Text = ""
         Text1.SetFocus
     rst1.Close
     End If
     End If
     End If

      
      con.Close
     End If
     Text1.Text = ""
     Text2.Text = ""
     Text3.Text = ""
     Text4.Text = ""

     







End Sub

Private Sub Command2_Click()
Unload Me
Form4.Show
End Sub

Private Sub Form_Load()

End Sub

⌨️ 快捷键说明

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