Professional Documents
Culture Documents
Synopsis
Project Title: - Bank automation system
AIM:-To maintains information about the entire
transaction of bank.
It will also maintain the information about the
customer who makes transaction.
Bank automation system, this package is
intended to use options like opening bank
account of various types for the customer and
also maintaining their transaction details as well
as their personal details, time to time calculating
the interest of their deposit amount and after
withdrawing amount what is their balance
amount and for the fixed deposit account its
calculating the maturity date and maturity
amount according to rate of interest and number
of months.
Our objective is to develop a software using
Visual basic 6.0 as front-end and oracle as backend to manage entire operation of a bank.
Software requirements:-
Hardware requirements:-
Processor
Ram
Hard Disc
:Pentium-IV
:256MB
:80GB
Contents
Contents
1.
2.
3.
4.
5.
6.
7.
8.
9.
Introduction to Project
About Visual Basic 6.0
About Oracle
Tables
ER-Diagrams
Forms
Source Code
Conclusion
Bibliography
Introduction to Project
Introduction To
Visual Basic 6.0
MAIN BAR:
TOOL BOX:
PROPERTIES WINDOW:
Lists the property settings for particular form.
PROJECT WINDOW:
FORM DESIGNER:
Serves as a window that we customize to design the
interface of the application. We add controls, graphics and
pictures to a create the look we want. Each form in the
applications has own form designer windows.
VB OBJECTS:
An object is combination of code and data that can be
treated as a unit. An object can be piece of application like
a control or a form. The objects used in our project are:
Text box, Label, Command button. Frames, picture box,
combo box, Data Grid etc.
Introduction to Oracle
ORACLE
Oracle 8 is an Object Relational Database System
(ORDBMS).It offers capabilities of both relational and
object-oriented database systems .in general, objects
can be defined as reusable software codes which are
location independent and perform a specific task on
any application environment with little or no change
to the code.
Oracle products are based on a concept known as
client-server technology. This concept involves
segregating the processing of an application between
two systems. One performs all activities related to
the database (server) and the other performs
activities that help the user interact with the
application (client).
A client or front end database application also
interacts with the database by requesting and
receiving information from the database server. It
acts as an interface between the user and the
database. Further it also checks for the validation
against the data entered by the user.
The database server or back end is used to manage
the database tables optimally among the multiple
clients who concurrently request for the server for
the same data. It also enforces data integrity across
ORACLE REPORTS
Tools of Oracle
Introduction to SQL
SQL was invented and developed by IBM in early
1970s. SQL stands for Structured Query Language.
The SQL implemented by ORACLE CORPORATION is
100% compliant with the ANSI/ISO standard SQL data
language. Oracles database language is SQL, which
is used for storing and retrieving information in
Oracle. A table is a database object of SQL that is
used to store data. A table holds data in the form of
rows & columns.
TABLES:
NUMBER(10),
BNA
VARCHAR2(50),
BADDR
VARCHAR2(50),
PH_NO
VARCHAR2(15),
E_MAIL
VARCHAR2(20),
BCODE
VARCHAR2(10),
CNA
NUMBER(5),
CADDR
PIN
BNO
NUMBER(10),
BCODE
VARCHAR2(10),
CITY
VARCHAR2(15)
PH_NO
E_MAIL
VARCHAR2(20)
not null,
not null,
PRIMARY KEY(CDNO),
FOREIGN KEY(BNO,BCODE) references BRANCH(BNO,BCODE));
NUMBER(5),
BAL
NUMBER(15,2),
ACC_TYPE
VARCHAR2(25),
WITH_DRAWL
NUMBER(15,2),
CDNO
NUMBER(5),
DEP_DATE
DATE,
DEPOSIT_AMT
NUMBER(15,2),
FAST_AMT
NUMBER(15,2),
BNO
NUMBER(10),
BCODE
VARCHAR2(10),
PRIMARY KEY(ACC_NO),
FOREIGN KEY(CDNO) REFERENCES CUSTOMER(CDNO),
FOREIGN KEY(BNO,BCODE) REFERENCES BRANCH(BNO,BCODE));
TRANS_DATE DATE,
TIME
varchar2(15),
PRIMARY KEY(CDNO,ACC_NO),
FOREIGN KEY(CDNO) REFERENCES CUSTOMER(CDNO),
FOREIGN KEY(ACC_NO) REFERENCES ACCOUNT(ACC_NO));
ER DIAGRAM:
Bad
dr
Bco
de
Phone
No
CIT
Y
Bname
BANK
Dep_a
mt
Fast_amt
1
ha
s
Bal
Acc_n
o
Conta
ins
BRANCHES
ACCOUNTS
Transa
cts
Ph_no
Bno
Bcode
cdn
o
E_mai
l
Bna
Dep_d
ate
With_dr
awn
Trans_dat
e
Tim
e
by
CUSTOMER
Cdno
Pin
E_mail
Cna
Ph_no
Caddr
City
FORMS:
SOURCE CODE
NEW CUSTOMER FORM:
Private cn As New ADODB.Connection
Private rs As New ADODB.Recordset
Private rs1 As New ADODB.Recordset
Private rs2 As New ADODB.Recordset
Private rs3 As New ADODB.Recordset
Dim c As Integer
Private Sub cmdadd_Click()
Command1.Visible = True
cmdadd.Visible = False
Call enable
Call lockfree
assign
rs.Update
cn.Execute ("UPDATE ACCOUNT SET Bno=" & Val(Text5) & ",bcode='" & "S\B\I" & "'" & "where cdno="
& c)
MsgBox "One customer record has been updated", , "message"
End Sub
If a = vbYes Then
rs.Delete
MsgBox "Ur customer record has removed", , "Message"
rs.MoveFirst
rs3.MoveFirst
showrec
Else
MsgBox "U have resumed ", , "Message"
Exit Sub
End If
End Sub
Text2.SetFocus
End Sub
rs.MoveLast
rs3.MoveLast
MsgBox "THIS IS THE LAST RECORD", , "ATM"
End If
showrec
End Sub
Text7.SetFocus
ElseIf Text8 = "" Then
MsgBox "Please Enter your E-mail ID", vbInformation
Text8.SetFocus
ElseIf Combo1.Text = "" Then
MsgBox "Please Select The Branch Name", vbInformation
Else
Command6.Visible = False
cmdadd.Visible = True
Call disable
End If
End Sub
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub
Private Sub showrec()
If rs.RecordCount = Null Then
MsgBox "Enter some values and try", vbExclamation
Else
If rs.EOF = True Then
MsgBox "NO records found", , "ATM"
Else
If rs.BOF = True Then
rs.MoveFirst
MsgBox "THIS IS THE FIRST RECORD", , "ATM"
Else
Text1.Text = rs(0)
Text9.Text = rs3(0)
Text2.Text = rs(1)
Text3.Text = rs(2)
Text4.Text = rs(3)
Text5.Text = rs(4)
Text7.Text = rs(7)
Text8.Text = rs(8)
If Val(Text5.Text) = 1 Then
Combo1.Text = "sbi-1"
Text6.Text = "3446799(080)"
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text5.Enabled = False
Text9.Enabled = False
End Sub
Public Sub enable()
Text5.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Combo1.Enabled = True
Text1.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text6.Enabled = True
End Sub
End If
End Sub
Private Sub combo1_Click()
Set rs1 = Nothing
rs1.Open "select * from branch where bna like'" & Combo1.Text & "' ", cn, adOpenDynamic,
adLockOptimistic
If rs1.EOF <> True Then
Text5.Text = rs1(0)
Text6.Text = rs1(3)
End If
rs1.Close
End Sub
Text7.Locked = False
Text8.Locked = False
End Sub
Text3.Locked = True
Text4.Locked = True
Combo1.Locked = True
Text5.Locked = True
Text7.Locked = True
Text8.Locked = True
Text9.Locked = True
Text6.Locked = True
End Sub
cmdCancel.Visible = False
lblLabels(0).Visible = False
lblLabels(1).Visible = False
Label1.Visible = True
Label2.Visible = True
flag1 = 0
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
txtPassword = ""
End If
Else
MsgBox "Invalid user, try again!", , "Login"
txtUserName.SetFocus
txtUserName = ""
End If
End Sub
ProgressBar1.Value = ProgressBar1.Value + 1
Label2.Caption = ProgressBar1.Value & " % completed"
Else
Unload Me
MDIForm1.Show
Exit Sub
End If
End Sub
cmdCancel.Visible = False
lblLabels(0).Visible = False
lblLabels(1).Visible = False
Label1.Visible = True
Label2.Visible = True
flag1 = 0
Else
End Sub
If days = 0 Then
If ((rs(1) + rs(2)) - form8.d) >= 10000 Then
MsgBox "your can't withdraw more than 10,000 on same day " & rs(0), , "MESSAGE"
Unload Me
form8.Show
Else
If opt1000.Value = True And rs(0) >= 1500 Then
cn.Execute ("update ACCOUNT set bal=bal-1000,FAST_AMT=" & 1000 + rs1(0) & "where cdno=" & cno)
cn.Execute ("UPDATE TRANS SET trans_date='" & Format(Date, "DD-MMM-YYYY") & "',TIME= '" &
Label3.Caption & "'where cdno=" & cno)
MsgBox "Now UR balance is " & rs(0) - 1000, , "MESSAGE"
MsgBox "U can't make transaction becouse ur balance is " & rs(0), , "MESSAGE"
End If
End If
End If
Else
If opt1000.Value = True And rs(0) >= 1000 Then
cn.Execute ("update ACCOUNT set bal=bal-1000,FAST_AMT=" & 1000 + rs1(0) & "where cdno=" & cno)
cn.Execute ("UPDATE TRANS SET trans_date='" & Format(Date, "DD-MMM-YYYY") & "',TIME= '" &
Label3.Caption & "'where cdno=" & cno)
MsgBox "Now UR balance is " & rs(0) - 1000, , "MESSAGE"
cn.Execute ("update ACCOUNT set bal=bal-5000,FAST_AMT=" & 5000 + rs1(0) & " where cdno=" & cno)
cn.Execute ("UPDATE TRANS SET trans_date='" & Format(Date, "DD-MMM-YYYY") & "',TIME= '" &
Label3.Caption & "'where cdno=" & cno)
MsgBox "Now UR balance is " & rs(0) - 5000, , "MESSAGE"
Else
MsgBox "U can't make transaction becouse ur balance is " & rs(0), , "MESSAGE"
Unload Me
form8.Show
End If
End If
Unload Me
form8.Show
cn.Close
Set rs = Nothing
Set rs2 = Nothing
End Sub
End Sub
Private Sub cmdok_Click()
If Text1.Text = "" Then
MsgBox "PLEASE ENTER THE AMOUNT TO WITH DRAW", vbInformation, "ATM"
Text1.SetFocus
End If
cn.Open "dsn=ATM", "ATM", "ATM"
Set rs1 = Nothing
rs.Open "SELECT BAL,ACC_TYPE,DEP_DATE,with_drawl,fast_amt FROM ACCOUNT WHERE
CDNO=" & cno, cn, adOpenDynamic, adLockOptimistic
rs1.Open "select nvl(with_drawl,0) from ACCOUNT where cdno=" & cno, cn, adOpenDynamic,
adLockOptimistic
rs2.Open "SELECT trans_date FROM trans WHERE CDNO=" & cno, cn, adOpenDynamic,
adLockOptimistic
If rs(1) = "SAVINGS ACCOUNT" Then
If Val(Text1.Text) >= 100 And Val(Text1.Text) <= 5000 Then
If Val(rs(0) - Val(Text1.Text)) >= 500 Then
Text1.Text = ""
Unload Me
form8.Show
Else
If Val(Text1.Text) >= 100 And Val(Text1.Text) <= 5000 Then
If Val(rs(0) - Val(Text1.Text)) >= 500 Then
cn.Execute ("update ACCOUNT set bal=" & rs(0) - Val(Text1) & ",with_drawl=" & rs1(0) + Val(Text1) &
"where cdno=" & cno)
cn.Execute ("UPDATE TRANS SET trans_date='" & Format(Date, "DD-MMM-YYYY") & "',TIME=
'" & Label3.Caption & "'where cdno=" & cno)
MsgBox "NOW UR BALANCE IS " & rs(0) - Val(Text1), , "ATM"
Text1.Text = ""
Unload Me
form8.Show
Else
MsgBox "U can't make transaction becouse ur balance is " & rs(0), , "MESSAGE"
Text1.Text = ""
Unload Me
form8.Show
End If
Else
MsgBox "Ur limit only between 100 to 5000", vbOKOnly, "CRITICAL"
Text1.Text = ""
Unload Me
form8.Show
End If
End If
Else
cn.Execute ("update ACCOUNT set bal=" & rs(0) - Val(Text1) & ",with_drawl=" & rs1(0) +
Val(Text1) & "where cdno=" & cno)
cn.Execute ("UPDATE TRANS SET trans_date='" & Format(Date, "DD-MMM-YYYY") & "',TIME=
'" & Label3.Caption & "'where cdno=" & cno)
MsgBox "NOW UR BALANCE IS " & rs(0) - Val(Text1)
Text1.Text = ""
Unload Me
form8.Show
End If
Else
MsgBox "U can't make transaction becouse ur balance is " & rs(0), , "MESSAGE"
Text1.Text = ""
Unload Me
form8.Show
End If
Else
MsgBox "Ur limit only between 100 to 5000", vbOKOnly, "CRITICAL"
Text1.Text = ""
Text1.SetFocus
End If
Else
form8.Show
Else
MsgBox "U can't make transaction becouse ur balance is " & rs(0), , "MESSAGE"
Unload Me
form8.Show
End If
End If
cn.Close
End Sub
Private Sub Form_Load()
cn2.Open "dsn=ATM", "ATM", "ATM"
Label1.Caption = FormatDateTime(Date, 1)
Label3.Caption = Time
rs3.Open "SELECT BAL,ACC_TYPE,DEP_DATE FROM ACCOUNT WHERE CDNO=" & cno, cn2,
adOpenDynamic, adLockOptimistic
Label5.Caption = rs3(1)
Set rs3 = Nothing
cn2.Close
End Sub
KeyAscii = 0
End If
End Sub
rs2.Open "SELECT TRANS_DATE,TIME FROM TRANS WHERE CDNO=" & cno, cn, adOpenDynamic,
adLockOptimistic
cnotxt.Text = "S\B\I" & cno
txtacc.Text = rs(0)
txtava.Text = rs(1)
txtres.Text = rs(2) - form8.a
Text3.Text = (rs(3) + rs(4)) - form8.d
b = Val(Text3)
Text1.Text = rs2(0)
Text2.Text = rs2(1)
End Sub
Private Sub Timer1_Timer()
End Sub
datetxt.Text = FormatDateTime(Date, 1)
timetxt.Text = Time
cn.Open "dsn=ATM", "ATM", "ATM"
rs.Open "select acc_type,bal,deposit_amt,with_drawl,fast_amt from ACCOUNT where cdno=" & cno, cn,
adOpenDynamic, adLockOptimistic
rs2.Open "SELECT TRANS_DATE,TIME FROM TRANS WHERE CDNO=" & cno, cn, adOpenDynamic,
adLockOptimistic
cnotxt.Text = "S\B\I" & cno
txtacc.Text = rs(0)
txtava.Text = rs(1)
txtres.Text = rs(2) - form8.a
Text3.Text = (rs(3) + rs(4)) - form8.d
b = Val(Text3)
Text1.Text = rs2(0)
Text2.Text = rs2(1)
End Sub
Private Sub Timer1_Timer()
End Sub
Text2.Text = rs2(1)
End Sub
Unload Me
DataEnvironment1.Connection1.Open
DataEnvironment1.Command5 a
DataReport4.Refresh
DataReport4.Show
DataEnvironment1.Connection1.Close
Else
MsgBox "PLEASE TYPE CORRECT CARD NUMBER", vbExclamation, "ATM"
Text1 = ""
Text1.SetFocus
End If
cn.Close
End If
End Sub
Label3.Caption = FormatDateTime(Date, 1)
Label4.Caption = Time
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If ((KeyAscii <= 90 And KeyAscii >= 65) Or (KeyAscii <= 122 And KeyAscii >= 97) Or (KeyAscii < 48)
And Not (KeyAscii = 8)) Then
KeyAscii = 0
End If
End Sub
Public a As Integer
Public b As String
Private Sub cmdok_Click()
If txtentcdno.Text = "" Then
MsgBox "PLEASE ENTER YOUR CARD NUMBER", vbInformation, "ATM"
txtentcdno.SetFocus
Else
Dim flag As Integer
cn.Open "dsn=ATM;uid=ATM;pwd=ATM"
Set rs = Nothing
rs.Open "select cdno,cna from customer", cn, adOpenDynamic, adLockBatchOptimistic
rs.MoveFirst
While rs.EOF <> True
If Val(Right(txtentcdno, 4)) = rs(0) Then
flag = 1
a = rs(0)
b = rs(1)
cno = rs(0)
End If
rs.MoveNext
Wend
If flag = 1 Then
Unload Me
form7.Show
Else
MsgBox "PLEASE TYPE CORRECT CARD NUMBER.", vbExclamation, "ATM"
txtentcdno = ""
txtentcdno.SetFocus
End If
cn.Close
End If
End Sub
Private Sub Comcancel_Click()
MDIForm1.Show
Unload Me
End Sub
Public i As Integer
Private Sub cmdCancel_Click()
On Error Resume Next
MDIForm1.Show
cn.Close
rs1.Close
Unload Me
Unload form6
End Sub
Private Sub cmdok_Click()
If txtpinent.Text = "" Then
MsgBox "PLEASE ENTER YOUR PIN NUMBER", vbInformation, "ATM"
txtpinent.SetFocus
Else
cn.Open "dsn=ATM;uid=ATM;pwd=ATM"
rs1.Open "select pin from customer where cdno=" & form6.a, cn, adOpenDynamic, adLockOptimistic
If rs1(0) = txtpinent.Text Then
form8.Show
Unload Me
Unload form6
Else
MsgBox "INVALID PIN", vbExclamation, "ATM"
txtpinent.Text = ""
txtpinent.SetFocus
End If
cn.Close
End If
End Sub
TRANSACTION FORM:
Public a As Double
Public b As Double
Public c As Double
Public d As Double
Dim cn1 As New ADODB.Connection
Dim r As New ADODB.Recordset
form13.Show
End Sub
form8.Hide
End Sub
End Sub
Form3.Show
End Sub
DataReport3.Refresh
DataReport3.Show
DataEnvironment1.Connection1.Close
Else
j=0
End If
End Sub
End Sub
Conclusion
Bibliography