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

📄 主界面.frm

📁 数据库银行管理系统数据库银行管理系统数据库银行管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Frmmain 
   Caption         =   "银行管理系统主界面"
   ClientHeight    =   5205
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7320
   LinkTopic       =   "Form2"
   ScaleHeight     =   5205
   ScaleWidth      =   7320
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "开户"
      Height          =   495
      Left            =   840
      TabIndex        =   10
      Top             =   4320
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "修改密码"
      Height          =   495
      Left            =   3480
      TabIndex        =   9
      Top             =   3360
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消帐户"
      Height          =   495
      Left            =   840
      TabIndex        =   8
      Top             =   3360
      Width           =   1335
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   615
      Left            =   6120
      Top             =   240
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   1085
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=LXL-C5626F0E7F4"
      OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=LXL-C5626F0E7F4"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2760
      TabIndex        =   6
      Top             =   960
      Width           =   3375
   End
   Begin VB.CommandButton ComExit 
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3480
      TabIndex        =   5
      Top             =   4320
      Width           =   1335
   End
   Begin VB.CommandButton ComFrmfind 
      Caption         =   "查询余额"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3480
      TabIndex        =   4
      Top             =   2520
      Width           =   1335
   End
   Begin VB.CommandButton ComFrmsave 
      Caption         =   "自动存款"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3480
      TabIndex        =   3
      Top             =   1560
      Width           =   1335
   End
   Begin VB.CommandButton ComFrmchange 
      Caption         =   "用户转帐"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   2
      Top             =   2520
      Width           =   1335
   End
   Begin VB.CommandButton ComFrmget 
      Caption         =   "自动取款"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   1
      Top             =   1560
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "请输入您要操作的账号:"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   1080
      Width           =   2175
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "银行模拟系统——主界面"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   0
      TabIndex        =   0
      Top             =   240
      Width           =   6375
   End
End
Attribute VB_Name = "Frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub ComFrmfind_Click()

Dim SQL As String
    If Text1.Text = "" Then
      MsgBox "请输入您要操作的帐号!", vbExclamation + vbOKOnly, "银行系统提示"
      Text1.Text = ""
      Text1.SetFocus
      Exit Sub
    End If
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
                                                                   '与SQL后台数据库建立连接
strr = Trim(Text1.Text)
SQL = "select count(*) from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "' "

Set adoRS = adoCon.Execute(SQL)
If adoRS(0) = 0 Then
 MsgBox "您输入的帐号有误或不存在此帐户,请重新输入!", vbOKOnly + vbExclamation, "银行系统提示"
   Text1.Text = ""
   Text1.SetFocus
Exit Sub
End If

Frmfind.Show
Unload Me
End Sub


Private Sub ComFrmget_Click()

Dim SQL As String
    If Text1.Text = "" Then
      MsgBox "请输入您要操作的帐号!", vbExclamation + vbOKOnly, "银行系统提示"
      Text1.Text = ""
      Text1.SetFocus
      Exit Sub
    End If
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
                                                                   '与SQL后台数据库建立连接
strr = Trim(Text1.Text)
SQL = "select count(*) from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "' "

Set adoRS = adoCon.Execute(SQL)
If adoRS(0) = 0 Then
 MsgBox "您输入的帐号有误或不存在此帐户,请重新输入!", vbOKOnly + vbExclamation, "银行系统提示"
   Text1.Text = ""
   Text1.SetFocus
Exit Sub
End If


Frmget.Show
Unload Me
End Sub
Private Sub ComFrmsave_Click()

Dim SQL As String
    If Text1.Text = "" Then
      MsgBox "请输入您要操作的帐号!", vbExclamation + vbOKOnly, "银行系统提示"
      Text1.Text = ""
     Text1.SetFocus
      Exit Sub
    End If
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
                                                                   '与SQL后台数据库建立连接
strr = Trim(Text1.Text)
SQL = "select count(*) from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "' "

Set adoRS = adoCon.Execute(SQL)
If adoRS(0) = 0 Then
 MsgBox "您输入的帐号有误或不存在此帐户,请重新输入!", vbOKOnly + vbExclamation, "银行系统提示"
   Text1.Text = ""
   Text1.SetFocus
Exit Sub
End If


Frmsave.Show
Unload Me
End Sub
Private Sub ComFrmchange_Click()

Dim SQL As String
    If Text1.Text = "" Then
      MsgBox "请输入您要操作的帐号!", vbExclamation + vbOKOnly, "银行系统提示"
      Text1.Text = ""
     Text1.SetFocus
      Exit Sub
    End If
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
                                                                   '与SQL后台数据库建立连接

SQL = "select count(*) from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "' "

Set adoRS = adoCon.Execute(SQL)
If adoRS(0) = 0 Then
 MsgBox "您输入的帐号有误或不存在此帐户,请重新输入!", vbOKOnly + vbExclamation, "银行系统提示"
   Text1.Text = ""
   Text1.SetFocus
Exit Sub
End If

Frmchange.Show

Unload Me
End Sub

Private Sub ComExit_Click()


 Unload Me
 Frmlogin.Show
 

End Sub

Private Sub Command1_Click()
Unload Me
bzjm.Show
End Sub


Private Sub Command2_Click()

Dim bb As String
Dim SQL As String
    If Text1.Text = "" Then
      MsgBox "请输入您要操作的帐号!", vbExclamation + vbOKOnly, "银行系统提示"
      Text1.Text = ""
      Text1.SetFocus
      Exit Sub
    End If
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
Dim rss As ADODB.Recordset
Set rss = New ADODB.Recordset
strsql = "select * from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "'"
rss.Open strsql, cn, adOpenKeyset, adLockOptimistic

Do While Not rss.EOF
    If Trim(rss!卡号) = Trim(Text1.Text) Then
rss.Delete
MsgBox "帐户取消成功!"
 Text1.Text = ""
Exit Sub
   Else
   rss.MoveNext
End If
Loop
 MsgBox "您输入的帐号有误或不存在此帐户,请重新输入!", vbOKOnly + vbExclamation, "银行系统提示"
   Text1.Text = ""
   Text1.SetFocus
'MsgBox "text1.text=" & Trim(Text1.Text)
'txtsql = "delete from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "'"
'Set adoRS = ExecuteSQL(txtsql, bb)

End Sub

Private Sub Command3_Click()


Dim SQL As String
    If Text1.Text = "" Then
      MsgBox "请输入您要操作的帐号!", vbExclamation + vbOKOnly, "银行系统提示"
      Text1.Text = ""
     Text1.SetFocus
      Exit Sub
    End If
Set adoCon = New ADODB.Connection
adoCon.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
                                                                   '与SQL后台数据库建立连接
strr = Trim(Text1.Text)
SQL = "select count(*) from zhanghu_05_10 where 卡号='" & Trim(Text1.Text) & "' "

Set adoRS = adoCon.Execute(SQL)
If adoRS(0) = 0 Then
 MsgBox "您输入的帐号有误或不存在此帐户,请重新输入!", vbOKOnly + vbExclamation, "银行系统提示"
   Text1.Text = ""
   Text1.SetFocus
Exit Sub
End If
form1.Show
Unload Me
End Sub

Private Sub Command4_Click()
frmnew.Show
Unload Me
End Sub

⌨️ 快捷键说明

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