?? 主界面.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 + -