a project report for bca

110
A project Report for BCA Under the guidance of: Mr. Ajay Submitted by: Pankaj Registration No: Course: BCA Semester: FINAL

Upload: aman-prashar

Post on 29-Nov-2014

289 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: A Project Report for BCA

A project Report for BCA

Under the guidance of: Mr. Ajay

Submitted by:

Pankaj Registration No:

Course: BCA Semester: FINAL

INDEX

TOPIC PAGE NO

Page 2: A Project Report for BCA

Certificate 3

Acknowledgement 4-5

Introduction 6-8

Study of Existing System 9-10

Problem Definition 11-12

Need for Computerization 13-14

System Study 15-16

Proposed System 17-18

Feasibility Study 19-21

System Analysis 22-23

Front End Visual Basic 24-25

Back End MS Access 26-30

Data Flow Diagrams 31-35

Entity Relation Diagram 36-37

Database Detail 38-41

Flow Charts 42-49

Hardware and Software Req. 50-51

Forms Detail 52-58

Coding 59-82

Testing Mechanism 83-84

Implementation Mechanism 85-86

Bibliography 87-88

CERTIFICATE

Page 3: A Project Report for BCA

This is to Certify that this project entitled School Management

System submitted in partial fulfillment of the Bachelor of

Computer Application to the Himachal Pradesh University,

Shimla through D.A.V. COLLEGE, Distt Kangra (H.P.), done by

Mr. Pankaj is an authentic work carried under my guidance.

The matter embodied in this project work has not been

submitted earlier for award of any degree or diploma to the

best of knowledge and belief.

{ } { }

Signature of the student Signature of the Faculty

Page 4: A Project Report for BCA

Acknowledgement

Acknowledgement

Page 5: A Project Report for BCA

As we know that whenever we are going to do something new we have to face

many obstacles and of course many experiences too. To introduce a new thing is

not an easy task for anybody. I pay our gratitude to the management for their

wholehearted cooperation and guidance to make this project. We wish to

acknowledge our deep sense of gratitude and personal regard to project guide Mr.

Ajay for her valuable guidance in the completion of my project. I feel great pleasure

in presenting this project on “School Management System”. I have applied my

concentration, alteration and best efforts to present this project in simplest way. At

last, I would like to thank “Mr. Ajay” who was being source of continuous

inspiration and support for me. Her unique talent and ability helped me a lot.

Page 6: A Project Report for BCA

Introduction

Page 7: A Project Report for BCA

This system is designed for Bank Management System. It is designed for keeping

track of general transaction in a bank like deposits, withdrawal and interest

distribution.

I have used Visual Basic and Microsoft Access as front end and back end. Visual

Basic is an object oriented programming language, the fastest and easiest way to

create applications for Microsoft Windows. Visual Basic provides us with a

complete set of tools to simplify rapid application development.

The “Visual” part refers to the method used to create the graphical user interface

(GUI). Rather than writing numerous lines of code to describe the appearance and

location of interface elements, you simply dray and drop pre built objects into

place on screen.

Using Microsoft Access, we can manage all your information from a single

database file. Within the file, we can use tables to store our data, Queries to find

and retrieve just the data we want, Forms to view, add, and update data in tables,

Reports to analyze or print data in a specific layout, Data access pages to view,

update, or analyze the database’s data from the Internet or an Intranet. It gives the

user a great deal of convenience in creating and handling database. It is becoming

very popular among the users due to its user friendliness and advanced features.

Page 8: A Project Report for BCA

Security is also main consideration in this project, without using password this

project cannot be run, beside this you cannot open another instance of this project

simultaneously while running this project, and reports and Microsoft Access used

as backend cannot be open directly without password.

Page 9: A Project Report for BCA

Study of Existing System

Page 10: A Project Report for BCA

Every organization intends to maintain proper records of its transaction keep track

of incoming and outgoing, weekly and monthly reports, details etc.

In the existing system information is kept manually the information about new

accounts brought in the account ledger. In spite of keeping these records, its

difficult to get the required information instantly, for doing this one has to go

through a pile of ledgers. Furthermore it is necessary for the bank to keep

information regarding deposit, withdrawal and interest so as to get the required

information as soon as possible.

Page 11: A Project Report for BCA

Problem Definition

Page 12: A Project Report for BCA

1. The manual system consumes a lot of time in paper work, a number of

registers have to be consulted this is the main cause of delay. The process is

further slowed down by the mistake in typing, entering information into the

registers etc.

2. Mistakes are often made during calculations. Numeric calculations like the

estimation of stock, daily collection, monthly calculation, quite often results in

mistakes.

3. In order to answer query, one has to consult voluminous registers which

result in the wastage of time. If the query involves the consultation of multiple

registers it result in lots of confusion as the required information cannot be

zeroed properly. The registers in damage to the registers and the subsequent

loss.

4. The registers call for enormous work in terms searching and sorting whenever

information regarding a student marks data is to be added or modified.

Page 13: A Project Report for BCA

Need For Computerization

Page 14: A Project Report for BCA

Computers are having profound effect on the society in general and the business

in particular. The repaid and drastic change in the past two decades undoubtedly

proves the worth of computers in all walks of life.

The computer applications field can be divided into basically two field’s viz.

business applications and scientific applications. The difference between two

types of application is that of ratio of operations performed to that of total data

processed.

In case of business data processing, the processing of large number of records is

required because of the large databases. Moreover the wide varieties of reports are

required for proving information to the various management levels.

The main purpose of using computers is to process the data quickly, to simulate it,

and give the results that are accurate and are available in real time, which have

become a buzzword help the chemist in making decisions. In the manual system,

all the above functions are very time consuming and also difficult at the time of

maintenance of big medical store.

Page 15: A Project Report for BCA

System Study

Page 16: A Project Report for BCA

Existing System with limitations

There were some limitations in the earlier system because of that limitations the

new system needs to be adopted

1. Earlier everything was manual. If any customer wants to check the status of

his account then it could not traced easily. For that he had to wait for a long

time.

2. Difficult to handle customers inquiry.

Page 17: A Project Report for BCA

Proposed System

Page 18: A Project Report for BCA

Features can be added in the existing system so that it could be much

interactive.

1. It is user friendly.

2. It is secure.

3. Data redundancy can be eliminated.

4. Getting rid of old file handling/registers/ledgers.

5. The status of accounts can be seen easily by the customers and employees.

Page 19: A Project Report for BCA

Feasibility Study

Page 20: A Project Report for BCA

When a new application is proposed, it normally goes through a feasibility study

before it is approved for development. It helps in evaluating alternative approaches

to its development.

Five types of feasibility are addressed in the study. They result in the recognition of

both the benefits and risks inherent in the development and implementation of the

proposed application system.

1 Technical Feasibility: The proposed system is technically feasible as it

can be implemented with existing technology. The system is being

developed on windows platform.

2 Economic Feasibility: The system is being developed with the aim that it

provides benefits greater than the cost. It presents tangible/intangible

benefits in a formal way. A cost/benefits analysis of the proposed system

that :-

a. It provides tangible benefits in terms of faster processing and timely

information.

b. Faster storage and retrieval of data.

c. Security.

Page 21: A Project Report for BCA

3 Motivation Feasibility: The probability that the organization is sufficiently

motivated to support the development and implementation of the application

with necessary user participation, resources and training time is quite high,

this motivation is being demonstrated the champion for the application who

has sufficient organization power to provide the resources and motivate the

others to assist to cooperate.

4 Feasibility: There is high probability that the organization can complete the

development process in the time allowed for development. Care has been

taken of the point that adding the development resources does not always

reduced the development time, in fact, adding staff cannot be used

effectively may impend the development because of the time spent in

communication.

5 Operational Feasibility: The system has been developed with one

particular question in mind. Will it work when installed? This analysis

involved a subjective assessment of the managerial environment in which

the system was implemented. In general, the requirements for change in the

user environment in which the system is installed, the greater the risk of

implementation failure. The feasibility analysis covered each items such as

the following :-

1) General description of the application.

2) Expected development schedule.

3) Schedule of the resource and the budget required for development.

4) Schedule of expected costs and benefits from operations (Economic

feasibility).

5) Summary of the evaluation w.r.t. technical, motivational, schedule and

operational feasibility.

Page 22: A Project Report for BCA

System Analysis

Page 23: A Project Report for BCA

Earlier system was based on paper system. There were some problems

encountered in this system. On spot stock details were not available. It was difficult

to search for the previous bills.

The proposed system is user-friendly. A person can ask about stock and can

see the status whatever it is. No user can make the cheating in this system

everything is feed in the files and they are only tend to make the entries. They are

also safe and free from keeping a bundle of files.

Page 24: A Project Report for BCA

Front End Visual Basic

Page 25: A Project Report for BCA

Visual Basic 6 is Microsoft’s latest and greatest version of the Visual Basic

programming language. Although writing programs can be a tedious chore at

times, Visual Basic reduces the effort required on your part and makes

programming enjoyable and also makes many aspects of programming as simple

as dragging graphic object onto the screen with your mouse. Multiple Document

Interface(MDI) allow your application to contain multiple document windows, this

interface lets you work with several sets of data in multiple windows within your

program, each window is called a child window. Single Document Interface (SDI)

limits your application to one open document window at a time. An important

aspect of any programming language is its ability to access and manipulate files.

Visual Basic provides all the statements and commands necessary for storing

information to and reading it from files. Moreover, Visual Basic makes it easy to

store information in databases and access it with the Data Access Objects (DAO).

Visual Basic support a wide range of ActiveX data objects (ADO) because these

objects are ActiveX-based, they work across different platforms and programming

languages, they offers several advantages over the data control ADO technology

supports faster database access than the data control does, ADO generally write

more program code than you would with the data control, you can write code that

accesses the various data control methods, ADO enable you to control data access

in much stricter way than the data control. In some cases, however, we want to be

able to store a few lines of text to a file or read a few numbers from a binary file.

Setting up an entire database is overkill in these situations. It’s much simpler to

create a file, store the information there, and recall it as needed.

Page 26: A Project Report for BCA

Back End MS-Access

Page 27: A Project Report for BCA

A database is a collection of information that’s related to a particular subject or

purpose, such as tracking customer orders or maintaining a collection. If your

database isn’t stored on a computer, or only parts of it are, you may be tracking

information from a variety of sources that you’re having to coordinate and organize

yourself.

Access database files

Using Microsoft Access, you can manage all your information from a single

database file. Within the file, you can use:

. Tables to store your data.

. Queries to find and retrieve just that data you want.

. Forms to view, add, and update data in tables.

. Reports to analyze or print data in a specific layout.

.Data access pages to view, update, or analyze the database’s data from the

Internet or an Intranet.

Page 28: A Project Report for BCA

Tables and relationship

To store your data, create one table for each type of information that you track. To

bring the data from multiple tables together in a query, form, report, or data access

page, define relationships between the tables.

Relationship in a database

After you’ve set up different tables for each subject in your Microsoft Access

Database, you need a way of telling Microsoft how to bring that information back

together again. The first step in this process is to define relationship between your

tables. After you’ve done that, you can create queries, forms, and reports to display

information from several tables at once.

. One-to-many relationship

. Many-to-many relationship

. One-to-one relationship

Page 29: A Project Report for BCA

Queries

To find and retrieve just the data that meets conditions that you specify, including

data from multiple tables, create a query. A query can also update or delete

multiple records at the same time, and perform predefined or custom calculations

on your data.

About designing a database Good database design ensures that your database is

easy to maintain. You store data in tables and each table contains data about only

one subject, such as customers. Therefore, you update a particular piece of data,

such as an address, in just one place and that change automatically appears

throughout the database.

A well-designed database usually contains different types of queries that show the

information you need. A query might show a subset of data, such as all customers

in Delhi, or combinations of data from different tables, such as order information

combined with customer information.

Page 30: A Project Report for BCA

Purpose of Database

The first step in designing a database is to determine its purpose and how it’s be

used:

. Talk to people who will use the database. Brainstorm about the questions you

and

they would like the database to answer.

. Sketch out the reports you’d like the database to produce.

. Gather the forms you currently use to record your data.

As you determine the purpose of your database, a list of information you want from

the database will begin to emerge. From that, you can determine what facts you

need to store in the database and what subject each fact belongs to. These facts

correspond to the fields (columns) in your database, and the subjects that those

facts belong to correspond to the tables.

Page 31: A Project Report for BCA

Data Flow Diagram

Page 32: A Project Report for BCA

Data flow diagram is another tool use to describe the design specification. It is also

a pictorial representation of data flow. The only difference between flowchart and

the data flow diagram is that DFD show only the flow of data not the actual

procedure or coding to perform that function. On the other hand flowcharts show

the actual calculation to perform the task.

The Different Symbol uses in DFD are:

Describe the source and destination of data or information. The source must be

written in capital letters.

A circle used to show the process. There can be number of process in a program.

Each process must be assigning a suitable number.

An open rectangle used to describe the storage of database.

Arrow used to show the flow of data. A DFD can be drawn from top to bottom or

from left to right

DFD’s for the System is drawn in the following page

Page 33: A Project Report for BCA

Process for User Login

System user Login Process

BankManagement System

Page 34: A Project Report for BCA

CONTEXT DFD OF BANK MANAGEMENT SYSTEM

Transaction Master

Customer Master

CUSTOMER/USER

BANK PROCESS

Page 35: A Project Report for BCA

DATA FLOW DIAGRAM OF BANK MANAGEMENT SYSTEM

GET CUST INFO

CUSTOMER MASTER

CUST INFO NEW CUSTOMER

OLD CUSTOMER/USER

TRANSACTION MASTER

UPDATION IN TRANSTION MASTER

CUSTOMER/USER1.

CHECKFOR

EXISTENCE

2.CREATE

NEWACCOUN

T

3.MAKE

TRANSACTION

(Dr./Cr.)

4.PRINT or TAKEA/C STATEMENT

Page 36: A Project Report for BCA

Entity Relation Diagram

Page 37: A Project Report for BCA

ENTITY RELATIONMODEL

OFBANKING

CUSTOMER/USER

DEPOSITAND

WITHDRAW TRANSACTION

NAME A/C No

ADDRESSDATE NAME

ADDRESS

A/C NO AMT Dr/Cr

ID Proof

Tel/Mob No

Opening bal

Type Mode

DOB

Current Bal

Type

Description

Page 38: A Project Report for BCA

Database Detail

Page 39: A Project Report for BCA

Database Name: - Bank

Table Name:- CustMaster

Purpose: It is used to store all necessary data of Customer.

Fields Data Type Size

Dated Text 10Account_No Text 11Name Text 20Father_Name Text 20Address_Permanent Text 50Address_Corresp Text 50City_Town Text 20District Text 20State Text 20Pin_Code Text 6Ph_Off Text 15Ph_Resi Text 15Fax Text 15Mob_No Text 15Email_Address Text 30pan_no Text 15Occupation Text 20DOB Text 15Type Text 20Mode Text 15Id Text 20Opening_Bal Text 15Current_Bal Text 15

Page 40: A Project Report for BCA

Database Name: - Bank

Table Name:- Pass

Purpose: It is used to store the password change by user.

Fields Data Type SizePassword Text 10

Page 41: A Project Report for BCA

Database Name: - Bank

Table Name: Transaction_Master

Purpose: It is used to store the transaction of Customers Accounts.

Fields Data Type SizeAutoNumber AutoNumber Long IntegerDated Date/Time 11Account_No Text 15Description Text 15Amt_Deposit Text 15Amt_Withdraw Text 15Balance Text 15

Page 42: A Project Report for BCA

Flow Chart

Page 43: A Project Report for BCA

Flow Chart for Login Process

NO

YES

START

ENTER THE PASSWORD

CHECKFOR

VALIDATION

LOGIN TO THE APPLICATION

STOP

EXIT FROMLOGIN FORM

CHANGE PASSWORD

Page 44: A Project Report for BCA

Flow Chart for Add New Account

OK

START

GOTOCUSTOMER

MASTER

ENTER Account No, Name, Date, Address, Father Name,Phone No, Occupation, Type, Mode, Opening Balance,

Current Balance etc.

SAVE RECORD IN DATABASE

STOP

Page 45: A Project Report for BCA

Flow Chart for Search Account

ELSE SEARCH AGAIN

NO

YES

START

GOTOCUSTOME

RMASTER

ENTER A/C No TO SEARCH

IF A/C No. IS

FOUND

SHOW THAT A/C’s DETAIL

STOP

SHOW “RECORD

NOT FOUND

Page 46: A Project Report for BCA

EXIT

Flow Chart for Modify/Edit an Account

ELSE SEARCH AGAIN

NO

YES

START

GOTOCUSTOME

RMASTER

ENTER A/C No TO SEARCH AND EDIT

IF A/C No. IS

FOUND

MODIFY THE EXISTING DATA AND UPDATE

SHOW “RECORD

NOT FOUND

Page 47: A Project Report for BCA

EXIT

Flow Chart for Delete an Account

ELSE SEARCH AGAIN

NO

YES

STOP

START

GOTOCUSTOME

RMASTER

ENTER A/C No TO SEARCH

IF A/C No. IS

FOUND

THEN CLICK DEL TO DELETE THE A/C

STOP

SHOW “RECORD

NOT FOUND

Page 48: A Project Report for BCA

EXIT

Flow Chart for Withdraw

SEARCH AGAIN

NO YES

OK

START

GOTOTRANSACTIO

NMASTER

ENTER A/C No TO SEARCH

THEN ENTER Description, Date, Amount Withdraw.

SAVE Record In DataBase

STOP

SHOWRECORD

NOT FOUND

Page 49: A Project Report for BCA

Flow Chart for Deposit

SEARCH AGAIN

NO YES

OK

START

GOTOTRANSACTIO

NMASTER

ENTER A/C No TO SEARCH

THEN ENTER Description, Date, Amount Deposit.

SAVE Record In DataBase

STOP

SHOWRECORD

NOT FOUND

Page 50: A Project Report for BCA

Hardware and SoftwareRequirement

Page 51: A Project Report for BCA

Hardware Requirement

. Monitor-Color Monitor having pixel setting up to 640*480 True colors

Or Higher resolution.

. Hard Disk-4GB to 40GB or Higher.

. RAM-Minimum 64 MB or Higher.

. CD-ROM/Writer.

. Mouse.

. Keyboard

Software Requirement

. Front End-Visual Basic 6.0.

. Back End-MS-Access.

. Windows Operating System(Win xp,98,2000,ME,2003 etc.).

Page 52: A Project Report for BCA

Detail of Forms

Page 53: A Project Report for BCA

User Authentication

This is the opening form where users have to enter the correct password for Login

to use the Application or Software.

Page 54: A Project Report for BCA

Main Form or MDI Form

This is the Second after you Login, it contains all the menus like file, list, reports etc.

Page 55: A Project Report for BCA

Customer Info Form

This is the form where you can add new customer data, search existing customer,

edit existing customer data, delete the data and modify the customer data. I

attached Six buttons in this form i.e. Search, Save, New, Modify, Del and Exit.

Page 56: A Project Report for BCA

Transaction Info Form

This is the form where you can do the transaction for existing customer i.e. to

deposit the money in his/her Account and to withdraw the money. In this form I

attached Six buttons i.e. Search, Save, New, Modify, Delete, and Exit.

Page 57: A Project Report for BCA

Customer Detail List Form

This form is to get full detail of existing customers or data that exists in the

database.

Page 58: A Project Report for BCA

Transaction Detail List Form

This form is to get full detail of transactions of customers A/C that exists in the

database.

Page 59: A Project Report for BCA

Coding

Page 60: A Project Report for BCA

Coding for Splash Form

Option Explicit

Private Sub Form_KeyPress(KeyAscii As Integer)

Unload Me

End Sub

Private Sub Form_Load()

lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." &

App.Revision

'lblProductName.Caption = App.Title

End Sub

Private Sub Frame1_Click()

Unload Me

End Sub

Private Sub timerSplash_Timer()

ProgressBar1.Value = ProgressBar1.Value + 5

If ProgressBar1.Value = 100 Then

Page 61: A Project Report for BCA

Unload Me

mdiMain.Show

frmUserLogin.Show vbModal

End If

End Sub

Coding for User Authentication

Dim rs As ADODB.Recordset

Dim conn As New ADODB.Connection

Private Sub cmdUserChange_Click()

Unload Me

frmChangePass.Show vbModal

End Sub

Private Sub cmdUserExit_Click()

If (MsgBox("Are u sure to Quit ??? ", vbOKCancel + vbInformation) = vbOK) Then

End

End If

End Sub

Private Sub cmdUserValid_Click()

Set conn = New ADODB.Connection

Set rs = New ADODB.Recordset

conn.Open "DSN=Banking"

Page 62: A Project Report for BCA

rs.Open "select * from pass where password = '" & txtUserPass & "'", conn,

adOpenKeyset, adLockOptimistic

'rs.Find ("password='" & txtChangeOld.Text & "'")

If rs.RecordCount = 0 Then

MsgBox "Wrong Password!!!", vbCritical, "Password Alert"

Else

Unload Me

End If

End Sub

Coding for Changing Password

Dim rs As ADODB.RecordsetDim conn As New ADODB.Connection

Private Sub cmdChangeCan_Click()Unload MefrmUserLogin.Show vbModalEnd Sub

Private Sub cmdChangeOk_Click()Set conn = New ADODB.ConnectionSet rs = New ADODB.Recordsetconn.Open "DSN=Banking"rs.Open "select * from pass where password = '" & txtChangeOld.Text & "'", conn, adOpenKeyset, adLockOptimistic

'rs.Find ("password='" & txtChangeOld.Text & "'")If rs.RecordCount = 0 Then MsgBox "Old Password Is Not Correct!!!", vbCritical, "Password Alert" Exit SubElse If txtChangeNew.Text = txtChangeConfirm.Text Then conn.Execute "update pass set password='" & txtChangeNew.Text & "'"

Page 63: A Project Report for BCA

MsgBox "Password is changed", vbInformation Unload Me frmUserLogin.Show vbModal Else MsgBox "New password and confirmed password do not match!!!", vbCritical, "Password Alert" End IfEnd IfEnd Sub

Coding for MDI Form

Private Sub mnuCust_Click()

frmSearch.Show vbModal

End Sub

Private Sub mnuCustList_Click()

frmCustList.Show vbModal

End Sub

Private Sub mnuCustMaster_Click()

frmCustMaster.Show vbModal

End Sub

Private Sub mnuCustReport_Click()

ReportCust.Show vbModal

End Sub

Private Sub mnuExit_Click()

Unload Me

End Sub

Private Sub mnuTrans_Click()

ReportTrans.Show vbModal

End Sub

Private Sub mnuTransList_Click()

Page 64: A Project Report for BCA

frmTransList.Show vbModal

End Sub

Private Sub mnuTransMaster_Click()

frmTransMaster.Show vbModal

End Sub

Coding for Customer Master

Dim conn As ADODB.Connection

Dim rs As ADODB.Recordset

Private Sub cmdCustDel_Click()

rs.Open "select * from custmaster where account_no='" & txtCustAccNo.Text & "'",

conn, adOpenDynamic, adLockOptimistic

If MsgBox("Are U sure to Delete!!!", vbYesNo + vbCritical, "Confirm The Deletion")

= vbYes Then

rs.Delete adAffectCurrent

Call blank_boxes

MsgBox "The record is deleted from the table"

Call unlock_Fields

cmdCustSearch.Enabled = True

cmdCustSave.Enabled = True

End If

End Sub

Private Sub cmdCustNew_Click()

Call blank_boxes ' Calling a user made procedure to blank the textboxes after

saving

Call unlock_Fields

cmdCustSave.Enabled = True

cmdCustSearch.Enabled = True

Page 65: A Project Report for BCA

cmdCustMod.Enabled = False

cmdCustDel.Enabled = False

End Sub

Private Sub cmdCustMod_Click()

If cmdCustMod.Caption = "&Modify" Then

Call unlock_Fields

cmdCustMod.Caption = "&Update"

ElseIf cmdCustMod.Caption = "&Update" Then

cmdCustSave.Enabled = True

cmdCustSearch.Enabled = True

Call Record_set_open ' Calling a user made procedure to open the record set

Call Save_rec ' Calling a user made procedure to save into the table

MsgBox "A New Record Is Modified"

Call blank_boxes ' Calling a user made procedure to blank the textboxes

cmdCustMod.Caption = "&Modify"

End If

End Sub

Private Sub cmdCustSave_Click()

If Len(Trim(txtCustAccNo.Text)) = 0 Then

MsgBox ("The Account number is not filled")

Exit Sub

End If

Call Record_set_open ' calling a user made procedure to open the record set

rs.AddNew

Call Save_rec ' calling a user made procedure to save into table

MsgBox " Record Added To The Table", vbInformation ' this will show you a

message as u defined here

Call blank_boxes ' call a user made procedure to blank the boxes

'rs.Close

Page 66: A Project Report for BCA

End Sub

Private Sub cmdCustSearch_Click()

' This procedure will search a record from the database according to the

' the account no entered in account no textbox

cmdCustSave.Enabled = False

cmdCustSearch.Enabled = False

cmdCustMod.Enabled = True

cmdCustDel.Enabled = True

Call Record_set_open

If rs.RecordCount = 0 Then

MsgBox " Record not found", vbInformation

cmdCustSave.Enabled = True

cmdCustSearch.Enabled = True

Exit Sub

End If

Call lock_Fields

txtCustAccNo = rs!account_no

txtCustAccNo.BackColor = &HC0FFFF

dtpCustDate = rs!dated

txtCustName = rs!Name

txtCustFatherName = rs!Father_name

txtCustAddPerma1 = rs!address_permanent

txtCustAddCorres1 = rs!address_corresp

txtCustCity = rs!city_town

txtCustDistt = rs!District

txtCustState = rs!State

txtCustPin = rs!pin_code

txtCustTelOff = rs!ph_off

txtTelResi = rs!ph_resi

txtMbNo = rs!mob_no

Page 67: A Project Report for BCA

txtCustEmail = rs!Email_address

txtCustPan = rs!pan_no

txtCustOccu = rs!occupation

txtCustDOB = rs!DOB

comCustType.Text = rs!Type

comCustMode = rs!Mode

comCustID.Text = rs!Id

txtCustOpen = rs!opening_bal

txtCustCurr = rs!current_bal

rs.Close

End Sub

Private Sub Form_Load()

Set conn = New ADODB.Connection

Set rs = New ADODB.Recordset

conn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data

Source=banking"

conn.Open

rs.CursorLocation = adUseClient

End Sub

Private Sub form_unload(Cancel As Integer)

conn.Close

End Sub

Private Sub cmdCustExit_Click()

Unload Me

End Sub

' This procedure

'

Page 68: A Project Report for BCA

Private Sub blank_boxes()

txtCustAccNo = ""

dtpCustDate = Date

txtCustName = ""

txtCustFatherName = ""

txtCustAddPerma1 = ""

txtCustAddCorres1 = ""

txtCustCity = ""

txtCustDistt = ""

txtCustState = ""

txtCustPin = ""

txtCustTelOff = ""

txtTelResi = ""

txtMbNo = ""

txtCustEmail = ""

txtCustPan = ""

txtCustOccu = ""

txtCustDOB = ""

txtCustType = ""

txtCustMode = ""

txtCustId = ""

txtCustOpen = ""

txtCustCurr = ""

End Sub

Private Sub Save_rec()

rs!account_no = txtCustAccNo

rs!dated = dtpCustDate

rs!Name = txtCustName

rs!Father_name = txtCustFatherName

rs!address_permanent = txtCustAddPerma1

Page 69: A Project Report for BCA

rs!address_corresp = txtCustAddCorres1

rs!city_town = txtCustCity

rs!District = txtCustDistt

rs!State = txtCustState

rs!pin_code = txtCustPin

rs!ph_off = txtCustTelOff

rs!ph_resi = txtTelResi.Text

rs!mob_no = txtMbNo

rs!Email_address = txtCustEmail

rs!pan_no = txtCustPan

rs!occupation = txtCustOccu

rs!DOB = txtCustDOB

rs!Type = comCustType.Text

rs!Mode = comCustMode.Text

rs!Id = comCustID.Text

rs!opening_bal = txtCustOpen

rs!current_bal = txtCustCurr

rs.Update

rs.Close

End Sub

Private Sub Record_set_open()

If rs.State = 1 Then

rs.Close

End If

rs.Open "select * from CustMaster where account_no='" & txtCustAccNo.Text & "'",

conn, adOpenKeyset, adLockOptimistic

End Sub

Private Sub lock_Fields()

Page 70: A Project Report for BCA

txtCustAccNo.Enabled = False

dtpCustDate.Enabled = False

txtCustName.Enabled = False

txtCustFatherName.Enabled = False

txtCustAddPerma1.Enabled = False

txtCustAddCorres1.Enabled = False

txtCustCity.Enabled = False

'txtCustCity.BackColor = &HC0FFFF

txtCustDistt.Enabled = False

txtCustState.Enabled = False

txtCustPin.Enabled = False

txtCustTelOff.Enabled = False

txtTelResi.Enabled = False

txtMbNo.Enabled = False

txtCustEmail.Enabled = False

txtCustPan.Enabled = False

txtCustOccu.Enabled = False

txtCustDOB.Enabled = False

comCustType.Enabled = False

comCustMode.Enabled = False

comCustID.Enabled = False

txtCustOpen.Enabled = False

txtCustCurr.Enabled = False

End Sub

Private Sub unlock_Fields()

txtCustAccNo.Enabled = True

dtpCustDate.Enabled = True

txtCustName.Enabled = True

txtCustFatherName.Enabled = True

txtCustAddPerma1.Enabled = True

txtCustAddCorres1.Enabled = True

Page 71: A Project Report for BCA

txtCustCity.Enabled = True

'txtCustCity.BackColor = &HC0FFFF

txtCustDistt.Enabled = True

txtCustState.Enabled = True

txtCustPin.Enabled = True

txtCustTelOff.Enabled = True

txtTelResi.Enabled = True

txtMbNo.Enabled = True

txtCustEmail.Enabled = True

txtCustPan.Enabled = True

txtCustOccu.Enabled = True

txtCustDOB.Enabled = True

comCustType.Enabled = True

comCustMode.Enabled = True

comCustID.Enabled = True

txtCustOpen.Enabled = True

txtCustCurr.Enabled = True

End Sub

Private Sub Picture1_Click()

End Sub

Private Sub txtCustOpen_Change()

txtCustCurr.Text = txtCustOpen.Text

End Sub

Page 72: A Project Report for BCA

Coding for Transaction Master

Dim conn As ADODB.Connection

Dim rs As ADODB.Recordset

Dim i As Integer

Private Sub cmdTransDel_Click()

If MsgBox("Are U sure to delete!!!", vbYesNo + vbCritical, "Confirm The Deletion")

= vbYes Then

MsgBox "The Transaction is deleted from the table"

If rs.State = 1 Then

rs.Close

End If

rs.Open "select * from custmaster where account_no= '" & txtTransAcc.Text &

"'", conn, adOpenKeyset, adLockOptimistic

rs!current_bal = rs!current_bal +

Val(ListView1.ListItems(ListView1.SelectedItem.Index).SubItems(4))

rs!current_bal = rs!current_bal -

Val(ListView1.ListItems(ListView1.SelectedItem.Index).SubItems(5))

rs.Update

rs.Close

rs.Open "select * from transaction_master where Autonumber=" &

ListView1.ListItems(ListView1.SelectedItem.Index).Text & "", conn,

adOpenDynamic, adLockOptimistic

Page 73: A Project Report for BCA

rs.Delete adAffectCurrent

Call listBox

txtTransDesc = ""

txtTransDeposit = ""

txtTransWithdraw = ""

End If

'rs.Close

'Call blank_boxes

End Sub

Private Sub cmdTransExit_Click()

Unload Me

End Sub

Private Sub cmdTransMod_Click()

If cmdTransMod.Caption = "&Modify" Then

Call unlock_Fields

cmdTransMod.Caption = "&Update"

ElseIf cmdTransMod.Caption = "&Update" Then

cmdTransSave.Enabled = True

If rs.State = 1 Then

rs.Close

End If

rs.Open "select * from Transaction_Master where AUTONUMBER=" &

ListView1.ListItems(ListView1.SelectedItem.Index).Text & "", conn, adOpenKeyset,

adLockOptimistic

Call rec_save

Call listBox

MsgBox "Record Is Modified"

'Call blank_boxes

Call unlock_Fields

cmdTransMod.Caption = "&Modify"

Page 74: A Project Report for BCA

Call lock_unlock_fields

txtTransDesc = ""

txtTransDeposit = ""

txtTransWithdraw = ""

End If

End Sub

Private Sub cmdTransNew_Click()

Call unlock_Fields

Call blank_boxes

'Call listBox

ListView1.ListItems.Clear

txtTransAcc.SetFocus

cmdTransSave.Enabled = False

cmdTransMod.Enabled = False

cmdTransDel.Enabled = False

End Sub

Private Sub cmdTransSave_Click()

On Error GoTo A

If Len(Trim(txtTransAcc.Text)) = 0 Then

MsgBox ("The Account number is not filled")

Exit Sub

End If

Call Record_set_open

rs.AddNew

Call rec_save

Call listBox

txtTransDesc = ""

txtTransDeposit = ""

Page 75: A Project Report for BCA

txtTransWithdraw = ""

Exit Sub

A:

MsgBox "Error has occured in save Button of Tansmaster" + Err.Description

End Sub

Private Sub cmdTransSearch_Click()

'Call Record_set_open

'On Error Resume Next

cmdTransSearch.Enabled = True

Call listBox

If rs.RecordCount = 0 Then

MsgBox " Record not found", vbInformation

Exit Sub

End If

Call lock_unlock_fields

cmdTransSave.Enabled = True

cmdTransNew.Enabled = True

cmdTransMod.Enabled = True

cmdTransDel.Enabled = True

End Sub

Private Sub Form_Load()

Set conn = New ADODB.Connection

Set rs = New ADODB.Recordset

conn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data

Source=banking"

conn.Open

rs.CursorLocation = adUseClient

End Sub

Page 76: A Project Report for BCA

Private Sub form_unload(Cancel As Integer)

conn.Close

End Sub

Private Sub Record_set_open()

If rs.State = 1 Then

rs.Close

End If

rs.Open "select * from Transaction_Master where account_no='" &

txtTransAcc.Text & "'", conn, adOpenKeyset, adLockOptimistic

End Sub

Private Sub blank_boxes()

txtTransAcc = ""

dtpTransDate = Date

txtTransName = ""

txtTransAdd = ""

txtTransDesc = ""

txtTransType = ""

txtTransBal = ""

txtTransDeposit = ""

txtTransWithdraw = ""

End Sub

Private Sub rec_save()

'Call Record_set_open

rs!account_no = txtTransAcc

rs!dated = dtpTransDate.Value

rs!Description = txtTransDesc

Page 77: A Project Report for BCA

'rs!balance = txtTransBal

rs!amt_deposit = Val(txtTransDeposit)

rs!amt_withdraw = Val(txtTransWithdraw)

rs.Update

rs.Close

rs.Open "select * from custmaster where account_no= '" & txtTransAcc.Text & "'",

conn, adOpenKeyset, adLockOptimistic

rs!current_bal = rs!current_bal - Val(txtTransWithdraw)

rs!current_bal = rs!current_bal + Val(txtTransDeposit)

rs.Update

rs.Close

End Sub

Private Sub ListView1_DblClick()

dtpTransDate = ListView1.SelectedItem.ListSubItems(2)

txtTransDeposit = ListView1.SelectedItem.ListSubItems(5)

txtTransWithdraw = ListView1.SelectedItem.ListSubItems(4)

txtTransDesc.Text = ListView1.SelectedItem.ListSubItems(3)

MsgBox ListView1.ListItems(ListView1.SelectedItem.Index).SubItems(5)

End Sub

Private Sub lock_Fields()

txtTransAcc.Enabled = False

dtpTransDate.Enabled = False

txtTransName.Enabled = False

txtTransAdd.Enabled = False

txtTransDesc.Enabled = False

txtTransType.Enabled = False

txtTransDeposit.Enabled = False

txtTransWithdraw.Enabled = False

txtTransBal.Enabled = False

End Sub

Page 78: A Project Report for BCA

Private Sub unlock_Fields()

txtTransAcc.Enabled = True

dtpTransDate.Enabled = True

txtTransName.Enabled = True

txtTransAdd.Enabled = True

txtTransDesc.Enabled = True

txtTransType.Enabled = True

txtTransDeposit.Enabled = True

txtTransWithdraw.Enabled = True

txtTransBal.Enabled = True

End Sub

Private Sub listBox()

ListView1.ListItems.Clear

If rs.State = 1 Then

rs.Close

End If

rs.CursorLocation = adUseClient

rs.Open "SELECT CustMaster.Account_No, Transaction_Master.Dated,

CustMaster.Name, CustMaster.Address_Permanent," _

& " CustMaster.Type,CustMaster.current_bal,Transaction_Master.autonumber,

Transaction_Master.Description, Transaction_Master.Balance,

Transaction_Master.Amt_Withdraw, Transaction_Master.Amt_Deposit" _

& " FROM CustMaster INNER JOIN Transaction_Master ON

CustMaster.Account_No = Transaction_Master.Account_No " _

& " WHERE (((CustMaster.Account_No)='" & txtTransAcc & "'))", conn,

adOpenForwardOnly, adLockPessimistic

If rs.RecordCount = 0 Then

If rs.State = 1 Then

rs.Close

Page 79: A Project Report for BCA

End If

rs.Open "select * from custmaster where account_no='" &

Trim(txtTransAcc.Text) & "'", conn, adOpenForwardOnly, adLockOptimistic

If rs.RecordCount > 0 Then

dtpTransDate.Value = rs!dated

txtTransName = rs!Name

txtTransAdd = rs!address_permanent

txtTransType = rs!Type

txtTransBal = IIf(IsNull(rs!current_bal), 0, rs!current_bal)

cmdTransSave.Enabled = True

cmdTransSearch.Enabled = True

Else

End If

Exit Sub

End If

Call lock_unlock_fields

txtTransAcc.Text = rs.Fields(0)

dtpTransDate = rs!dated

txtTransName = rs!Name

txtTransAdd = rs!address_permanent

'txtTransDesc = rs!Description

txtTransType = rs!Type

'txtTransDeposit = rs!amt_deposit

'txtTransWithdraw = rs!amt_withdraw

txtTransBal = IIf(IsNull(rs!current_bal), 0, rs!current_bal)

Dim newitem As ListItem

'set a= new

Page 80: A Project Report for BCA

For i = 1 To rs.RecordCount

Set newitem = ListView1.ListItems.Add(, , rs!autonumber)

newitem.SubItems(1) = rs!account_no

newitem.SubItems(2) = rs!dated

newitem.SubItems(3) = rs!Description

newitem.SubItems(5) = IIf(IsNull(rs!amt_deposit), 0, Val(rs!amt_deposit))

newitem.SubItems(4) = Val(rs!amt_withdraw)

rs.MoveNext

Next i

rs.Close

End Sub

Private Sub lock_unlock_fields()

txtTransAcc.Enabled = False

dtpTransDate.Enabled = True

txtTransName.Enabled = False

txtTransAdd.Enabled = False

txtTransDesc.Enabled = True

txtTransType.Enabled = False

txtTransDeposit.Enabled = True

txtTransWithdraw.Enabled = True

txtTransBal.Enabled = False

End Sub

Page 81: A Project Report for BCA

Coding for Crystal Report Search Form

Private Sub cmdCan_Click()

Unload Me

End Sub

Private Sub cmdOk_Click()

CrystalReport1.ReportFileName = App.Path & "\rptAccountTransaction_new.rpt"

CrystalReport1.SelectionFormula = "{current_status.account_no} = '" & txtAcc.Text

& "'"

CrystalReport1.Action = 1

txtAcc = ""

End Sub

Page 82: A Project Report for BCA

Coding for Customer List Form

Private Sub cmdCustCan_Click()

Unload Me

End Sub

Private Sub cmdCustGoto_Click()

Unload Me

frmCustMaster.Show vbModal

End Sub

Coding for Transaction List Form

Private Sub cmdTransCan_Click()

Unload Me

End Sub

Private Sub cmdTransGoto_Click()

Unload Me

frmTransMaster.Show vbModal

End Sub

Page 83: A Project Report for BCA

Testing Mechanism

Page 84: A Project Report for BCA

Testing forms the first step in determining the errors in a program, the success of

testing in revealing errors in programs depends critically on the test cases. Testing

can be broken into smaller activities, due to this incremental testing is generally

performed, in which components and subsystems of the system are tested

separately before integrating them. The basic purpose of the testing is to detect the

errors that may be present in the program; there are two basic approaches to

testing i.e.:

. Functional Testing.

. Structural Testing.

. System Testing.

. Functional Testing: In the functional testing the structure of the program is not

considered, test cases are decided on the basis of the requirements or

specifications of the program or module and the internals of the module or the

program are not considered for selection of the test cases. Due to this nature, it is

often called Black box testing.

. Structural Testing: In Structural testing test cases are generated based on the

actual code of the program or module to be tested, it deals with the internal

structure of the program responsible for actually implementing that function, this

approach is sometimes called Glass box testing.

. System Testing:

. The raw data is fed in the database.

Page 85: A Project Report for BCA

. The Module is working in a good condition.

ImplementationMechanism

Page 86: A Project Report for BCA

In the implementation phase programs are written, files and data bases are created,

education and training of user takes place in the old system is replaced by new

one. The implementation of a system may take place when: -

The target date of chance over is due.

The system has been proved to the satisfaction of system analyst and other

implementation activities have been completed.

The user manager is satisfied with the results of testing, staff training and

reference manuals.

Operation manager is satisfied with the performance of equipments and

operation staff.

There are different methods of changeover for e.g.: -

Direct changeover: - In this method of changeover the old system is

replaced by new system in one move.

Parallel changeover: - In this method of changeover, the processing of data

takes place by both old and new system to cross check the results.

Page 87: A Project Report for BCA

Staged Changeover: - A staged changeover consists of a series limited size

changeover. In this method the new system is introduced piece by piece.

Pilot Running: - In this method historical data for the whole or part of the

system is run on this system and results obtained from the new system are

compared with old system.

Bibliography

Page 88: A Project Report for BCA

Bibliography: -

Visual Basic

1. Black Book Visual Basic 6.0.

2. SIM of Visual Basic 6.0.

3. Super Bible of Visual Basic.

Software Engineering

1. An Integrated Approach to Software Engineering.

2. SIM of Software Engineering.

3. SIM of System Analysis and Design.

Page 89: A Project Report for BCA

Database Management System

1. Fundamentals of Database System.

2. An Introduction to Database System.

3. SIM of DBMS.