Sie sind auf Seite 1von 79

1

PROJECT
REPORT
on

BANK MANAGEMENT SYSTEM


( In the fulfillment of one and a half month summer training )

Submitted to :
Asst. Prof. H.P.S. Dhami
(H.O.D., Department of CSE &IT)

Submitted by :
Name -
2

Class – Btech(CSE) – 5th sem


3

TABLE OF CONTENTS

SR. NO : TITLE PAGE NO :

(1) INTRODUCTION TO PROJECT


(i) Platform used
(ii) Objective
(iii) Synopsis

(2) SYSTEM ANALYSIS


(i) Identification of Need
(ii) Project Planning
(iii) Project Scheduling
(iv) System Requirements Specifications

(3) SYSTEM DESIGN


(i) Logical Design
(ii) Form Layout
(iii) ER Diagram

(4) CODING

(5) TESTING
1. Test Cases
2. Test Logs
(6) REPORT

(7) FUTURE SCOPE

(8) BIBLIOGRAPHY
4

SYNOPSIS

CONTENTS

1) Organization Profile
2) Organization chart
3) Project Guide and Team
4) Introduction to project
5) Hardware and Software Required
6) Problem area
5

Organization Profile

CMC was incorporated on December 26, 1975, as the 'Computer


Maintenance Corporation Private Limited'. The Government of
India held 100 per cent of the equity share capital. On August 19,
1977, it was converted into a public limited company.In 1978,
when IBM wound up its operations in India, CMC took over the
maintenance of IBM installations at over 800 locations around
India and, subsequently, maintenance of computers supplied by
other foreign manufacturers as well. Taking over the activities of
IBM in India, including many of its employees, helped the
company to imbibe a service-oriented culture. This is demonstrated
by our long-standing customer associations and our ability to
provide high-quality and reliable service. In 1980, we perceived
the need for total IT system solutions in India, and acquired a
'solutions' orientation. We aligned our focus with the government's
thrust on IT development activities. A significant milestone in our
transition from a hardware maintenance company to a complete
end-to-end IT solutions provider was 'Project Interact'
(International Education and Research for Applications of
Computer Technology), a UN project involving design,
development and systems-engineering of real-time.
6

ORGANIZATION CHART

President

Vice President Vice President Vice President


Human Resources Development Quality management

Group Leader 1 Group Leader 2

Project Leader 1 Project leader 2

Senior manager(Project) Senior manager(Project)

Software Engg1, Software Engg2,….. Software Engg1, Software Engg2,….

Manjinder Singh
7

PROJECT GUIDE AND TEAM


8

INTRODUCTION TO PROJECT
9

Platform used

BANK MANAGEMENT SYSTEM being developed using:


 .NET framework
 VB.NET
 SQL Server 2000

.NET Framework

The .NET Framework is a multi-language environment for building, deploying, and


running XML Web services and applications. It consists of three main parts:

• Common Language Runtime Despite its name, the runtime actually has a role
in both a component's runtime and development time experiences. While the
component is running, the runtime is responsible for managing memory
allocation, starting up and stopping threads and processes, and enforcing
security policy, as well as satisfying any dependencies that the component might
have on other components. At development time, the runtime's role changes
slightly; because it automates so much (for example, memory management), the
runtime makes the developer's experience very simple, especially when
compared to COM as it is today. In particular, features such as reflection
dramatically reduce the amount of code a developer must write in order to turn
business logic into a reusable component.
• Unified programming classes The framework provides developers with a
unified, object-oriented, hierarchical, and extensible set of class libraries (APIs).
Currently, C++ developers use the Microsoft Foundation Classes and Java
developers use the Windows Foundation Classes. The framework unifies these
disparate models and give Visual Basic and JScript programmers access to class
libraries as well. By creating a common set of APIs across all programming
languages, the common language runtime enables cross-language inheritance,
error handling, and debugging. All programming languages, from JScript to C++,
have similar access to the framework and developers are free to choose the
language that they want to use.
• ASP.NET ASP.NET builds on the programming classes of the .NET
Framework, providing a Web application model with a set of controls and
10

infrastructure that make it simple to build ASP Web applications. ASP.NET


includes a set of controls that encapsulate common HTML user interface
elements, such as text boxes and drop-down menus. These controls run on the
Web server, however, and push their user interface as HTML to the browser. On
the server, the controls expose an object-oriented programming model that
brings the richness of object-oriented programming to the Web developer.
ASP.NET also provides infrastructure services, such as session state
management and process recycling, that further reduce the amount of code a
developer must write and increase application reliability. In addition, ASP.NET
uses these same concepts to enable developers to deliver software as a service.
Using XML Web services features, ASP.NET developers can write their business
logic and use the ASP.NET infrastructure to deliver that service via SOAP. For
more information, see Soap Community Links.

The .NET Framework and the Common Language Runtime

VB .NET is only one component of a revolution in Windows-the .NET framework. This


framework provides the new support for software development and operating system
support in Windows, and it's more extensive than anything we've seen in Windows
before. The .NET framework wraps the operating system with its own code, and your VB
.NET programs actually deal with .NET code instead of dealing with the operating
system itself. And it is specially designed to make working with the Internet easy.

At the base of the .NET framework is the Common Language Runtime (CLR). The CLR
is the module that actually runs your VB .NET applications. When you create a VB .NET
application, what really happens is that your code is compiled into the CLR's
Intermediate Language (named MSIL, or IL for short), much like bytecodes in Java.
When you run the application, that IL code is translated into the binary code your
computer can understand by some special compilers built into the CLR. Compilers
translate your code into something that your machine's hardware, or other software, can
deal with directly. In this way, Microsoft can one day create a CLR for operating systems
other than Windows, and your VB .NET applications, compiled into IL, will run on them.

The .NET Framework class library is the second major part of the .NET framework. The
class library holds an immense amount of prewritten code that all the applications you
create with Visual Basic, Visual C++, C#, and other Visual Studio languages build on.
The class library gives your program the support it needs-for example, your program
may create several forms, and as there is a class for forms in the class library, your
program doesn't have to perform all the details of creating those forms from scratch. All
your code has to do is declare a new form, and the CLR compilers can get the actual
code that supports forms from the .NET Framework class library. In this way, your
programs can be very small compared to earlier Windows applications; because you can
rely on the millions of lines of code already written in the class library, not everything has
to be in your application's executable (EXE) file.

All this assumes that you're working on a machine that has the .NET framework, and
therefore the CLR and the .NET Framework class library, installed. The code for all
elements we use in a VB .NET application-forms, buttons, menus, and all the rest-all
11

comes from the class library. And other Visual Studio applications use the same class
library, making it easy to mix languages in your programming, even in the same
application. Also, distributing applications is easier, because all the support you need is
already on the machine you're installing your application to.

VB.NET

What's New in VB .NET?

Rather than asking what's new, it would almost be easier to ask what's not new in VB
.NET. The changes are extensive. We can't cover all the changes from Visual Basic 6.0
in a single chapter, but it's worth taking a look at them in overview here, in one place, so
you get an idea of how things are different. We'll note the details of these changes
throughout the book.

Be warned: if you are relatively new to Visual Basic, you might just want to skip this
section, because there will be a number of advanced topics here that you've probably
never seen before—you might want to refer back to this section as these topics become
more clear. However, it might prove useful to at least simply skim this section, because
besides giving you an outline of what's changed from VB6, it also gives you an outline of
the kind of programming we'll see in this book, and what's possible.

Version 4.0 of Visual Basic was a big change, unsettling many programmers, but the
change from VB6 to VB .NET is far bigger. Not only has how you design applications
and what types of projects you can create changed, but the very syntax of the language
has changed a great deal too. Some programmers have complained that Microsoft is
trying to turn Visual Basic into Java; if you know Java, you'll see what that means
throughout the book in dozens of places, as what was standard in Java has become
standard in Visual Basic. One longstanding complaint about Visual Basic has been that it
didn't offer a serious programming syntax, and programmers coming from C++
sometimes looked down on VB programmers. Now, however, Microsoft has changed all
that, giving the Visual Basic language the same rigor as any other programming
language.

This change will take some time for many accomplished VB programmers to come to
terms with; for example, everything in Visual Basic is object-oriented now, as it is in
Java, and you must declare your variables, as you do in Java, and the built-in VB
functionality is encapsulated in a namespace called System, as it is in Java, and so on.

As we've also seen, aside from Windows development, you can also create Web
applications in VB .NET. In fact, there's a third alternative now—in addition to Windows
applications and Web applications, you can create console applications, as you can in
Java. Console applications, as we'll see in this chapter, are command-line oriented
applications that run in DOS windows. Those are the three application types with user
interfaces: Windows applications, Web applications, and console applications. There's
12

also an additional new type of application—one that doesn't have a built-in user
interface: Web services. Web services are applications that run on Web servers and that
communicate with other programs, and we'll see them later in this book.

One of the biggest hurdles that VB6 programmers will have to overcome is the great
change in Visual Basic syntax. Not only has the fundamental structure of Visual Basic
projects like Windows applications become different, but there are a thousand other
issues as well—for example, you now have to declare all variables and objects, you
must always use parentheses when calling procedures, many keywords are either gone
or renamed, there are restrictions on declaring arrays, many old controls are gone and
new ones have appeared, strict data typing is now enforced, and so on. All this takes a
great deal of effort to get used to, but VB .NET itself will usually tell you what you're
doing wrong, and often will explain how to make it right.

In fact, the very data types you can use have changed in VB .NET, because these types
have to be the same as you use in other languages like Visual C++ and Microsoft's C#.
The reason for this, as we'll see in this chapter, is that the .NET framework that underlies
VB .NET uses a Common Language Runtime (CLR) module that applications written in
these languages all use.

As you can see, there are plenty of changes in VB .NET. I'll list them in overview in more
detail here, starting with Web Development Changes.

Changes in Web Development

The big change in Web development is that you can do it at all. Previous versions of
Visual Basic had support for DHTML applications, and other half-hearted attempts, but
they never caught on. As you can see, however, Web development is now an integral
part of VB .NET. The two major types of Web applications are Web forms and Web
services, and we'll cover them both in this book. Here's an overview:

• Web forms let you create Web-based applications with user interfaces. These
applications are based on ASP.NET (ASP stands for Active Server Pages,
Microsoft's Web server technology). You can view these applications in any
browser—the application will tailor itself to the browser's capabilities.
• You can build Web applications that use standard HTML controls, or new Server
controls, that are handled on the Web server. Server controls are displayed using
HTML, but execute code on the server.
• Web services are made up of code that can be called by other components on
the Internet or applications that use Internet protocols. Using Web services, you
can send and process data using HTTP and XML messaging standards on the
Internet. Web services may be used, for example, as the middle tier of distributed
database applications on the Internet.
• You can also now check the data a user enters into a Web form using validation
controls, which you can add to a Web form while designing it.
• You can bind the controls on a Web form to all kinds of different data sources,
simply by dragging those sources onto Web forms and setting a few properties.
• There are two ways to create your own Web server controls: you can create user
controls—Web form pages that are then embedded in other Web form pages. Or,
13

you can create custom server controls using a Software Development Kit (SDK)
provided with the .NET Framework.

Changes in Data Handling

There have been many ways of handling data in previous versions of Visual Basic,
starting with the simple DAO protocol, then RDO, followed by ADO (ActiveX Data
Objects). Things have changed again; now you handle data with ADO.NET.

ADO.NET is a new data-handling model that makes it easy to handle data on the
Internet. It's also what VB .NET uses on your local machine to communicate with local
databases. At the heart of ADO.NET is XML; all data is represented in XML format and
exchanged that way. VB .NET can use XML schema to make sure your data is checked
for validity before use. This means that much of what you know about ADO, if you're a
VB6 programmer, has to be replaced with the corresponding ADO.NET versions
(although, for compatibility's sake, you can still use ADO if you need to). For example,
you no longer use record sets, but rather datasets. A dataset is a collection of one or
more tables or record sets as well as the relationships between those tables or record
sets.

Note that ADO is no longer built into Visual Basic; ADO was based on COM protocols,
and COM (as well as DCOM) is no longer built into Visual Basic either. Instead,
ADO.NET uses XML to exchange data. Both COM and distributed COM (DCOM)
technology has been replaced by the .NET framework, although you still have access to
COM through what VB .NET calls COM interoperability, if you take special steps to
implement it. Here is an overview of what's new in data handling:

• Data is handled through ADO.NET, which facilitates development of Web


applications.
• ADO.NET is built on a disconnected data model that uses snapshots of data that
are isolated from the data source. This means you can use and create
disconnected, local datasets.
• Datasets are based on XML schema, so they can be strongly typed.
• There are many new tools and a wizard for handling data in VB .NET, including
tools to generate datasets from data connections. You can use the connection
wizard or the server explorer to drag and drop whole tables from data sources,
as well as creating data adapters, connection objects, and more.
• You can now bind any control property to data from a data source.
• You can use the data classes provided in the .NET Framework to create and
manipulate datasets in code.
• You can still work with ADO using the COM interoperability supported in the
.NET Framework.

Changes in the Visual Basic Language

As mentioned earlier, there are many changes to the Visual Basic language itself. VB
.NET now supports such OOP features as inheritance, interfaces, and overloading that
make it a strong OOP language. You can now create multithreaded applications, and
make use of structured exception handling, custom attributes, and more.
14

Probably the biggest single change is that everything is object oriented now. Generally
speaking, a language is object oriented if it supports the following :

• Abstraction—The ability to create an abstract representation of a concept in


code (as an object named employee is an abstraction of a real employee).
• Encapsulation—This has to do with the separation between implementation and
interface; that is, when you encapsulate an object, you make its code internal
and not accessible to the outside except through a well-defined interface.
• Polymorphism—Broadly speaking, this is the ability to create procedures that
can operate on objects of different types. For example, if both person and
employee objects have a last_name property, a polymorphic procedure can use
that property of both objects. Visual Basic handles polymorphism with late
binding and multiple interfaces, both of which we'll cover in this book.
• Inheritance—Inheritance is the process by which you can derive new classes
from other classes. Chapter 12 is all about inheritance in Visual Basic; the idea
here is that if you were to create, for example, a class for a specific Visual Basic
form and then derive a new type of form from that class, the derived class will
inherit all the base's class's functionality, even before you start to customize the
derived class by adding new functionality.

VB .NET now supports all these key OOP essentials, and it's become a true OOP
language. VB .NET now uses namespaces to prevent naming conflicts by organizing
classes, interfaces, and methods into hierarchies, much as Java does. You can import
various namespaces to gain access to its classes, interfaces, and methods, and we'll
see more on this later in this chapter. For example, the Microsoft. VisualBasic
namespace gives you access to common Visual Basic keywords like Asc, Beep,Chr,
and so on. The Microsoft.VisualBasic.ControlChars namespace gives you access to
common Visual Basic constants like Cr, CrLf, and so on. The
Microsoft.VisualBasic.Compatibility.VB6 namespace gives you access to obsolete
VB6 keywords such as Open, Close,CreateObject, and so on. The biggest namespace
comes from the .NET framework itself, and is called System. For example, the class that
supports Windows forms is System.Windows.Forms.Form.

Here's an overview of some of the changes to the language—there are too many to
list them all here,:

• It's all OOP now. All data items are objects now, based on the System.Object
class. Even integers and other primitive data types are based on this class. And
all code has to be enclosed in a class.
• You can now create classes that serve as the base class for derived classes. As
mentioned above, this is called inheritance. Derived classes inherit, and can
extend, the properties and methods of the base class.
• You can now overload properties, methods, and procedures. Overloading means
you can define properties, methods, or procedures that have the same name but
use different data types. For example, overloaded procedures allow you to
provide as many implementations as necessary to handle different kinds of data
while giving the appearance of a single procedure.
• Visual Basic now supports structured exception handling, using an enhanced
version of the Try…Catch…Finally syntax supported by other languages (such
as C++).
15

• VB .NET now supports multithreaded applications.


• VB .NET now supports constructors and destructors for use when initializing an
object of a specific class.
• There are three new data types in VB .NET: The Char data type is an unsigned
16-bit type used to store Unicode characters. The Short data type is a signed 16-
bit integer (named Integer in earlier Visual Basic versions). Finally, the Decimal
data type is a 96-bit signed integer (only available as Variants in earlier versions
of Visual Basic).
• The Variant type no longer exists; instead, the Object type is the catch-all type.
Also, the Currency data type has been replaced by the Decimal type.
• VB .NET is now strongly typed; this means you must declare all variables by
default, and you can't usually assign one data type to another. You use the
CType statement to convert between types. There are also changes in the way
you declare variables.
• Arrays can no longer be 1-based in VB .NET. That is, the Option Base
statement no longer exists.
• User-defined types are no longer defined with the Type keyword, but rather with
the Structure keyword.
• In Visual Basic 6.0, collections were part of the language itself; in VB .NET, they
come from the Systems.Collections namespace, so we have to use the ones
available in that namespace instead.
• There are a number of new compound arithmetic operators, such as +=, -=, •=,
/=,\=,^=, and &=. These operators combine two operations in one, as in Java.
For example, y += 5 adds 5 to the value in y and assigns the result to y.
• If…Then statements are now short-circuited, as in Java, so Visual Basic will
evaluate only the operands it needs to determine the result of the statement (see
Chapter 2 for more information).
• The And, Or, Not, and Xor operators have changed from being bitwise operators
to being Boolean operators, which only work on true/false values. The bitwise
versions are BitAnd, BitOr, BitNot, and BitXor.
• You no longer need to use the Set statement to assign objects to variables.
• The syntax for use with procedures has changed—for example, you now always
need to use parentheses to enclose the arguments you're passing to a
procedure. There are other changes as well; for example, optional parameters
now require default values.
• In VB6 most parameters were passed by reference; in Visual Basic .NET, the
default is passing by value. More on this in Chapter 3.
• The syntax for writing property procedures has changed (including the fact that
Get and Let have become Get and Set).
• Structured exception handling, including Try…Catch…Finally blocks, is now
supported.
• In VB6, objects had a default property; for example, the default property of a
TextBox control was the Text property; you could type TextBox1 = "Hello from
Visual Basic" instead of TextBox1.Text = "Hello from Visual Basic". In VB .NET,
however, default properties are no longer supported.
• Event-handling procedures have changed; now event handlers are passed only
two parameters.
• The Gosub keyword has been removed.
• The DefType keyword has been removed.
16

Many functions, keywords, and collections from VB6 are now obsolete. Here's a partial
list, along with replacements:

• Collection has been replaced by System.Collections.


• QBColor, RGB have been replaced by System.Drawing.Color.
• DateAdd, DateDiff, DatePart, DateSerial, DateValue, TimeSerial, TimeValue
have been replaced by elements in System.DateTime
• Close, EOF, FileAttr, Get, Put, FreeFile, Input, Line Input, Loc, Lock, LOF,
Open, Print, Print Line, Rename, Reset, Seek, SPC, TAB, Unlock, Width,
Write, WriteLine have been replaced by elements in System.IO.

The way programs handle COM components has also changed. In VB6, COM
components (such as ActiveX controls and documents) were very big. That's all changed
now, and some people think that VB .NET is the end of COM, although that's not
necessarily so. Although VB .NET does not use COM components internally, it
integrates with COM components well. COM components can be treated as .NET
components by .NET components, because the .NET framework encloses COM
components in a .NET wrapper that .NET components can work with. And, using COM
interoperability, COM components also can use .NET components.

As you can see, there are a great many changes going on in VB .NET. Microsoft is
aware that the sheer magnitude of all these differences can present a serious obstacle
to the adoption of VB .NET (as they say in the documentation, "Visual Basic .NET
represents a major departure from previous versions of Visual Basic in several ways."),
and has made some efforts to make upgrading from VB6 easier.

Visual Basic .NET, the next generation of the Visual Basic language, is a fast and
easy way to create .NET-based applications, including XML Web Services and Web
applications.

Visual Basic .NET has many new and improved language features — such as
inheritance, interfaces, and overloading — that make it a powerful object-oriented
programming language. As a Visual Basic developer, we can now create
multithreaded, scalable applications using explicit multithreading. Other new
language features in Visual Basic .NET include structured exception handling, custom
attributes, and common language specification (CLS) compliance.

The features which are used to develop www.punjabpolice.net are:


17

Inheritance

Visual Basic .NET supports inheritance by allowing a programmer to define


classes that serve as the basis for derived classes. Derived classes inherit and
can extend the properties and methods of the base class. They can also override
inherited methods with new implementations. All classes created with Visual
Basic .NET are inheritable by default. Because the forms a programmer design
are really classes, programmer can use inheritance to define new forms based
on existing ones

Exception Handling

Visual Basic .NET supports structured exception handling, using an enhanced


version of the Try...Catch...Finally syntax supported by other languages such as
C++. Structured exception handling combines a modern control structure (similar
to Select Case or While) with exceptions, protected blocks of code, and filters.
Structured exception handling makes it easy to create and maintain programs
with robust, comprehensive error handlers.

Overloading

Overloading is the ability to define properties, methods, or procedures that have


the same name but use different data types. Overloaded procedures allow a
developer to provide as many implementations as necessary to handle different
kinds of data, while giving the appearance of a single, versatile procedure.

Overriding Properties and Methods

The Overrides keyword allows derived objects to override characteristics


inherited from parent objects. Overridden members have the same arguments as
the members inherited from the base class, but different implementations. A
member's new implementation can call the original implementation in the parent
class by preceding the member name with

Constructors and Destructors

Constructors are procedures that control initialization of new instances of a class.


Conversely, destructors are methods that free system resources when a class
leaves scope or is set to Nothing . Visual Basic .NET supports constructors and
destructors using the Sub New and Sub Finalize procedures

Data Types
18

Visual Basic .NET introduces three new data types. The Char data type is an
unsigned 16-bit quantity used to store Unicode characters. It is equivalent to
the .NET Framework System. Char data type. The Short data type, a signed 16-
bit integer, was named Integer in earlier versions of Visual Basic. The Decimal
data type is a 96-bit signed integer scaled by a variable power of 10. In earlier
versions of Visual Basic, it was available only within a Variant.

Shared Members

Shared members are properties, procedures, and fields that are shared by all
instances of a class. Shared data members are useful when multiple objects
need to use information that is common to all. Shared class methods can be
used without first creating an object from a class

References

References allow programmers to use objects defined in other assemblies. In


Visual Basic .NET, references point to assemblies instead of type libraries

Namespaces

Namespaces prevent naming conflicts by organizing classes, interfaces, and


methods into hierarchies.

Assemblies

Assemblies replace and extend the capabilities of type libraries by, describing all
the required files for a particular component or application. An assembly can
contain one or more namespaces.

Building VB .NET Applications


To build applications in VB .NET, we have to get some terminology under our belts,
because the .NET framework requires a new structure for applications. In particular,
assemblies are now the building blocks of the .NET Framework; they form the
fundamental unit of deployment, version control, reuse, security permissions, and more.
An assembly provides the CLR with the information and compiled code it needs to know
how to run your code, much as EXE files did for Windows in VB6.
19

Assemblies

You combine assemblies to form .NET applications, and although we won't deal with
them directly very often, we need to get the terminology down. An assembly holds the
Intermediate Language modules for your application. When you create an application in
VB .NET and run it, VB .NET creates one or more assemblies, which are run by the
CLR. That is, assemblies are how your applications interact with the .NET framework
instead of the EXE or DLL files of VB6.

Here's what's in a .NET assembly: first is the manifest-similar to a table of contents-


giving the name and version of the assembly. The manifest also lists the other
assemblies needed to support this one, and explains how to handle security issues. The
actual meat of the assembly is made up of modules, which are internal files of IL code,
ready to run. That's how VB .NET stores the IL it creates, in modules inside assemblies.
Each module, in turn, contains types-the classes and interfaces that your code has
defined, and that the assembly has to know about to let the various modules interact
with each other.

Solutions and Projects

When you created applications in Visual Basic 6.0, you created projects. Each project
held the code and data for an application, ActiveX control, or whatever else you wanted
to build. If you wanted to combine projects together, you created a project group. In
VB .NET, however, project groups have become far more integral to the development
process, and now they're called solutions.

By default, when you create a new project in VB .NET, Visual Basic will create a new
solution first, and then add a project to that solution. For example, look at the Solution
Explorer window, at right in Figure 1.8, above the Properties window. In that case, we've
created our Visual Basic project called WinHello, and you can see that project in the
Solutions Explorer-but note that Visual Basic has also placed that project inside a
solution with the same name, WinHello. If we were to add new projects to the current
solution (which you can do with the New Project dialog box), those new projects would
appear in the Solution Explorer as part of the current solution. This is a change from
VB6, where you created projects by default, not project groups. It's also worth noting that
Microsoft calls the files in each project, such as the files for a form, items. So the
terminology here is that solutions contain projects, and these in turn contain items.

Debug and Release Versions

Note that so far we've started our programs from the Debug menu's Start item. This
causes Visual Basic to launch the program while staying in the background; if there's a
problem, Visual Basic will reappear to let you debug the program's code. That's useful
for development, of course, but when your program is ready to go and to be used by
others, you hardly want them to have to launch your program from Visual Basic.

That's where the difference between debug and release versions of your program comes
in. In a debug version of your program, Visual Basic stores a great deal of data needed
to interface with the debugger in your program when it runs, and this not only makes the
corresponding assembly larger, but also slower. In the release version of your program,
20

the program doesn't have all that added data, and can run as a stand-alone program,
without needing to be launched from Visual Basic (although it still needs the .NET
Framework, of course).

When you create a new solution, Visual Basic creates it in debug mode, meaning that
you launch it from the Debug menu as we've been doing. However, you can switch to
release mode in several ways (like many things in VB .NET, there's more than one way
to do it):

• Select the Configuration Manager item in the Build menu, then select Release in
the Active Solution Configuration list box and click OK.
• Select the solution you want to set the mode for by clicking it in the Solution
Explorer, and find its Active Config property in the properties window. When you
click the right-hand column in the properties window next to this property, a drop-
down list box will appear; select Release in that list box.
• Select the solution you want to set the mode for by clicking it in the Solution
Explorer, and select the Properties item in the Project menu, opening the
solution's property pages. Select the Configuration Properties folder in the box at
left, and the Configuration item in that folder. Then select Release from the drop-
down list box in the configuration column of the table that appears, and click OK.
• Probably the easiest way to set the solution mode to release or debug is simply
to use the drop-down list box that appears in the Visual Basic .NET standard
toolbar, at the top of the IDE. When you create a new solution or project, this list
box displays the word Debug, and all you need to do to switch to release mode is
to select Release instead.

When you've set the mode for a solution to Release, you build it using the Build menu's
Build item (the Build menu item causes Visual Basic to compile only items it thinks have
been newly changed; to force it to compile all items in the solution, choose the Rebuild
All item instead of Build). This builds the solution in a way that others can use it, and you
can deploy your program this way (usually with the help of a deployment project that you
build in Visual Basic, as we'll do later in the book).

Now we have the background we need on VB .NET solutions and projects as we head
into the following chapters, where we'll assume this knowledge and put it to work. We'll
also take for granted that you know your way around Visual Basic .NET itself, so in this
introductory chapter, I'll also take a look at the Visual Basic Integrated Development
Environment-the VB IDE.

All About Windows Forms


Technically speaking, forms are what you work with in forms designers; they represent
the windows that will appear in your application. However, it's become common to refer
to both the windows under design and the windows in your running application as forms
in Visual Basic applications.

The whole power of Visual Basic has been that you can develop forms visually, adding
controls and other items from the toolbox. In VB .NET, the support for Windows forms is
in the System.Windows.Forms namespace, and the form class is
System.Windows.Forms.Form. The Form class itself is based on the Control class,
21

which means that forms share a lot of the properties and methods that controls do.
Here's what the class hierarchy looks like for the Form class; every level is derived from
the one above it (note that all classes are derived from the Object class):

Object
MarshalByRefObject
Component
Control
ScrollableControl
ContainerControl
Form

You can see a form in a form designer in the Visual Basic Integrated Development
Environment (IDE) in Figure 4.1, which shows several aspects of forms. At the top of the
form is the title bar, which displays the form's title; here that's just Form1. At right in the
title bar is the control box, including the minimizing/maximizing buttons and the close
button. These are controls the user takes for granted in most windows, although we'll
see that they are inappropriate in others, such as dialog boxes.

Under the title bar comes the menu bar, if there is one. In form has one menu-the File
menu. (We'll see how to work with menus in the next chapter). Under the menu bar,
forms can have toolbars, as you see in the IDE itself.

The main area of a form-the area where everything takes place-is called the client area.
In general, Visual Basic code works with controls in the client area and leaves the rest of
the form to Visual Basic. (In fact, the client area is itself a window.) In Figure 4.1, I've
added a control-a command button-to the form.

Finally, the whole form is surrounded by a border. There are several types of borders
that you can use, as we'll see when working with dialog boxes and using the fixed, non-
resizable borders appropriate to them.

The important class for Windows forms is the Form class in the
System.Windows.Forms namespace. Each form in this namespace is an instance (that
is, an object) of that class. As mentioned in Chapter 2, objects are instances of classes,
much as an integer variable is an instance of the Integer type. (You can think of a class
as a type you create objects from.) As we also know, classes can have members-fields
(data items), methods (built-in procedures), and properties (data items accessed through
an interface based on methods).

As I mentioned in Chapter 2, it's important to realize-now that we're actually starting to


work with classes such as the Form class-that there are two kinds of class members.
First, there are those members inherent to the class itself (accessed through the class),
such as Form.ActiveForm, or just ActiveForm. For these members-called Static,
Shared, or class members-you don't need an object. Then there are those members,
called instance or object members, that are built into objects, such as
MyForm1.BackColor. With this type, MyForm1 is an instance of the Form class, where
you do need an object. In other words, the difference is that to use class members, you
don't need an object of that class to work with, and with object members, you do:
22

• Static/Shared members are class members, accessed directly using the class
like this: classname.membername. No object needed.
• Instance members are object members, accessed by using an instance of a
class (an object) like this: objectname.membername.

SQL Server 2000

Overview of SQL Server 2000

Microsoft SQL Server 2000 is a complete database and analysis solution for rapidly
delivering the next generation of scalable Web applications. SQL Server 2000 is a key
component in supporting e-commerce, line-of-business, and data warehousing
applications, while offering the scalability necessary to support growing, dynamic
environments. SQL Server 2000 includes rich support for Extensible Markup Language
(XML) and other Internet language formats; performance and availability features to
ensure uptime; and advanced management and tuning functionality to automate routine
tasks and lower the total cost of ownership. Additionally, SQL Server 2000 takes full
advantage of Microsoft Windows 2000 by integrating with Active Directory Services and
supporting up to 32 processors and 64 gigabytes (GB) of Random Access Memory
(RAM).

What Is SQL Server 2000?

SQL Server 2000 is an RDBMS that uses Transact-SQL to send requests between a
client computer and a SQL Server 2000 computer. An RDBMS includes databases, the
database engine, and the applications that are necessary to manage the data and the
components of the RDBMS. The RDBMS organizes data into related rows and columns
within the database. The RDBMS is responsible for enforcing the database structure,
including the following tasks:

• Maintaining the relationships among data in the database


• Ensuring that data is stored correctly and that the rules defining data
relationships are not violated
• Recovering all data to a point of known consistency in case of system failures

The database component of SQL Server 2000 is a Structured Query Language (SQL)-
compatible, scalable, relational database with integrated XML support for Internet
applications. SQL Server 2000 builds upon the modern, extensible foundation of SQL
23

Server 7.0. The following sections introduce you to the fundamentals of databases,
relational databases, SQL, and XML.

Databases

A database is similar to a data file in that it is a storage place for data. Like most types of
data files, a database does not present information directly to a user; rather, the user
runs an application that accesses data from the database and presents it to the user in
an understandable format.

Database systems are more powerful than data files because the data is more highly
organized. In a well-designed database, there are no duplicate pieces of data that the
user or application has to update at the same time. Related pieces of data are grouped
together in a single structure or record, and you can define relationships among these
structures and records.

When working with data files, an application must be coded to work with the specific
structure of each data file. In contrast, a database contains a catalog that applications
use to determine how data is organized. Generic database applications can use the
catalog to present users with data from different databases dynamically, without being
tied to a specific data format.

Relational Databases

Although there are different ways to organize data in a database, a relational database is
one of the most effective systems. A relational database system uses mathematical set
theory to effectively organize data. In a relational database, data is collected into tables
(called relations in relational database theory).

A table represents some class of objects that are important to an organization. For
example, a company might have a database with a table for employees, a table for
customers, and another table for stores. Each table is built from columns and rows
(attributes and tuples, respectively, in relational database theory). Each column
represents an attribute of the object class represented by the table, such that the
employees' table might have columns for attributes such as first name, last name,
employee ID, department, pay grade, and job title. Each row represents an instance of
the object class represented by the table. For example, one row in the employees' table
might represent an employee who has employee ID 12345.

You can usually find many different ways to organize data into tables. Relational
database theory defines a process called normalization, which ensures that the set of
tables you define will organize your data effectively.
24

SQL

To work with data in a database, you must use a set of commands and statements (a
language) supported by the database management system (DBMS) software. You can
use several different languages with relational databases; the most common is SQL. The
American National Standards Institute (ANSI) and the International Organization for
Standardization (ISO) define software standards, including standards for SQL. SQL
Server 2000 supports Entry Level SQL-92, the SQL standard published by ANSI and
ISO in 1992. The dialect of SQL supported by SQL Server is called Transact-SQL, and
Transact-SQL is the primary language used by SQL Server applications.

XML

XML is the emerging standard format for data on the Internet. XML is a set of tags that
can be included in a text document in order to define the structure of the document.

Although most SQL statements return their results in a relational (tabular) result set, the
SQL Server 2000 database component supports a FOR XML clause that causes the
results to be returned as an XML document. SQL Server 2000 also supports XPath
queries from Internet and intranet applications. You can add XML documents to SQL
Server databases,

SQL Server 2000 Features

SQL Server 2000 includes a number of features that support ease of installation,
deployment, and use; scalability; data warehousing; and system integration with other
server software.

Ease of Installation, Deployment, and Use

SQL Server 2000 includes many tools and features that simplify the process of installing,
deploying, managing, and using databases. SQL Server 2000 provides database
administrators with all of the tools that are required to fine-tune SQL Server 2000
installations that run production online systems. SQL Server 2000 is also capable of
operating efficiently on a small, single-user system with minimal administrative
overhead.

The installation or upgrade of SQL Server 2000 is driven by a Graphical User Interface
(GUI) application that guides users in providing the information that SQL Server 2000
25

Setup needs. The Setup program itself automatically detects whether an earlier version
of SQL Server is present, and after SQL Server 2000 is installed, it asks users whether
they want to launch the SQL Server 2000 Upgrade wizard to quickly guide them through
the upgrade process. The entire installation or upgrade process is accomplished quickly
and with minimal input from the users.

SQL Server 2000 reconfigures itself automatically and dynamically while running. As
more users connect to SQL Server 2000, it can dynamically acquire additional
resources, such as memory. As the workload falls, SQL Server 2000 frees the resources
back to the system. If other applications are started on the server, SQL Server 2000 will
detect the additional allocations of virtual memory to those applications and reduce its
use of virtual memory in order to reduce paging overhead. SQL Server 2000 can also
increase or decrease the size of a database automatically as data is inserted or deleted.

SQL Server 2000 offers database administrators several tools for managing their
systems, such as SQL Server Enterprise Manager and SQL Profiler.

Scalability

The SQL Server 2000 database engine is a robust server that can manage terabyte
databases being accessed by thousands of users. At the same time, when running at its
default settings, SQL Server 2000 has features such as dynamic self-tuning that enable
it to work effectively on laptops and desktops without burdening users with administrative
tasks.

SQL Server 2000 includes several features that extend the scalability of the system. For
example, SQL Server 2000 dynamically adjusts the granularity of locking to the
appropriate level for each table referenced by a query and has high-speed optimizations
that support Very Large Database (VLDB) environments. In addition, SQL Server 2000
can build parallel execution plans that split the processing of a SQL statement into
several parts. Each part can be run on a different Central Processing Unit (CPU), and
the complete result set is built more quickly than if the different parts were executed
serially.

Data Warehousing

A data warehouse is a database that is specifically structured to enable flexible queries


of the data set and decision-making analysis of the result set. A data warehouse typically
contains data representing the business history of an organization. A data mart is a
subset of the contents of a data warehouse. A data mart tends to contain data that is
focused at the department level, or on a specific business area. SQL Server 2000
includes several components that improve the capability to build data warehouses that
effectively support decision support processing needs:
26

• Data Warehousing Framework. A set of components and Application


Programming Interfaces (APIs) that implement the data warehousing features of
SQL Server 2000.
• Data Transformation Services (DTS). A set of services that aids in building a
data warehouse or data mart.
• Meta Data Services. A set of ActiveX interfaces and information models that
define the database schema and data transformations implemented by the Data
Warehousing Framework. A schema is a method for defining and organizing
data, which is also called metadata.
• Analysis Services. A set of services that provide OLAP processing capabilities
against heterogeneous OLE DB data sources.
• English Query. An application development product that enables users to ask
questions in English, rather than in a computer language such as SQL.

System Integration

SQL Server 2000 works with other products to form a stable and secure data store for
Internet and intranet systems:

• SQL Server 2000 works with Windows 2000 Server and Windows NT Server
security and encryption facilities to implement secure data storage.
• SQL Server 2000 forms a high-performance data storage service for Web
applications running under Microsoft Internet Information Services.
• SQL Server 2000 can be used with Site Server to build and maintain large,
sophisticated e commerce Web sites.
• The SQL Server 2000 TCP/IP Sockets communications support can be
integrated with Microsoft Proxy Server to implement secure Internet and intranet
communications.

SQL Server 2000 is scalable to levels of performance capable of handling extremely


large Internet sites. In addition, the SQL Server 2000 database engine includes native
support for XML, and the Web Assistant Wizard helps you to generate Hypertext Markup
Language (HTML) pages from SQL Server 2000 data and to post SQL Server 2000 data
to Hypertext Transport Protocol (HTTP) and File Transfer Protocol (FTP) locations.

SQL Server supports Windows Authentication, which enables Windows NT and


Windows 2000 user and domain accounts to be used as SQL Server 2000 login
accounts. Users are validated by Windows 2000 when they connect to the network.
When a connection is formed with SQL Server, the SQL Server client software requests
a trusted connection, which can be granted only if they have been validated by Windows
NT or Windows 2000. SQL Server, then, does not have to validate users separately.
Users are not required to have separate logins and passwords for each SQL Server
system to which they connect.

SQL Server 2000 can send and receive e-mail and pages from Microsoft Exchange or
other Message Application Programming Interface (MAPI)-compliant mail servers. This
function enables SQL Server 2000 batches, stored procedures, or triggers to send e-
mail. SQL Server 2000 events and alerts can be set to send e-mail or pages
automatically to the server administrators in case of severe or pending problems.
27

INTRODUCTION TO PROJECT
28

Objective

The objective of the software is to create easy access interfaces for


bank officials and customers . Above all the conditions should be
met only after ensuring data security and consistency. The software
serves the purpose for every requirement whether it is generation
of new account or query for the personal information and account
details.In short a complete solution for all advanced banking needs.
The software is a combination of 2 and 3 tier architecture.2 tier for
banking officials and 3 tier for customers so as to ensure that
customers should not interact directly with the database for data
security and data consistency reasons. therefor V.B.Net is used for
bank official's interfaces and ASP.Net for customers so as they
should interact with the database through web server only and for
query purpose only.
29

Project Requirements

• Hardware Requirements
• 3 Pentium Processor Machines

• 2.1 GHz, 256 RAM, 40 GB HDD for Database Server

• 2.1 GHz, 256 RAM, 40 GB HDD for Database Server

• 1.7 GHz, 128 RAM, 10 GB HDD for client machine

• Software Requirements
• Microsoft Windows Operating System (XP Professional) with IIS

• Microsoft Visual Studio.Net (V.2003)

• Microsoft SQL Server

• Time Limitation
• The Bank Management System is to be completed in 2 weeks.
30

PROBLEM DESCRIPTION

This is the first step of software development. At this very first


stage, preliminary survey or initial investigation is done regarding
the system in question. Here problem is investigated and fully
understood i.e. the need of existing system is recognized.

• It is expensive to prepare manual .It is difficult to keep them


up to date and will have to be revised from time to time.

• This software cannot be easily transformed to Web


Applications and cannot be accessed using Internet. Hence
cannot be used in other various branches of the Bank.

• The software is platform dependent as it functions on .NET


Framework.

• Bad methods of working and bad handwriting can lead to


misleading results.

• It has problem in finishing work by a certain time.


31

Overview of system study


System study also called system development life cycle (SDLC), gives the
different steps that must be followed to develop a candidate system. The developer
should progress from one stage to another methodically, answering key questions &
achieving results in each stage. Table below shows the steps/stages of SDLC.

Stage Goal
32

Recognition of need To understand problem

Redefine problem & to search


Feasibility study alternative candidate system

Data collection & detailed


Analysis evaluation of current system

Design specifications for candidate


Design system

There are mainly 5 SDLC models used in the development of a software projects –
33

1) Waterfall model/Linear Sequential Model


2) V-shaped model.
3) Iterative/Incremental model.
4) Spiral model.
5) Prototype model.

Iterative development prescribes the construction of initially small but ever larger
portions of a software project to help all those involved to uncover important issues early
before problems or faulty assumptions can lead to disaster. Iterative processes are
preferred by commercial developers because it allows a potential of reaching the design
goals of a customer who does not know how to define what they want.

An iterative lifecycle model does not attempt to start with a full specification of
requirements. Instead, development begins by specifying and implementing just part of
the software, which can then be reviewed in order to identify further requirements. This
process is then repeated, producing a new version of the software for each cycle of the
model.

We have used iterative or incremental model of SDLC in the development of this


software project. We will provide different components of a software in increments. In
first iteration, it is provided with facilities to manage Personal Information and
Academics records of students. It is provided with all basis facilities like addition,
deletion, updation, and searching etc of a student record. In second iteration we will
provide a component for managing students fee and so on.

Below are the advantages of the Iterative Life Cycle:

• The Design phase goes much faster, as designs are only done on the items in the
current release. (Release 1.0 for example).
• Coding and Testing go much faster because there are less items to code and test.
If major design flaws are found, re-work is much faster since the functional areas
have been greatly reduced.
34

• The client gets into production in less than 3 months, allowing them to begin
earning revenue or reducing expenses quicker with their product.
• If market conditions change for the client, changes can be incorporated in the next
iterative release, allowing the software to be much more nimble.
• As the software is implemented, the client can make recommendations for the
next iteration due to experiences learned in the past iteration.

SYSTEM ANALYSIS
35

Analysis
Before designing Bank Management System , the conventional Banking
systems were studied in detailed and gathered utmost information and data from
resources usually Banks have traditional means of processing information, manual
ways for keying attendee information into a database, and has limited access to
information. These things make a system inefficient. While analyzing various
enterprises, these problems were drawn, which need to be handled.

First of all, it was found that most of the systems work manually i.e. they
depend on man power/will. Due to this, the interconnectivity between various
independent components was harmed or affected badly. This slows down the
working of various components and increases misapprehension.

Secondly, these enterprises have conventional means of dealing with


data/information which takes lot of time and were still bungling.

Another problem was manual ways for keying balance sheet information
into a database that usually result in imperfections. This course also use more
time.
One important hurdle that harms most conventional Banking systems was limited
access to information at a given time. It leads to puzzlement and needed to be
care.

Final but also very noteworthy dilemma was revenue expenditure on men,
for every small process one had to appoint a person. On the other hand, a
technologically bank management system can handle many processes concurrently.

Identification of Need
36

This is the first step of software development. At this very first


stage, preliminary survey or initial investigation is done regarding
the system in question. Here problem is investigated and fully
understood i.e. the need of existing system is recognized.

The following problems were found in existing traditional Punjab


police systems:

1. Most of the systems were manually dependent i.e. they


depend on man power/will. This slows down the working of
various components of Banking systems and increases
misunderstanding.
2. Traditional means of processing, information retrieving
etc takes lot of time and were still inefficient.
3. Manual ways for keying attendee information into a
database results in imperfections and time consumption.
4. Limited access to information at a given time.
5. Revenue expenditure on manpower.

Project Planning
37

According to the given drawbacks of last ‘Bank Management


System’ we planned that why not prepare a new system for bank
management in which, use the feature and also remove the
drawback of the last system.
38

SYSTEM REQUIRMENT
SPECIFICATIONS

Software Requirements
Specification

for
BANK MANAGEMENT SYSTEM

Version 1.0

Prepared by-:

.NET Framework........................................................................................................9
The .NET Framework and the Common Language Runtime.................................................... 10
39

VB.NET....................................................................................................................11
What's New in VB .NET?.......................................................................................................... 11
Changes in Web Development.................................................................................12
Changes in Data Handling........................................................................................13
Changes in the Visual Basic Language....................................................................13
Building VB .NET Applications................................................................................................ 18
Assemblies................................................................................................................19
Solutions and Projects..............................................................................................19
Debug and Release Versions....................................................................................19
All About Windows Forms........................................................................................................ 20
Overview of SQL Server 2000................................................................................................... 22
What Is SQL Server 2000?.......................................................................................22
Databases..................................................................................................................23
Relational Databases................................................................................................23
SQL...........................................................................................................................24
XML.........................................................................................................................24
SQL Server 2000 Features........................................................................................24
Ease of Installation, Deployment, and Use..............................................................24
Scalability.................................................................................................................25
Data Warehousing....................................................................................................25
System Integration....................................................................................................26
INTRODUCTION TO PROJECT................................................................................. 27
Overview of system study................................................................................................31
Introduction......................................................................................................................40
Purpose....................................................................................................................................... 40
This document contains Software Requirements Specification for a Web application named as
Bank Management System. This is SRS for the first release of the product. The first release of
this product will produce partially functional version of Bank Management System.. ............40
Document Conventions.............................................................................................................. 40
Intended Audience and Reading Suggestions............................................................................ 40
Project Scope.............................................................................................................................. 41
This software can be easily transformed to Web Applications and can be accessed using
Internet.Hence can be used in other various branches of the Bank.The software is platform
independent as it functions on .NET Framework...................................................................... 41
................................................................................................................................................... 41
Overall Description.................................................................................................................... 41
Product Features......................................................................................................................... 41
User Classes and Characteristics................................................................................................ 42
Operating Environment.............................................................................................................. 42
User Interfaces........................................................................................................................... 42
Hardware Interfaces................................................................................................................... 43
Software Interfaces.................................................................................................................... 43
BLACK BOX TESTING.................................................................................................78
40

Introduction

Purpose
This document contains Software Requirements Specification for a Web application
named as Bank Management System. This is SRS for the first release of the
product. The first release of this product will produce partially functional version of
Bank Management System..

Document Conventions
No special or standard convention was followed while writing this SRS.

Intended Audience and Reading Suggestions


The SRS is for the reading of product client and users.
41

Project Scope

This software can be easily transformed to Web Applications


and can be accessed using Internet.Hence can be used in other
various branches of the Bank.The software is platform
independent as it functions on .NET Framework.

Overall Description

Product Features

The system will have following features


o Menu driven: this system will have a graphical interface,
which will be easy to use and understand

o Security: A password-protected feature will be included


upon accessing sensitive information to ensure desired level
of security in the final product.

Instant result: The changed balance in the account will be


reflected there and then.

o Database access: Officials can view database anytime they


want but the customers .

o Consistency: The Data of the customers and other


transaction details remain Consistent.

o Combination of two and three tier Architecture: The two


tier architecture is designed or planned for officials and three
tier for customers for data security and consistency.
42

User Classes and Characteristics

The product can be made available for use to any institute’s official (Staff members,
teachers, HOD’s, Training and placement department, Accounts department etc)
depending on the security levels.

Operating Environment

Hardware Requirements

• 3 Pentium Processor Machines

• 2.1 GHz, 256 RAM, 40 GB HDD for Database Server

• 2.1 GHz, 256 RAM, 40 GB HDD for Database Server

• 1.7 GHz, 128 RAM, 10 GB HDD for client machine

Software Requirements

• Microsoft Windows Operating System (XP Professional) with IIS

• Microsoft Visual Studio.Net (V.2003)

• Microsoft SQL Server

User Interfaces
There will be user interfaces as given below –

1) Login form – Here the user name & password will be


checked.
43

2) Index page – This will provide user with basic five options.
• Create an account
• Transaction
• Queries
• Open for modification
• Close an account
• Exit

Hardware Interfaces

3 Pentium Processor Machines::


2.1 GHz, 256 RAM, 40 GB HDD for Database Server
2.1 GHz, 256 RAM, 40 GB HDD for Database Server
1.7 GHz, 128 RAM, 10 GB HDD for client machine

Software Interfaces

Microsoft Windows Operating System (XP Professional) with IIS


Microsoft Visual Studio.Net (V.2003)
Microsoft SQL Server

SYSTEM DESIGN

Logical Design

Tables

Account_desc

Column Name Data type Length Constriants


Account Type Varchar 20 Primary Key
44

Account Description Varchar 30


Minimum Balance int 4
Rate int 4

Account_master

Column Name Data Length Constriants


type
ac_no int 15 Primary Key
Balance float 9
Account_type Varchar 15 Foreign_key(account_desc)
Account_open_date Datetime 8
Atm_card_no int 8
Guarantor_id int 15
Last_interest_date datetime 8
Last_passbook_entry datetime 15
Fd_amount float 8
Fd_expiry_date Datetime 8
Fd_rate float 8
Cheque _tran

Column name Data type Length Constraint

Tran_id int 4 Primary key

Ac_no int 4 Foreign key(account_master)

Account_holder_name Varchar 20

ch_holder_name varchar 20

amount float 8

balance float 8

Cheque_no int 4

Tran_date date 8

Customer
45

Column name Data type Length Constraint

Ac_no Varchar 20 Primary Key


Customer_name Varchar 20
sex Varchar 6
D_o_b Datetime 8
Residential_adress Varchar 30
Official_address Varchar 30
city Varchar 20
state Varchar 20
Pin_code Varchar 6
Home_p_no Varchar 15
Office_p_no Varchar 15
Email_id Varchar 20
Atm_card_no Varchar 20
Mobile_no varchar 15

Customer_query

Column name Data type Length constraint

Query_id Varchar 10 Primary key


Ac_no Varchar 20
Query_type Varchar 20
Date_recieved Datetime 8
Query_text Varchar 30

Draft_issue

Column name Data type Length constraint

Draft_no int 4 Primary key


46

In_favour_of Varchar 30
Payable_at Varchar 20
Holder_name Varchar 20
amount float 8
Date_issue Datetime 8
Date_expiry Datetime 8

Draft_tran

Column name Data type length Constraint

Draft_no varchar 20 Primary key

Ac_no Varchar 20 Foreign_key(account_master)

Branch varchar 20

amount Numeric 9

date Datetime 8

Transaction_master

column name Data type length constraint

Tran_id int 4 Primary key

Tran_date Datetime 8

Tran_type Varchar 15

cust_ac_no int 8 Foreign key(account_master)

other_ac_no Varchar 8 Foreign key(account_master)

Draft_no Varchar 20

Cheque_no varchar 9

amount float 8

balance float 8

Other_balance float 8
47

Form Layout

1. Login Form
48

2. Menu Form
49

3. Create an Account
50

4. Transaction
51

5. Queries
52

6. Open for modification


53

7. Close an Account
54

ER diagram
55

Acn
Dam Cdate Ddate nam
o Add city
t e
Acbrnc
Camt ACCOUNT h BRANCH

Bal

Acno TRA HA
NSA HAS
S
CT
Fname

Acn
o
Fnam
CUSTOMER BANK
e

Gender
Add Phone Name

CODING
1. Coding for Login form
56

Public Class Form1


Inherits System.Windows.Forms.Form
Dim r As Integer
Dim a As New Form2

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
If TextBox1.Text = "intel" AndAlso TextBox2.Text = "human" Then
a.Show()
Me.Hide()
Else
r = MessageBox.Show("INCORRECT USERNAME OR PASSSWORD",
"LOGIN ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r = DialogResult.Retry Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
Else
Me.Close()
End If
End If
End Sub
End Class

2. Coding for Menu form

Public Class Form2


Inherits System.Windows.Forms.Form
Dim a As New Form3
Dim b As New Form4
Dim c As New Form5
Dim d As New Form6
Dim f As New Form7

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Me.Hide()
a.show()

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Me.Hide()
b.show()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
57

Me.Hide()
c.show()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
Me.Hide()
d.show()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
Me.Hide()
f.Show()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button6.Click
Application.Exit()

End Sub

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load

End Sub
End Class

3. Coding for create an account


public Class Form3
Inherits System.Windows.Forms.Form
Dim str, s2, s4, s1, s, str1, i, j, k As String
Dim s3, ac, r, a, b, c As Integer
Dim m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, r0, r1, r2, r3,
r4, r5, r6, r7, r8, r9, r10 As Integer
Dim dr As SqlDataReader
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
Dim f2 As New Form2
f2.Show()
Me.Hide()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
CheckBox1.Checked = False
CheckBox2.Checked = False
CheckBox3.Checked = False
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
58

TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox19.Text = ""
TextBox13.Text = ""
TextBox18.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
ComboBox4.Text = ""
ComboBox5.Text = ""
ComboBox6.Text = ""

End Sub

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("Yes")
ComboBox1.Items.Add("No")
ComboBox2.Items.Add("1")
ComboBox2.Items.Add("2")
ComboBox2.Items.Add("3")
ComboBox2.Items.Add("4")
ComboBox2.Items.Add("5")
ComboBox2.Items.Add("6")
ComboBox3.Items.Add("Single")
ComboBox3.Items.Add("Joint")
ComboBox4.Items.Add("F")
ComboBox4.Items.Add("M")
ComboBox5.Items.Add("F")
ComboBox5.Items.Add("M")
ComboBox6.Items.Add("Yes")
ComboBox6.Items.Add("No")
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
r = MessageBox.Show("ARE YOU SURE YOU WANT TO EXIT", "EXIT",
MessageBoxButtons.OKCancel, MessageBoxIcon.Question)
If r = DialogResult.OK Then
Me.Close()
End If

End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
str = "current"
59

End If
End Sub

Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked Then
str = "savings"
End If
End Sub

Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If CheckBox3.Checked Then
str = "advanced"

End If
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedText = "yes" Then
s2 = "yes"
Else
s2 = "no"

End If
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
Select Case ComboBox2.SelectedText
Case 1
s3 = 1
Case 2
s3 = 2
Case 3
s3 = 3
Case 4
s3 = 4
Case 5
s3 = 5
Case 6
s3 = 6
End Select
End Sub

Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox3.SelectedIndexChanged
If ComboBox3.SelectedText = "single" Then
s4 = "single"
Else
s4 = "joint"
60

End If
End Sub

Private Sub ComboBox4_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox4.SelectedIndexChanged
If ComboBox4.SelectedText = "F" Then
s = "F"
Else
s = "M"

End If
End Sub

Private Sub ComboBox5_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ComboBox5.SelectedIndexChanged
If ComboBox5.SelectedText = "F" Then
s1 = "F"
Else
s1 = "M"

End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Try
Dim CON As SqlConnection
CON = New SqlConnection("server=SHAILESH;database=bank;
user id=sa; password=sa;")
CON.Open()
Dim com As SqlCommand
com = New SqlCommand("select * from users1", CON)
dr = com.ExecuteReader()
While dr.Read()
ac = dr(0)
End While
CON.Close()

If CheckBox1.Checked = True Then

ac = ac + 1
str1 = "acc" & ac
TextBox5.Text = str1
i = str1
a = ac
CON.Open()
Dim com1 As SqlCommand
com1 = New SqlCommand("CREATE TABLE " & str1 & "(acc_no
integer not null,fname varchar(100) not null,tot_amt integer not
null,cr_date varchar(20),de_date varchar(20),cr_time
varchar(20),de_time varchar(20),ce_amt integer,de_amt integer,ch_no
integer,dd_no integer)", CON)
com1.ExecuteNonQuery()
CON.Close()
End If
61

If CheckBox2.Checked = True Then


ac = ac + 1
str1 = "acc" & ac
TextBox7.Text = str1
j = str1
b = ac
CON.Open()
Dim com2 As SqlCommand
com2 = New SqlCommand("CREATE TABLE " & str1 & "(acc_no
integer not null,fname varchar(100) not null,tot_amt integer not
null,cr_date varchar(20),de_date varchar(20),cr_time
varchar(20),de_time varchar(20),ce_amt integer,de_amt integer,ch_no
integer,dd_no integer)", CON)
com2.ExecuteNonQuery()
CON.Close()
End If

If CheckBox3.Checked = True Then


ac = ac + 1
str1 = "acc" & ac
TextBox12.Text = str1
k = str1
c = ac
CON.Open()
Dim com3 As SqlCommand
com3 = New SqlCommand("CREATE TABLE " & str1 & "(acc_no
integer not null,fname varchar(100) not null,tot_amt integer not
null,cr_date varchar(20),de_date varchar(20),cr_time
varchar(20),de_time varchar(20),ce_amt integer,de_amt integer,ch_no
integer,dd_no integer)", CON)
com3.ExecuteNonQuery()
CON.Close()
End If
If CheckBox1.Checked = False Then
TextBox5.Text = "NA"
End If
If CheckBox2.Checked = False Then
TextBox7.Text = "NA"
End If
If CheckBox3.Checked = False Then
TextBox12.Text = "NA"
End If
Catch ex As System.Exception
MsgBox(ex.Message)
End Try

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button6.Click
If IsNumeric(TextBox1.Text) = True Then
r0 = MessageBox.Show("INVALID FIRST NAME", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
62

If r0 = DialogResult.Retry Then
TextBox1.Text = ""
TextBox1.Focus()
Else
Me.Close()
End If
Else
m1 = 1
End If

If IsNumeric(TextBox2.Text) = True Then


r1 = MessageBox.Show("INVALID LAST NAME", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r1 = DialogResult.Retry Then
TextBox2.Text = ""
TextBox2.Focus()
Else
Me.Close()
End If
Else
m2 = 1
End If

If IsNumeric(TextBox3.Text) = True Then


r2 = MessageBox.Show("INVALID FATHER NAME", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r2 = DialogResult.Retry Then
TextBox3.Text = ""
TextBox3.Focus()
Else
Me.Close()
End If
Else
m3 = 1
End If

If IsNumeric(TextBox4.Text) = True Then


r3 = MessageBox.Show("INVALID MOTHER NAME", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r3 = DialogResult.Retry Then
TextBox4.Text = ""
TextBox4.Focus()
Else
Me.Close()
End If
Else
m4 = 1
End If
If IsNumeric(TextBox8.Text) = False Then
r4 = MessageBox.Show("INVALID PHONE(res)", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r4 = DialogResult.Retry Then
TextBox8.Text = ""
TextBox8.Focus()
Else
63

Me.Close()
End If
Else
m5 = 1
End If

If IsNumeric(TextBox9.Text) = False Then


r5 = MessageBox.Show("INVALID PHONE(off)", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r5 = DialogResult.Retry Then
TextBox9.Text = ""
TextBox9.Focus()
Else
Me.Close()
End If
Else
m6 = 1
End If

If IsNumeric(TextBox10.Text) = False Then


r6 = MessageBox.Show("INVALID PHONE(mob)", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r6 = DialogResult.Retry Then
TextBox10.Text = ""
TextBox10.Focus()
Else
Me.Close()
End If
Else
m7 = 1
End If

If IsNumeric(TextBox15.Text) = True Then


r7 = MessageBox.Show("INVALID INTRODUCER'S FIRST NAME)",
"ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r7 = DialogResult.Retry Then
TextBox15.Text = ""
TextBox15.Focus()
Else
Me.Close()
End If
Else
m8 = 1
End If

If IsNumeric(TextBox16.Text) = True Then


r8 = MessageBox.Show("INVALID INTRODUCER'S LAST NAME)",
"ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r8 = DialogResult.Retry Then
TextBox16.Text = ""
TextBox16.Focus()
Else
Me.Close()
End If
Else
64

m9 = 1
End If

If IsNumeric(TextBox18.Text) = False Then


r9 = MessageBox.Show("INVALID PHONE(res))", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r9 = DialogResult.Retry Then
TextBox18.Text = ""
TextBox18.Focus()
Else
Me.Close()
End If
Else
m10 = 1
End If

If IsNumeric(TextBox17.Text) = False Then


r10 = MessageBox.Show("INVALID PHONE(mob))", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r10 = DialogResult.Retry Then
TextBox17.Text = ""
TextBox17.Focus()
Else
Me.Close()
End If
Else
m11 = 1
End If
If m1 = 1 And m2 = 1 And m3 = 1 And m4 = 1 And m5 = 1 And m6 =
1 And m7 = 1 And m8 = 1 And m9 = 1 And m10 = 1 And m11 = 1 Then
MsgBox("INFORMATION VALIDATED")

End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Try
Dim CON As SqlConnection
CON = New SqlConnection("SERVER=SHAILESH;DATABASE=BANK;
UID=SA; PWD=SA;")

CON.Open()
If CheckBox1.Checked = True And CheckBox2.Checked = True And
CheckBox3.Checked = True Then
Dim com4, com5, com6 As SqlCommand
com4 = New SqlCommand("insert into users1 values ('" &
CheckBox1.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com5 = New SqlCommand("insert into users1 values ('" &
CheckBox2.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
65

& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com6 = New SqlCommand("insert into users1 values ('" &
CheckBox3.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com4.ExecuteNonQuery()
com5.ExecuteNonQuery()
com6.ExecuteNonQuery()
ElseIf CheckBox1.Checked = True And CheckBox2.Checked = True
Then
Dim com7, com8 As SqlCommand
com7 = New SqlCommand("insert into users1 values ('" &
CheckBox1.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com8 = New SqlCommand("insert into users1 values ('" &
CheckBox2.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com7.ExecuteNonQuery()
com8.ExecuteNonQuery()

ElseIf CheckBox1.Checked = True And CheckBox3.Checked = True


Then
Dim com9, com10 As SqlCommand
com9 = New SqlCommand("insert into users1 values ('" &
CheckBox1.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com10 = New SqlCommand("insert into users1 values ('" &
CheckBox3.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
66

& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com9.ExecuteNonQuery()
com10.ExecuteNonQuery()

ElseIf CheckBox2.Checked = True And CheckBox3.Checked = True


Then
Dim com11, com12 As SqlCommand
com11 = New SqlCommand("insert into users1 values ('" &
CheckBox2.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com12 = New SqlCommand("insert into users1 values ('" &
CheckBox3.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '"
& TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "',"
& TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com11.ExecuteNonQuery()
com12.ExecuteNonQuery()

Else
Dim com13 As SqlCommand

com13 = New SqlCommand("insert into users1 values ('" &


str & "','" & TextBox1.Text & "','" & TextBox2.Text & "', '" &
TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox4.Text & "'," &
TextBox6.Text & ", '" & ComboBox3.Text & "'," & TextBox8.Text & "," &
TextBox9.Text & "," & TextBox10.Text & ", '" & TextBox11.Text & "','" &
ComboBox1.Text & "','" & ComboBox2.Text & "','" & TextBox13.Text & "',"
& TextBox14.Text & ",'" & TextBox15.Text & "', '" & TextBox16.Text &
"','" & ComboBox5.Text & "'," & TextBox18.Text & "," & TextBox17.Text &
", '" & TextBox19.Text & "','" & ComboBox6.Text & "')", CON)
com13.ExecuteNonQuery()
End If
CON.Close()
MessageBox.Show("NEW ACCOUNT CREATED", "CREATED",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
If CheckBox1.Checked = True Then
CON.Open()
Dim com14 As SqlCommand
com14 = New SqlCommand("insert into " & i &
"(acc_no,fname,tot_amt)values(" & a & ",' " & TextBox1.Text & " '," &
TextBox14.Text & " )", CON)
67

com14.ExecuteNonQuery()
CON.Close()
End If
If CheckBox2.Checked = True Then
CON.Open()
Dim com15 As SqlCommand
com15 = New SqlCommand("insert into " & j &
"(acc_no,fname,tot_amt)values(" & b & ",' " & TextBox1.Text & " '," &
TextBox14.Text & " )", CON)
com15.ExecuteNonQuery()
CON.Close()
End If
If CheckBox3.Checked = True Then
CON.Open()
Dim com16 As SqlCommand
com16 = New SqlCommand("insert into " & k &
"(acc_no,fname,tot_amt)values(" & c & ",' " & TextBox1.Text & " '," &
TextBox14.Text & " )", CON)
com16.ExecuteNonQuery()
CON.Close()
End If
Catch ex As Exception
MsgBox(ex.Message)

End Try

End Sub
End Class

4. Coding for Transaction


Public Class Form4
Inherits System.Windows.Forms.Form
Dim a As New Form12
Dim b As New Form13
Dim c As New Form14
Dim d As New Form15
Dim f As New Form16
Dim g As New Form17
Dim h As New Form18
Dim i As New Form19
Dim j As New Form20

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button6.Click
Dim f2 As New Form2
f2.Show()
Me.Hide()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
Me.Close()
68

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
GroupBox1.Enabled = True
RadioButton1.Enabled = True
RadioButton2.Enabled = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
GroupBox2.Enabled = True
RadioButton3.Enabled = True
RadioButton4.Enabled = True
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
GroupBox3.Enabled = True
RadioButton5.Enabled = True
RadioButton6.Enabled = True
RadioButton7.Enabled = True
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
GroupBox4.Enabled = True
RadioButton8.Enabled = True
RadioButton9.Enabled = True
End Sub

Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
GroupBox1.Enabled = False
GroupBox2.Enabled = False
GroupBox3.Enabled = False
GroupBox4.Enabled = False
RadioButton1.Enabled = False
RadioButton2.Enabled = False
RadioButton3.Enabled = False
RadioButton4.Enabled = False
RadioButton5.Enabled = False
RadioButton6.Enabled = False
RadioButton7.Enabled = False
RadioButton8.Enabled = False
RadioButton9.Enabled = False
End Sub

Private Sub RadioButton1_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton1.CheckedChanged
Me.Hide()
a.Show()
End Sub
69

Private Sub RadioButton2_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton2.CheckedChanged
Me.Hide()
b.Show()
End Sub

Private Sub RadioButton3_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton3.CheckedChanged
Me.Hide()
c.Show()
End Sub

Private Sub RadioButton4_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton4.CheckedChanged
Me.Hide()
d.Show()
End Sub

Private Sub RadioButton5_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton5.CheckedChanged
Me.Hide()
f.Show()
End Sub

Private Sub RadioButton6_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton6.CheckedChanged
Me.Hide()
g.Show()
End Sub

Private Sub RadioButton7_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton7.CheckedChanged
Me.Hide()
h.Show()
End Sub

Private Sub RadioButton8_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton8.CheckedChanged
Me.Hide()
i.Show()
End Sub

Private Sub RadioButton9_CheckedChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
RadioButton9.CheckedChanged
Me.Hide()
j.Show()
End Sub
End Class
70

5.Queries
Public Class Form5
Inherits System.Windows.Forms.Form

Dim a, r, m As Integer
Dim str As String
Dim dr As SqlDataReader
Dim f8 As New Form8
Dim f9 As New Form9

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
Me.Hide()
f8.Show()

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
Me.Hide()
f9.Show()

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
Me.Hide()
Dim f2 As New Form2
f2.Show()
End Sub

Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Button3.Enabled = False
Button4.Enabled = False
Label3.Enabled = False
Button2.Enabled = False
Label4.Visible = False
TextBox2.Enabled = False

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
If TextBox1.Text = "human" Then
Label4.Visible = True
Label4.Text = "AUTHENTICATED "
Button2.Enabled = True
TextBox2.Enabled = True
TextBox2.Focus()
71

Else
r = MessageBox.Show("INCORRECT PASSWORD", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r = DialogResult.Retry Then
TextBox1.Text = ""
TextBox1.Focus()
Else
Me.Close()

End If
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
a = CInt(TextBox2.Text)
f8.TextBox1.Text = a
f9.TextBox1.Text = a
Dim con As SqlConnection
con = New SqlConnection("SERVER=SHAILESH;DATABASE=BANK; UID=SA;
PWD=SA;")
con.Open()
Dim com As SqlCommand
com = New SqlCommand("select * from users1", con)
dr = com.ExecuteReader()
While dr.Read()
If dr(0) = a Then
m = 1
End If
End While
con.Close()
If m = 0 Then
r = MessageBox.Show("ACCOUNT DOES NOT EXIST", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r = DialogResult.Retry Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
Button2.Enabled() = False

Else
Me.Close()
End If

Else
Label3.Enabled = True
Button3.Enabled = True
Button4.Enabled = True
End If

End Sub
End Class
72

6. Coding for open for modification


Public Class Form6
Inherits System.Windows.Forms.Form
Dim r, acc As Integer
Dim dr As SqlDataReader
Dim m As Integer = 0
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim f As New Form2
f.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
If TextBox1.Text = "human" Then
Label3.Enabled = True
TextBox2.Enabled = True
Button2.Enabled = True
Label2.Visible = True
Label2.Text = "AUTHENTICATED"
TextBox2.Enabled = True
TextBox2.Focus()

Else
r = MessageBox.Show("INCORRECT PASSWORD", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r = DialogResult.Retry Then
TextBox1.Text = ""
TextBox1.Focus()
Else
Me.Close()

End If
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
acc = TextBox2.Text
Try
Dim CON As SqlConnection
CON = New SqlConnection("SERVER=SHAILESH;DATABASE=BANK;
UID=SA; PWD=SA;")
CON.Open()
Dim com As SqlCommand
com = New SqlCommand("select * from users1", CON)
dr = com.ExecuteReader()
While dr.Read()
If dr(0) = acc Then
m = 1
Exit While
End If
73

End While
If m = 0 Then
r = MessageBox.Show("ACCOUNT DOES NOT EXIST", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r = DialogResult.Retry Then
TextBox2.Text = ""
TextBox2.Focus()
CON.Close()
Else
Me.Close()

End If
Else
Dim obj As New Form10
obj.TextBox1.Text = acc

Me.Hide()
obj.Show()

End If

Catch ex As Exception

End Try

End Sub

Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Label2.Visible = False
TextBox2.Enabled = False

End Sub
End Class

7. Coding for Close an Account


Public Class Form7
Inherits System.Windows.Forms.Form
Dim r, j, k As Integer
Dim m As Integer = 0
Dim dr As SqlDataReader
Dim str As String
Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Label2.Enabled = False
TextBox2.Enabled = False
Button3.Enabled = False
Label3.Visible = False
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
If TextBox1.Text = "human" Then
74

Label2.Enabled = True
TextBox2.Enabled = True
Button3.Enabled = True
Label3.Visible = True
Label3.Text = "AUTHENTICATED"
TextBox2.Focus()

Else
r = MessageBox.Show("INCORRECT PASSWORD", "ERROR",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
If r = DialogResult.Retry Then
TextBox1.Text = ""
TextBox1.Focus()
Else
Me.Close()

End If
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
Try
Dim con As SqlConnection
con = New SqlConnection("SERVER=SHAILESH;DATABASE=BANK;
UID=SA; PWD=SA;")
con.Open()
j = TextBox2.Text
Dim com As SqlCommand
com = New SqlCommand("select * from users1", con)
dr = com.ExecuteReader()
While dr.Read()
k = dr(0)
If k = j Then
m = 1
End If
End While
con.Close()
If m = 0 Then
MessageBox.Show("ACCOUNT DOES NOT EXIST", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
If m = 1 Then
con.Open()
Dim com1 As SqlCommand
com1 = New SqlCommand("delete from users1 where
acc_no=@a", con)
com1.Parameters.Add("@a", TextBox2.Text)
com1.ExecuteNonQuery()
Dim com2 As SqlCommand
str = "acc" & TextBox2.Text
com2 = New SqlCommand("drop table " & str & "", con)
com2.ExecuteNonQuery()
con.Close()
MsgBox("ACCOUNT DELETED")
Me.Close()
Application.Exit()
75

End If
End If

Catch ex As Exception
MsgBox(ex.Message)

End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim f1 As New Form2
f1.Show()
Me.Close()
End Sub
End Class

Testing
76

TESTING

Testing is a process of executing a program with intentions of


finding an error. It is essential for a good system that it is properly
being tested before transferring it to the ultimate user, so that in
early stages the program bugs could be set right and probability of
system failure could be reduced.

In software development, errors can be injected at any stage during


the development. Error may occur at any level or during any phase
of the development. Ultimately these errors are reflected in the
code. Since code is frequently the only product that can be
observed, testing is the phase where the errors remaining from the
earlier phase must be detected

LEVELS OF TESTING:

1) Unit Testing: It is the first level of testing. In this, different


modules are tested against the specifications produced during
design for the modules. Unit testing is necessary for verification
of the code produced during the coding phase and hence the
goal is to test the integral logic of the modules.

2) Integrated Testing: It is the next level of testing. In this above


tested modules are combined into subtypes, which are then
tested. The goal is to see the modules can be integrated
properly, the emphasis being on the testing interfaces between
modules. Proper test cases are selected to carry
on integrated testing.
77

3) System Testing: Here the entire software system is tested. The


reference document for this is the requirement document, and a
goal is to see if the software meets its requirements. Acceptance
testing is sometimes performed with the realistic data of the
client to demonstrate that the software is working properly

Testing is a Herculean task for programmer. It gives effect of


demolishing his efforts of building software but it is constructive
task for building perfect software. Two testing approaches have
been adopted for testing and expenditure handling system.

 WHITE BOX TESTING.

 BLACK BOX TESTING.

WHITE BOX TESTING

In white box testing approach the close examination of procedure


detail is done. Logical path through software is tested by test
cases that exercise specific set of conditions and/or loops. The
status of program may be examined at various points to determine
if the expected status corresponds to the actual status.In the
software system it is essential that white box testing should be
done for the program of vital importance because this is very
tedious and time consuming.

Thus through white box testing we are able to test all the
independent paths with in a module, all logical decisions on their
boundaries within their operational bound were exercised and
internal data structures to assure their validity was exercised once.
78

After the successful completion of white box testing method the


black box testing method, which is complementary method, was
considered.

BLACK BOX TESTING

The black box testing method enables the engineer to drive sets of
input condition that will fully exercise all functional requirements
for a program.

In black box testing we have chosen an equivalence partitioning.

This method divides the input domain of a program into classes of

data from which test cases can be derived.

Equivalence classes are according to the following guidelines:

 If an input condition specifies range, then one valid & two


invalid equivalence classes are defined.

 If an input condition requires specific values one valid & two


invalid equivalence classes are defined.

 If an input condition specifies a member of set one valid


equivalence class & one invalid are defined.

 If an input condition is Boolean, one valid and one invalid class


are defined.

 After testing the module it is important to test software as a


whole for which we have chosen the top down integration
79

approach, which is an incremental approach to construction of


program structure. Modules are integrated by moving down
through the control hierarchy, beginning with main control
module, module subordinate to main control module
incorporated into data structure in either depth first manner.

 Through the top down module we have first checked the


integration of the main menu with the subordinate menus and
the integration of the sub menus with their subordinate menus.

Das könnte Ihnen auch gefallen