Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Online License Processing With Test

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 94

ONLINE LISENCE PROCESSING WITH TEST

ABSTRACT :

RTA Information System (RTA) is an online information source developed for Road
Transport Authority to facilitate the users in applying for various licenses and registrations. This
tool has been designed to facilitate the flow of information within the organization.RTA provides
the facility of applying licenses online, issuance of permanent license, tax challans, and receiving
payments against challans.

In the Previous System It is not efficient in performing office work in RTO services, It
includes much manual process and time consuming, It is not user friendly, Maintains local data
base. It is not Generating Accurate Reports.

The Existing system of RTA services has been is usage for two years. The existing
system is not giving accurate results while doing transactions. It doesn’t provide security, anyone
enter into the system and can do their own transactions. It is not flexible in generating reports
and many manual processes are made computerized.

To overcome problems in the existing System a new RTO services “Road Transport
Authority Information System” is proposed after study of system. The objectives of proposed
system are: Ensure data integrity and security, less manpower, Generate accurate reports,
Accurate handling in multiple details.

SYSTEM OVERVIEW:

 In today’s world with the increasing traffic and longer commuting distances it is
becoming very difficult for people to travel for their particular licenses issue.
 Also most of the people today work for longer hours and do not have the flexibility to
take a break from work to give the licenses tests.
 People have not spent more time for licenses test.
 The People want a facility where they can have easy to issue their licenses.
 The facility to achieve schedule date by SMS, call or mail...
 The people collect their license from post and travel from long distance for issuing
license. So, the people waste their money.

OBJECTIVE:

 So, require to build new Website according to RTO office infrastructure and Facilities.

 So that all the people can get information about the e-RTO.

 Create a web application to be used in place of old system.


 Use ASP.NET and SQL Server technology to create strong and secured database
connectivity.
 To maintain and improve the skill management for the department personnel.
 To ensure transparency in the day-to-day management and administration of the officials.

RTA has the following modules:

1. RTO

2. Client

1. RTO

RTO services has been is usage for two years. The existing system is not giving accurate
results while doing transactions. It doesn’t provide security, anyone enter into the system and can
do their own transactions. It is not flexible in generating reports. And many manual processes are
made computerized.

 Application for learner license.


 Issue of Regular Driving License.
 Issuance of permanent license.
 Issuance of road tax challans for transport vehicles.
 Receiving payments against challans.
 Issue of a Duplicate Driving License.
 Renewal of Driving Licenses.
 Message Facility (Expire Date, Result Display)
2. Client

 The System keeps track of the transactions in the RTO office. It maintains Renewal of
learner’s License, Renewal of permanent license, Issue of learner’s license, Online LLR
Form, Registration Form, Issue of permanent license, payment against challan and finally
it produce printouts to payment of customers.

PROBLEM IN EXISTING SYSTEM


The Existing system of RTO services has been is usage for two years. The existing
system is not giving accurate results while doing transactions. It doesn’t provide security, anyone
enter into the system and can do their own transactions. It is not flexible in generating reports.
And many manual processes are made computerized.

The present system has following drawbacks:

It is not efficient in performing office work in RTO services.


It includes much manual process and time consuming.
It is not user friendly.
Maintains local data base.
It is not Generating Accurate Reports.

PROPOSED SYSTEM :

To overcome problems in the existing System a new RTO services “Road Transport
Authority Information System” is proposed after study of system. The objectives of proposed
system are:

Facilities ease of operation.


Ensure data integrity and security.
Less manpower.
Generate accurate reports.
Accurate handling in multiple details of multiple customers.
SOFTWARE REQUIREMENT :

Operating System : Window 10

Front -End : Visual Studio 2008

Back –End : SQL Server 2008

Language - .Net, Java Script

HARDWARE REQUIREMENT :

Processor : Intel Pentium IV,2.4 GHz

RAM : 512 MB

Hard Disk Drive : 40 GB

Video : 800*600, 1024*768 256 colors

FEASIBILITY STUDY:
A feasibility study is a preliminary study undertaken to determine and document a
project's viability. The term feasibility study is also used to refer to the resulting document.
These results of this study are used to make a decision whether to proceed with the project, or
table it. If it indeed leads to a project being approved, it will - before the real work of the
proposed project starts - be used to ascertain the likelihood of the project's success. It is an
analysis of possible alternative solutions to a problem and a recommendation on the best
alternative. It, for example, can decide whether an order processing be carried out by a new
system more efficiently than the previous one.

A feasibility study could be used to test a proposal for new system, which could be used because:
 The current system may no longer carry its purpose,
 Technological advancement may have rendered the current system obsolete,
 The business is expanding, allowing it to cope with extra work load,
 Customers are complaining about the speed and quality of work the business provides,
 Competitors are now winning a big enough market share due to an effective integration of a
computerized system.
A feasibility study should examine three main areas:
 Market issues
 Technical and organizational requirements
 Financial overview
Within a feasibility study, seven areas must be reviewed, including those of a :
1. Needs Analysis,
2. Economics,
3. Technical,
4. Schedule,
5. Organizational,
6. Cultural, and
7. Legal.

Needs Analysis :
A needs analysis should be the first undertaking of a feasibility study as it clearly defines
the project outline and the clients' requirements. Once these questions have been answered the
person/s undertaking the feasibility study will have outlined the project needs definition. The
following questions need to be asked to define the project needs definition: What is the end
deliverable? What purpose will it serve? What are the environmental effects? What are the rules
and regulations? What standards will we be measured against? What are the quality
requirements? What is the minimal quality requirements allowed? What sustainability can we
expect? What carry over work can we expect? What are the penalty clauses? How much do we
need to outsource? How much do we need to in source?

Technical feasibility study :


This involves questions such as whether the technology needed for the system exists, how
difficult it will be to build, and whether the firm has enough experience using that technology.
The assessment is based on an outline design of system requirements in terms of Input, Output,
Fields, Programs, and Procedures. This can be qualified in terms of volumes of data, trends,
frequency of updating, etc... In order to give an introduction to the technical system.
Cultural Feasibility study :
In this stage, the project's alternatives are evaluated for their impact on the local and
general culture. For example, environmental factors need to be considered.

Legal Feasibility study :


Not necessarily last, but all projects must face legal scrutiny. When an organization
either has legal council on staff or on retainer, such reviews are typically standard. However, any
project may face legal issues after completion too.

Marketing Feasibility study :


'''''''This will include analysis of single and multi-dimensional market forces that could affect the
commercial, along with the company that is carrying out the feasibility achieving more and more
reputation as they have carried out safety checks which allow the system to run appropriately.''''
Advantages of making Feasibility study:
There are many advantages of making feasibility study some of which are summarized below:
 This study being made as the initial step of software development life cycle has all the analysis
part in it which helps in analyzing the system requirements completely.
.
 Helps in identifying the risk factors involved in developing and deploying the system
.
 The feasibility study helps in planning for risk analysis
.
 Feasibility study helps in making cost/benefit analysis which helps the rganization and system to
run efficiently.
.
 Feasibility study helps in making plans for training developers for implementing the system.
.
 So a feasibility study is a report which could be used by the senior or top persons in the
organization. This is because based on the report the organization decides about cost estimation,
funding and other important decisions which is very essential for an organization to run
profitably and for the system to run stable.

FEATURES OF THE SOFTWARE:


Introduction To .NET:

.NET is the Microsoft’s development model in which software becomes available


over the Internet. The .Net Framework is the infrastructure of .Net. .Net is built from the group
up on open architecture. The goal of the Microsoft .Net platform is to simplify web development.

The .Net Framework provides the foundation upon which application and XML web
services are build and executed the unified nature of the .Net Framework means that all
applications, whether they are windows applications, web applications are XML web services are
developer by using a common set tools and code, and are easily integrated with one another.
1.1.1
1.1.2 The .Net Framework consists of the following elements:
 The Common Language Runtime. The runtime handles runtime
services, including language integration, security and memory
management. During development, the runtime provides features that are
needed to simplify development.
 Class Libraries. Class libraries provide reusable code for most common
task, including data access, XML web service development, and web and
windows forms.
Benefits of .Net Framework:

The benefits of using the .Net Framework for developing application include:

 Based on Web standards and practices.


 Design using unified application models.
 Easy for developers to use.
1.1.3 About VC#.Net:
Visual C# (pronounced C sharp) is designed to be a fast and easy way to create .Net
applications, including Web services and ASP.NET Web applications. Applications written
in Visual C# are built on the services of the common language runtime and take full
advantage of the .Net Framework.

With its many innovations, C# enables rapid application development while retaining the
expressiveness and elegance of C-style languages. Visual Studio supports Visual C# with a
full-featured Code Editor, project templates, designers, code wizards, a powerful and easy-to-
use debugger and other tools. The .Net Framework class library provides access to a wide
range of operating system services and other useful, well-designed class that speed up the
development cycle significantly.

C# is a simple, elegant, type-safe, object-oriented language recently developed by


Microsoft for building a wide range of applications. C# is designed to bring rapid
development to the C++ programmer without sacrificing the power and control that are a
hallmark of C and C++.

Because of the heritage, C# has a high degree of fidelity with C and C++, and developers
familiar with these languages can quickly become productive in C#.

C# provides intrinsic code trust mechanisms for a high level of security, garbage
collection and type safety. C# supports single inheritance and creates Microsoft intermediate
language (MSIL) as to native code compilers.

As an object-oriented language, C# supports the concepts of encapsulation, inheritance


and polymorphism. All variables and methods, including the Main method, the application’s
entry point are encapsulated within class definitions. A class may inherit directly from one
parent class, but it may implement any number of interfaces. Methods that override virtual
methods in a parent class require the override keyword as a way to avoid accidental
redefinition.
1.1.4 .Net Framework Architecture:
C# programs run on the .Net Framework, an integral component of Windows that
includes a virtual execution System called the Common Language Runtime (CLR), an
international standard that is the basis for creating and development environments in which
languages and libraries work together seamlessly.

Source code written in C# is compiled into an intermediate language (IL) that


conforms to the CLI specification. The IL code, along with resources such as bitmaps and
strings, is stored on disk in an executable file called assembly, typically with an extension of .exe
or .dll. An assembly contains a manifest that provides information on the assembly’s types,
version, and culture and security requirements.

When the C# program is executed, the assembly is loaded into the CLR, which might
take various actions based on the information in the manifest. Then, if the security requirements
are met, the CLR performs Just In Time (JIT) compilation to convert the IL code into native
machine instructions. The CLR also provides other services related to automatic garbage
collection, exception handling and resource management. Code that is executed by the CLR is
sometimes referred to as “managed code” in contrast to “unmanaged code” which is compiled
into native machine language that targets a specific system.

Language interoperability is a key feature of the .Net Framework. Because the IL code
produced by the C# compiler conforms to the Common Type Specification (CTS), IL code
generated from C# can interact with code that was generated from the .Net versions of Visual
Basic, Visual C++, Visual J#, or any of more than 20 other CTS-compliant languages. A single
assembly may contain multiple modules written in different .NET languages and the types can
reference each other just as if they were written in the same language.
1.1.5 FEATURES OF ASP.NET :

1.1.6 What is .NET?

1.1.7 When .NET was announced in late 1999, Microsoft positioned the
technology as a platform for building and consuming Extensible Markup Language
(XML) Web services. XML Web services allow any type of application, be it a
Windows- or browser-based application running on any type of computer system, to
consume data from any type of server over the Internet.

The reason this idea is so great is the way in which the XML messages are transferred:
over established standard protocols that exist today. Using protocols such as SOAP, HTTP, and
SMTP, XML Web services make it possible to expose data over the wire with little or no
modifications to your existing code.

Figure presents a high-level overview of the .NET Framework and how XML Web
services are positioned.

Figure 1.1. Stateless XML Web services model.


Since the initial announcement of the .NET Framework, it's taken on many new and
different meanings to different people. To a developer, .NET means a great environment for
creating robust distributed applications. To an IT manager, .NET means simpler deployment of
applications to end users, tighter security, and simpler management. To a CTO or CIO, .NET
means happier developers using state-of-the-art development technologies and a smaller bottom
line.

To understand why all these statements are true, you need to get a grip on what the .NET
Framework consists of, and how it's truly a revolutionary step forward for application
architecture, development, and deployment.
1.1.8 NET Framework

Now that you are familiar with the major goals of the .NET Framework, let's briefly
examine its architecture. As you can see in Figure 1-2, the .NET Framework sits on top of the
operating system, which can be a few different flavors of Windows and consists of a number of
components .NET is essentially a system application that runs on Windows.

Conceptually, the CLR and the JVM are similar in that they are both runtime
infrastructures that abstract the underlying platform differences. However, while the JVM
officially supports only the Java language, the CLR supports any language that can be
represented in itsCommon Intermediate Language (CIL). The JVM executes bytecode, so it can,
in principle, support many languages, too. Unlike Java's bytecode, though, CIL is never
interpreted. Another conceptual difference between the two infrastructures is that Java code runs
on any platform with a JVM, whereas .NET code runs only on platforms that support the CLR.
In April, 2003, the International Organization for Standardization and the International
Electrotechnical Committee (ISO/IEC) recognized a functional subset of the CLR, known as the
Common Language Interface (CLI), as an international standard.

This development, initiated by Microsoft and developed by ECMA International, a


European standards organization, opens the way for third parties to implement their own versions
of the CLR on other platforms, such as Linux or Mac OS X. For information on third-party and
open source projects working to implement the ISO/IEC CLI and C# specifications
The layer on top of the CLR is a set of framework base classes. This set of classes is
similar to the set of classes found in STL, MFC, ATL, or Java. These classes support
rudimentary input and output functionality, string manipulation, security management, network
communications, thread management, text management, reflection functionality, collections
functionality, as well as other functions.

On top of the framework base classes is a set of classes that extend the base classes to
support data management and XML manipulation. These classes, called ADO.NET, support
persistent data management—data that is stored on backend databases. Alongside the data
classes, the .NET Framework supports a number of classes to let you manipulate XML data and
perform XML searching and XML translations.

Classes in three different technologies (including web services, Web Forms, and
Windows Forms) extend the framework base classes and the data and XML classes. Web
services include a number of classes that support the development of lightweight distributed
components, which work even in the face of firewalls and NAT software. These components
support plug-and-play across the Internet, because web services employ standard HTTP and
SOAP.

Web Forms, the key technology behind ASP.NET, include a number of classes that allow
you to rapidly develop webGraphical User Interface (GUI) applications. If you're currently
developing web applications with Visual Interdev, you can think of Web Forms as a facility that
allows you to develop web GUIs using the same drag-and-drop approach as if you were
developing the GUIs in Visual Basic. Simply drag-and-drop controls onto your Web Form,
double-click on a control, and write the code to respond to the associated event.

Windows Forms support a set of classes that allow you to develop native Windows GUI
applications. You can think of these classes collectively as a much better version of the MFC in
C++ because they support easier and more powerful GUI development and provide a common,
consistent interface that can be used in all languages.
1.1.9 The Common Language Runtime

At the heart of the .NET Framework is the common language runtime. The common
language runtime is responsible for providing the execution environment that code written in
a .NET language runs under. The common language runtime can be compared to the Visual
Basic 6 runtime, except that the common language runtime is designed to handle all .NET
languages, not just one, as the Visual Basic 6 runtime did for Visual Basic 6. The following list
describes some of the benefits the common language runtime gives you:

o Automatic memory management


o Cross-language debugging
o Cross-language exception handling
o Full support for component versioning
o Access to legacy COM components
o XCOPY deployment
o Robust security model

You might expect all those features, but this has never been possible using Microsoft
development tools. Figure 1.3 shows where the common language runtime fits into the .NET
Framework.
1.1.9.1.1 Figure 1.3. The common language runtime and the .NET
Framework.

Note
Code written using a .NET language is known asmanaged code. Code that uses anything but the
common language runtime is known as unmanaged code. The common language runtime
provides a managed execution environment for .NET code, whereas the individual runtimes of
non-.NET languages provide an unmanaged execution environment.

Inside the Common Language Runtime


The common language runtime enables code running in its execution environment to
have features such as security, versioning, memory management and exception handling because
of the way .NET code actually executes. When you compiled Visual Basic 6 forms applications,
you had the ability to compile down to native node or p-code. Figure 1.4 should refresh your
memory of what the Visual Basic 6 options dialog looked like.
Figure1.4. Visual Basic 6 compiler options dialog.

When you compile your applications in .NET, you aren't creating anything in native code. When
you compile in .NET, you're converting your code—no matter what .NET language you're using
—into an assembly made up of an intermediate language called Microsoft Intermediate
Language (MSIL or just IL, for short). The IL contains all the information about your
application, including methods, properties, events, types, exceptions, security objects, and so on,
and it also includes metadata about what types in your code can or cannot be exposed to other
applications. This was called atype library in Visual Basic 6 or an IDL (interface definition
language) file in C++. In .NET, it's simply the metadata that the IL contains about your
assembly.
Note
The file format for the IL is known as PE (portable executable) format, which is a standard
format for processor-specific execution.
When a user or another component executes your code, a process occurs called just-in-
time (JIT) compilation, and it's at this point that the IL is converted into the specific machine
language of the processor it's executing on. This makes it very easy to port a .NET application to
any type of operating system on any type of processor because the IL is simply waiting to be
consumed by a JIT compiler.

The first time an assembly is called in .NET, the JIT process occurs. Subsequent calls
don't re-JIT the IL; the previously JITted IL remains in cache and is used over and over again.
when you learn about Application Center Test, you also see how the warm-up time of the JIT
process can affect application performance.
Understanding the process of compilation in .NET is very important because it makes
clear how features such as cross-language debugging and exception handling are possible. You're
not actually compiling to any machine-specific code—you're simply compiling down to an
intermediate language that's the same for all .NET languages. The IL produced by J# .NET and
C# looks just like the IL created by the Visual Basic .NET compiler. These instructions are the
same, only how you type them in Visual Studio .NET is different, and the power of the common
language runtime is apparent.

When the IL code is JITted into machine-specific language, it does so on an as-needed


basis. If your assembly is 10MB and the user is only using a fraction of that 10MB, only the
required IL and its dependencies are compiled to machine language. This makes for a very
efficient execution process. But during this execution, how does the common language runtime
make sure that the IL is correct? Because the compiler for each language creates its own IL, there
must be a process that makes sure what's compiling won't corrupt the system. The process that
validates the IL is known asverification. Figure 1.5 demonstrates the process the IL goes through
before the code actually executes.
1.1.9.1.2

1.1.9.1.3 Figure 1.5. The JIT process and verification.

When code is JIT compiled, the common language runtime checks to make sure that the
IL is correct. The rules that the common language runtime uses for verification are set forth in
the Common Language Specification (CLS) and the Common Type System (CTS).

1.1.10 The .NET Framework Class Library

The second most important piece of the .NET Framework is the .NET Framework class
library (FCL). As you've seen, the common language runtime handles the dirty work of actually
running the code you write. But to write the code, you need a foundation of available classes to
access the resources of the operating system, database server, or file server. The FCL is made up
of a hierarchy of namespaces that expose classes, structures, interfaces, enumerations, and
delegates that give you access to these resources.

The namespaces are logically defined by functionality. For example, the System.Data
namespace contains all the functionality available to accessing databases. This namespace is
further broken down into System.Data.SqlClient, which exposes functionality specific to SQL
Server, and System.Data.OleDb, which exposes specific functionality for accessing OLEDB data
sources. The bounds of a namespace aren't necessarily defined by specific assemblies within the
FCL; rather, they're focused on functionality and logical grouping. In total, there are more than
20,000 classes in the FCL, all logically grouped in a hierarchical manner. Figure 1.8 shows
where the FCL fits into the .NET Framework and the logical grouping of namespaces.

1.1.10.1.1 Figure 1.8. The .NET Framework class library.

To use an FCL class in your application, you use theImports statement in Visual
Basic .NET or theusing statement in C#. When you reference a namespace in Visual Basic .NET
or C#, you also get the convenience of auto-complete and auto-list members when you access the
objects' types using Visual Studio .NET. This makes it very easy to determine what types are
available for each class in the namespace you're using. As you'll see over the next several weeks,
it's very easy to start coding in Visual Studio .NET.

The Structure of a .NET Application

To understand how the common language runtime manages code execution, you must
examine the structure of a .NET application. The primary unit of a .NET application is the
assembly. An assembly is a self-describing collection of code, resources, and metadata.
The assembly manifest contains information about what is contained within the assembly.
The assembly manifest provides:

o Identity information, such as the assembly’s name and version number


o A list of all types exposed by the assembly
o A list of other assemblies required by the assembly
o A list of code access security instructions, including permissions required by the
assembly and permissions to be denied the assembly

Each assembly has one and only one assembly manifest, and it contains all the description
information for the assembly. However, the assembly manifest can be contained in its own file or
within one of the assembly’s modules.

An assembly contains one or more modules. A module contains the code that makes up
your application or library, and it contains metadata that describes that code. When you compile
a project into an assembly, your code is converted from high-level code to IL. Because all
managed code is first converted to IL code, applications written in different languages can easily
interact. For example, one developer might write an application in Visual C# that accesses a
DLL in Visual Basic .NET. Both resources will be converted to IL modules before being
executed, thus avoiding any language-incompatibility issues.

Each module also contains a number of types. Types are templates that describe a set of
data encapsulation and functionality. There are two kinds of types: reference types (classes) and
value types (structures). These types are discussed in greater detail in Lesson 2 of this chapter.
Each type is described to the common language runtime in the assembly manifest. A type can
contain fields, properties, and methods, each of which should be related to a common
functionality.

For example, you might have a class that represents a bank account. It contains fields,
properties, and methods related to the functions needed to implement a bank account. A field
represents storage of a particular type of data. One field might store the name of an account
holder, for example.
Properties are similar to fields, but properties usually provide some kind of validation
when data is set or retrieved. You might have a property that represents an account balance.

When an attempt is made to change the value, the property can check to see if the
attempted change is greater than a predetermined limit. If the value is greater than the limit, the
property does not allow the change. Methods represent behavior, such as actions taken on data
stored within the class or changes to the user interface. Continuing with the bank account
example, you might have a Transfer method that transfers a balance from a checking account to a
savings account, or an Alert method that warns users when their balances fall below a
predetermined level.

Compilation and Execution of a .NET Application

When you compile a .NET application, it is not compiled to binary machine code; rather,
it is converted to IL. This is the form that your deployed application takes—one or more
assemblies consisting of executable files and DLL files in IL form. At least one of these
assemblies will contain an executable file that has been designated as the entry point for the
application.

When execution of your program begins, the first assembly is loaded into memory. At
this point, the common language runtime examines the assembly manifest and determines the
requirements to run the program. It examines security permissions requested by the assembly and
compares them with the system’s security policy. If the system’s security policy does not allow
the requested permissions, the application will not run. If the application passes the system’s
security policy, the common language runtime executes the code. It creates a process for the
application to run in and begins application execution.

When execution starts, the first bit of code that needs to be executed is loaded into
memory and compiled into native binary code from IL by the common language runtime’s Just-
In-Time (JIT) compiler. Once compiled, the code is executed and stored in memory as native
code. Thus, each portion of code is compiled only once when an application executes. Whenever
program execution branches to code that has not yet run, the JIT compiler compiles it ahead of
execution and stores it in memory as binary code. This way, application performance is
maximized because only the parts of a program that are executed are compiled.

The .NET Framework base class library contains the base classes that provide many of
the services and objects you need when writing your applications. The class library is organized
into namespaces. A namespace is a logical grouping of types that perform related functions. For
example, the System.Windows.Forms namespace contains all the types that make up Windows
forms and the controls used in those forms.

Namespaces are logical groupings of related classes. The namespaces in the .NET base
class library are organized hierarchically. The root of the .NET Framework is the System
namespace. Other namespaces can be accessed with the period operator. A typical namespace
construction appears as follows:

System
System.Data
System.Data.SQLClient

The first example refers to the System namespace. The second refers to the System.Data
namespace. The third example refers to the System.Data.SQLClient namespace.

Table 1.1 introduces some of the more commonly used .NET base class namespaces.

Table 1-1.Representative .NET Namespaces

Namespace Description
This namespace is the root for many of the low-level types required
by the .NET Framework. It is the root for primitive data types as
System
well, and it is the root for all the other namespaces in the .NET base
class library.
System.Collections This namespace contains classes that represent a variety of different
container types, such as Array List, Sorted List, Queue, and Stack.
You also can find abstract classes, such as Collection Base, which are
Table 1-1.Representative .NET Namespaces

Namespace Description
useful for implementing your own collection functionality.
This namespace contains classes involved in component creation and
System.ComponentModel containment, such as attributes, type converters, and license
providers.
This namespace contains classes required for database access and
System.Data
manipulations, as well as additional namespaces used for data access.
This namespace contains a set of classes that are shared by the .NET
System.Data.Common
managed data providers.
This namespace contains classes that make up the managed data
System.Data.OleDb
provider for OLE DB data access.
This namespace contains classes that are optimized for interacting
System.Data.SQLClient
with Microsoft SQL Server.
This namespace exposes GDI+ functionality and provides classes that
System.Drawing
facilitate graphics rendering.
System.IO In this namespace, you will find types for handling file system I/O.
This namespace is home to common mathematics functions such as
System.Math
extracting roots and trigonometry.
This namespace provides support for obtaining information and
System.Reflection
dynamic creation of types at runtime.
This namespace is home to types dealing with permissions,
System.Security
cryptography, and code access security.
This namespace contains classes that facilitate the implementation of
System.Threading
multithreaded applications.
This namespace contains types involved in creating standard
System.Windows.Forms Windows applications. Classes that represent forms and controls
reside here as well.
The namespace names are self-descriptive by design. Straightforward names make
the .NET Framework easy to use and allow you to rapidly familiarize yourself with its contents.

Introduction to Object-Oriented Programming

Programming in the .NET Framework environment is done with objects. Objects are
programmatic constructs that represent packages of related data and functionality. Objects are
self-contained and expose specific functionality to the rest of the application environment
without detailing the inner workings of the object itself. Objects are created from a template
called a class. The .NET base class library provides a set of classes from which you can create
objects in your applications. You also can use the MicrosoftVisual Studio programming
environment to create your own classes. This lesson introduces you to the concepts associated
with object-oriented programming.

Objects, Members, and Abstraction

An object is a programmatic construct that represents something. In the real world,


objects are cars, bicycles, laptop computers, and so on. Each of these items exposes specific
functionality and has specific properties. In your application, an object might be a form, a control
such as a button, a database connection, or any of a number of other constructs. Each object is a
complete functional unit, and contains all of the data and exposes all of the functionality required
to fulfill its purpose. The ability of programmatic objects to represent real-world objects is called
abstraction.

Classes Are Templates for Objects

Classes were discussed in Chapter 1 and represent user-defined reference types. Classes
can be thought of as blueprints for objects: they define all of the members of an object, define the
behavior of an object, and set initial values for data when appropriate. When a class is
instantiated, an in-memory instance of that class is created. This instance is called an object. To
review, a class is instantiated using the New (new) keyword as follows:
Visual Basic .NET

' Declares a variable of the Widget type
Dim myWidget As Widget
' Instantiates a new Widget object and assigns it to the myWidget 
' variable
myWidget = New Widget()

When an instance of a class is created, a copy of the instance data defined by that class is
created in memory and assigned to the reference variable. Individual instances of a class are
independent of one another and represent separate programmatic constructs. There is generally
no limit to how many copies of a single class can be instantiated at any time. To use a real-world
analogy, if a car is an object, the plans for the car are the class. The plans can be used to make
any number of cars, and changes to a single car do not, for the most part, affect any other cars.

Objects and Members

Objects are composed of members. Members are properties, fields, methods, and events,
and they represent the data and functionality that comprise the object. Fields and properties
represent data members of an object. Methods are actions the object can perform, and events are
notifications an object receives from or sends to other objects when activity happens in the
application.
To continue with the real-world example of a car, consider that a Car object has fields
and properties, such as Color, Make, Model, Age, Gas Level, and so on. These are the data that
describe the state of the object. A Car object might also expose several methods, such as
Accelerate, Shift Gears, or Turn. The methods represent behaviors the object can execute. And
events represent notifications. For example, a Car object might receive an Engine Overheating
event from its Engine object, or it might raise a Crash event when interacting with a Tree object.

Object Models
Simple objects might consist of only a few properties, methods, and perhaps an event or
two. More complex objects might require numerous properties and methods and possibly even
subordinate objects. Objects can contain and expose other objects as members. For example, the
TextBox control exposes a Font property, which consists of a Font object. Similarly, every
instance of the Form class contains and exposes a Controls collection that comprises all of the
controls contained by the form. The object model defines the hierarchy of contained objects that
form the structure of an object.

An object model is a hierarchical organization of subordinate objects contained and


exposed within a main object. To illustrate, let’s revisit the example of a car as an object. A car is
a single object, but it also consists of subordinate objects. A Car object might contain an Engine
object, four Wheel objects, a Transmission object, and so on. The composition of these
subordinate objects directly affects how the Car object functions as a whole.

For example, if the Cylinders property of the Engine subordinate object is equal to 4, the
Car will behave differently than a Car whose Engine has a Cylinders property value of 8.
Contained objects can have subordinate objects of their own. For example, the contained Engine
object might contain several Sparkplug objects.

Encapsulation

Encapsulation is the concept that implementation of an object is independent of its


interface. Put another way, an application interacts with an object through its interface, which
consists of its public properties and methods. As long as this interface remains constant, the
application can continue to interact with the component, even if implementation of the interface
was completely rewritten between versions.

Objects should only interact with other objects through their public methods and
properties. Thus, objects should contain all of the data they require, as well as all of the
functionality that works with that data. The internal data of an object should never be exposed in
the interface; thus, fields rarely should be Public (public).

Returning to the Car example. If a Car object interacts with a Driver object, the Car
interface might consist of a GoForward method, a Go Backward method, and a Stop method.
This is all the information that the Driver needs to interact with the Car. The Car might contain
an Engine object, for example, but the Driver doesn’t need to know about the Engine object—the
entire Driver cares about is that the methods can be called and that they return the appropriate
values. Thus, if one Engine object is exchanged for another, it makes no difference to the Driver
as long as the interface continues to function correctly.

Polymorphism

Polymorphism is the ability of different classes to provide different implementations of


the same public interfaces. In other words, polymorphism allows methods and properties of an
object to be called without regard for the particular implementation of those members. For
example, a Driver object can interact with a Car object through the Car public interface.

If another object, such as a Truck object or a SportsCar object, exposes the same public
interface, the Driver object can interact with them without regard to the specific implementation
of that interface. There are two principal ways through which polymorphism can be provided:
interface polymorphism and inheritance polymorphism.

Interface Polymorphism

An interface is a contract for behavior. Essentially, it defines the members a class should
implement, but states nothing at all about the details of that implementation. An object can
implement many different interfaces, and many diverse classes can implement the same
interface. All objects implementing the same interface are capable of interacting with other
objects through that interface. For example, the Car object in the previous examples might
implement the IDrivable interface (by convention, interfaces usually begin with I), which
specifies the Go Forward, Go Backward, and Halt methods. Other classes, such as Truck,
Forklift, or Boat might implement this interface and thus are able to interact with the Driver
object. The Driver object is unaware of which interface implementation it is interacting with; it is
only aware of the interface itself. Interface polymorphism is discussed in detail in Lesson 3.

Inheritance Polymorphism

Inheritance allows you to incorporate the functionality of a previously defined class into a
new class and implement different members as needed. A class that inherits another class is said
to derive from that class, or to inherit from that class. A class can directly inherit from only one
class, which is called the base class. The new class has the same members as the base class, and
additional members can be added as needed. Additionally, the implementation of base members
can be changed in the new class by overriding the base class implementation.

Inherited classes retain all the characteristics of the base class and can interact with other
objects as though they were instances of the base class. For example, if the Car class is the base
class, a derived class might be Sports Car. The Sports Car class might be the base class for
another derived class, the Convertible Sports Car. Each newly derived class might implement
additional members, but the functionality defined in the original Car class is retained.

Overview of ADO.NET

Most applications require some kind of data access. Desktop applications need to
integrate with central databases, Extensible Markup Language (XML) data stores, or local
desktop databases. ADO.NET data-access technology allows simple, powerful data access while
maximizing system resource usage.

Different applications have different requirements for data access. Whether your
application simply displays the contents of a table, or processes and updates data to a central
SQL server, ADO.NET provides the tools to implement data access easily and efficiently.

Disconnected Database Access

Previous data-access technologies provided continuously connected data access by


default. In such a model, an application creates a connection to a database and keeps the
connection open for the life of the application, or at least for the amount of time that data is
required. However, as applications become more complex and databases serve more and more
clients, connected data access is impractical for a variety of reasons, including the following:

o Open database connections are expensive in terms of system resources. The more open
connections there are, the less efficient system performance becomes.
o Applications with connected data access are difficult to scale. An application that can
comfortably maintain connections with two clients might do poorly with 10 and be
completely unusable with 100.
o Open database connections can quickly consume all available database licenses, which
can be a significant expense. In order to work within a limited set of client licenses,
connections must be reused whenever possible.

ADO.NET addresses these issues by implementing a disconnected data access model by


default. In this model, data connections are established and left open only long

enough to perform the requisite action. For example, if an application requests data from a
database, the connection opens just long enough to load the data into the application, and then it
closes. Likewise, if a database is updated, the connection opens to execute the UPDATE
command, and then closes again. By keeping connections open only for the minimum required
time, ADO.NET conserves system resources and allows data access to scale up with a minimal
impact on performance.

ADO.NET Data Architecture

Data access in ADO.NET relies on two entities: the Data Set, which stores data on the
local machine, and the Data Provider, a set of components that mediates interaction between the
program and the database.

The Data Set

The Data Set is a disconnected, in-memory representation of data. It can be thought of as


a local copy of the relevant portions of a database. Data can be loaded into a Data Set from any
valid data source, such as a SQL Server database, a Microsoft Access database, or an XML file.
The Data Set persists in memory, and the data therein can be manipulated and updated
independent of the database. When appropriate, the Data Set can then act as a template for
updating the central database.

The DataSet object contains a collection of zero or more DataTable objects, each of
which is an in-memory representation of a single table. The structure of a particular DataTable is
defined by the DataColumns collection, which enumerates the columns in a particular table, and
the Constraint collection, which enumerates any constraints on the table. Together, these two
collections make up the table schema. A DataTable also contains a DataRows collection, which
contains the actual data in the DataSet.

The DataSet contains a DataRelations collection. A DataRelation object allows you to


create associations between rows in one table and rows in another table. The DataRelations
collection enumerates a set of DataRelation objects that define the relationships between tables
in the DataSet. For example, consider a DataSet that contains two related tables: an Employees
table and a Projects table. In the Employees table, each employee is represented only once and is
identified by a unique EmployeeID field. In the Projects table, an employee in charge of a project
is identified by the EmployeeID field, but can appear more than once if that employee is in
charge of multiple projects. This is an example of a one-to-many relationship; you would use a
DataRelation object to define this relationship. Additionally, a DataSet contains an Extended
Properties collection, which is used to store custom information about the DataSet

The Data Provider

The link to the database is created and maintained by a data provider. A data provider is not a
single component; rather it is a set of related components that work together to provide data in an
efficient, performance-driven manner. The first version of the Microsoft .NET Framework
shipped with two data providers: the SQL Server .NET Data Provider, designed specifically to
work with SQL Server 7 or later, and the OleDb .NET Data Provider, which connects with other
types of databases. Microsoft Visual Studio .NET 2003 added two more data providers: the
ODBC Data Provider and the Oracle Data Provider. Each data provider consists of versions of
the following generic component classes:

o The Connection object provides the connection to the database.


o The Command object executes a command against a data source. It can execute non-
query commands, such as INSERT, UPDATE, or DELETE, or return a DataReader with
the results of a SELECT command.
o The DataReader object provides a forward-only, read-only, connected recordset.
o The DataAdapter object populates a disconnected DataSet or DataTable with data and
performs updates.
Data access in ADO.NET is facilitated as follows: a Connection object establishes a
connection between the application and the database. This connection can be accessed directly
by a Command object or by a DataAdapter object.

The Command object provides direct execution of a command to the database. If the
command returns more than a single value, the Command object returns a DataReader to provide
the data. This data can be directly processed by application logic. Alternatively, you can use the
DataAdapter to fill a DataSet object. Updates to the database can be achieved through the
Command object or through the DataAdapter. The generic classes that make up the data
providers are summarized in the following sections.

The Connection Object

The Connection object represents the actual connection to the database. Visual
Studio .NET 2003 supplies two types of Connection classes: the SqlConnection object, which is
designed specifically to connect to SQL Server 7 or later, and the OleDbConnection object,
which can provide connections to a wide range of database types.

Visual Studio .NET 2003 further provides a multipurpose ODBCConnection class, as


well as an Oracle Connection class optimized for connecting to Oracle databases. The
Connection object contains all of the information required to open a channel to the database in
the ConnectionString property. The Connection object also incorporates methods that facilitate
data transactions.

The Command Object

The Command object is represented by two corresponding classes, SqlCommand and


OleDbCommand. You can use Command objects to execute commands to a database across a
data connection. Command objects can be used to execute stored procedures on the database and
SQL commands, or return complete tables.

Command objects provide three methods that are used to execute commands on the
database:
 ExecuteNonQuery.
o Executes commands that return no records, such as INSERT, UPDATE, or
DELETE
 ExecuteScalar.
o Returns a single value from a database query
 ExecuteReader.
o Returns a result set by way of a DataReader object

The DataReader Object

The DataReader object provides a forward-only, read-only, connected stream recordset


from a database. Unlike other components of a data provider, DataReader objects cannot be
directly instantiated. Rather, the DataReader is returned as the result of a Command object’s
ExecuteReader method. The SqlCommand. ExecuteReader method returns a SqlDataReader
object, and the OleDbCommand. ExecuteReader method returns an OleDbDataReader object.

Likewise, the ODBC and Oracle Command. ExecuteReader methods return a DataReader
specific to the ODBC and Oracle Data Providers respectively. The DataReader can supply rows
of data directly to application logic when you do not need to keep the data cached in memory.
Because only one row is in memory at a time, the DataReader provides the lowest overhead in
terms of system performance, but it requires exclusive use of an open Connection object for the
lifetime of the DataReader.

The DataAdapter Object

The DataAdapter is the class at the core of ADO.NET disconnected data access. It is
essentially the middleman, facilitating all communication between the database and a DataSet.
The DataAdapter fills a DataTable or DataSet with data from the database whenever the Fill
method is called. After the memory-resident data has been manipulated, the DataAdapter can
transmit changes to the database by calling the Update method.

The DataAdapter provides four properties that represent database commands. The four
properties are:
o Select Command.
Contains the command text or object that selects the data from the database. This
command is executed when the Fill method is called and fills a DataTable or a
DataSet.
o Insert Command.
Contains the command text or object that inserts a row into a table.
o Delete Command.
Contains the command text or object that deletes a row from a table.
o Update Command.
Contains the command text or object that updates the values of a database.

When the Update method is called, changes in the DataSet are copied back to the database, and
the appropriate Insert Command, Delete Command, or Update Command is executed.
Accessing Data

Visual Studio .NET has many built-in wizards and designers to help you shape your data-
access architecture rapidly and efficiently. With minimal actual coding, you can implement
robust data access for your application. However, the ADO.NET object model is fully available
through code to implement customized features or to fine-tune your program. In this lesson, you
will learn how to connect to a database with ADO.NET and retrieve data to your application.
You will learn to use the visual designers provided by Visual Studio .NET and direct code
access.

Microsoft Visual Basic.Net

With its release for the .NET platform, the Visual Basic language has undergone dramatic
changes.

For example:

o The language itself is now fully object-oriented.


o Applications and components written in Visual Basic .NET have full access to the
.NET Framework, an extensive class library that provides system and application
services.
o All applications developed using Visual Basic .NET run within a managed
runtime environment, the .NET common language runtime.

Visual Basic .NET is the next generation of Visual Basic, but it is also a significant
departure from previous generations. Experienced Visual Basic 6 developers will feel
comfortable with Visual Basic .NET code and will recognize most of its constructs. However,
Microsoft has made some changes to make Visual Basic .NET a better language and an equal
player in the .NET world.

These include such additions as a Class keyword for defining classes and an Inherits
keyword for object inheritance, among others. Visual Basic 6 code can't be compiled by the
Visual Basic .NET compiler without significant modification. The good news is that Microsoft
has provided a migration tool to handle the task.

FEATURES OF SQL SERVER 2000

Microsoft SQL server lets you quickly build powerful and reliable database applications.
SQL server 7.0 highly scalable, fully relational, high performance, multi-user database server.
That can be used by enterprise of any size to manage large amount of data for client\server
applications.

The major new and improved features of SQL server 7.0 include the multi-user support
Multi platform support, added memory support, scalability, integration with MMC, Microsoft
Management console and improved multiple server management. Parallel database backup and
restore. Data replication, Data warehousing distributed queries, distributed transactions,
Dynamic cocking Internet Access, Integrated windows security, Mail integration Microsoft
English Query, ODBC Support.

SQL Server management is accomplished through a set of component applications. SQL


Server introduces a number of new and improved management tools that are SQL Server
Enterprise management, profiles, and Query Analyzer service manager wizards.
The OLAP Services feature available in SQL Server version 7.0 is now called SQL
Server 2000 Analysis Services. The term OLAP Services has been replaced with the term
Analysis Services. Analysis Services also includes a new data mining component. The
Repository component available in SQL Server version 7.0 is now called Microsoft SQL Server
2000 Meta Data Services. References to the component now use the term Meta Data Services.
The term repository is used only in reference to the repository engine within Meta Data Services

SQL-SERVER database consist of six type of objects,

They are,

1. TABLE

2. QUERY

3. FORM

4. REPORT

5. MACRO

TABLE:

A database is a collection of data about a specific topic.

VIEWS OF TABLE:

We can work with a table in two types,

1. Design View

2. Datasheet View

Design View

To build or modify the structure of a table we work in the table design view. We can
specify what kind of data will be hold.

Datasheet View

To add, edit or analyses the data itself we work in tables datasheet view mode.
QUERY:

A query is a question that has to be asked the data. Access gathers data that answers the
question from one or more table. The data that make up the answer is either dynaset (if you
edit it) or a snapshot(it cannot be edited).Each time we run query, we get latest information in
the dynaset.Access either displays the dynaset or snapshot for us to view or perform an action
on it ,such as deleting or updating.

FORMS:

A form is used to view and edit information in the database record by record .A form
displays only the information we want to see in the way we want to see it. Forms use the
familiar controls such as textboxes and checkboxes. This makes viewing and entering data
easy.

Views of Form:

We can work with forms in several primarily there are two views,

They are,

1. Design View

2. Form View

Design View

To build or modify the structure of a form, we work in forms design view. We can add
control to the form that are bound to fields in a table or query, includes textboxes, option
buttons, graphs and pictures.

Form View

The form view which display the whole design of the form.

REPORT:

A report is used to vies and print information from the database. The report can ground
records into many levels and compute totals and average by checking values from many
records at once. Also the report is attractive and distinctive because we have control over the
size and appearance of it.

MACRO:

A macro is a set of actions. Each action in macros does something. Such as opening a form or
printing a report .We write macros to automate the common tasks the work easy and save the
time.

SYSTEM DESIGN :

INPUT DESIGN
Input design is the process of converting user-originated inputs to a computer-
based format to the application forms. Input design is one of the most expensive phases of the
operation of computerized system and is often the major problem of a system.

Input design forms are:

o Registration
o Login
o Employee leave
o Salary Report

OUTPUT DESIGN

Output design generally refers to the results and information that are generated by
the system for many end-users; output is the main reason for developing the system and the basis
on which they evaluate the usefulness of the application. The output is designed in such a way
that it is attractive, convenient and informative. Forms are designed in C#.NET with various
features, which make the console output more pleasing.
As the outputs are the most important sources of information to the users, better
design should improve the system’s relationships with us and also will help in decision-making.
Form design elaborates the way output is presented and the layout available for capturing
information.
Output design forms are:

o View files
o View Reporter
o Print Salary Report

DATABASE DESIGN
The database design is a must for any application developed especially more for the data
store projects. Since the chatting method involves storing the message in the table and produced
to the sender and receiver, proper handling of the table is a must. In the project, login table is
designed to be unique in accepting the username and the length of the username and password
should be greater than zero. Both the company and seeker username are stored in the same table
with different flag values.
The job and question table is common to all companies. Likewise job apply details are
stored in the common ‘apply’ table. The different users view the data in different format
according to the privileges given. The complete listing of the tables and their fields are provided
in the annexure under the title ‘Table Structure’.

TESTING AND IMPLEMENTATION

System Implementation:
Implementation is the most crucial stage in achieving a successful system
and giving the user’s confidence that the new system is workable and effective. Implementation
of a modified application to replace an existing one. This type of conversation is relatively easy
to handle, provide there are no major changes in the system.
Each program is tested individually at the time of development using the data and
has verified that this program linked together in the way specified in the programs specification,
the computer system and its environment is tested to the satisfaction of the user. The system that
has been developed is accepted and proved to be satisfactory for the user. And so the system is
going to be implemented very soon. A simple operating procedure is included so that the user
can understand the different functions clearly and quickly.
Initially as a first step the executable form of the application is to be created and
loaded in the common server machine which is accessible to all the user and the server is to be
connected to a network. The final stage is to document the entire system which provides
components and the operating procedures of the system.

Testing:

System Testing:
Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to show
that the system will operate successfully in all its aspects conditions. The procedure level testing
is made first. By giving improper inputs, the errors occurred are noted and eliminated. Thus the
system testing is a confirmation that all is correct and an opportunity to show the user that the
system works. The final step involves Validation testing, which determines whether the software
function as the user expected. The end-user rather than the system developer conduct this test
most software developers as a process called “Alpha and Beta test” to uncover that only the end
user seems able to find.

This is the final step in system life cycle. Here we implement the tested error-free system
into real-life environment and make necessary changes, which runs in an online fashion. Here
system maintenance is done every months or year based on company policies, and is checked for
errors like runtime errors, long run errors and other maintenances like table verification and
reports.

Unit Testing:

Unit testing verification efforts on the smallest unit of software design, module. This is
known as “Module Testing”. The modules are tested separately. This testing is carried out during
programming stage itself. In these testing steps, each module is found to be working
satisfactorily as regard to the expected output from the module.

Integration Testing:

Integration testing is a systematic technique for constructing tests to uncover error


associated within the interface. In the project, all the modules are combined and then the entire
programmer is tested as a whole. In the integration-testing step, all the error uncovered is
corrected for the next testing steps.

Validation Testing:

To uncover functional errors, that is, to check whether functional characteristics confirm to
specification or not specified.

SYSTEM MAINTENANCE
The objectives of this maintenance work are to make sure that the system gets into work all time
without any bug. Provision must be for environmental changes which may affect the computer or
software system. This is called the maintenance of the system. Nowadays there is the rapid
change in the software world. Due to this rapid change, the system should be capable of adapting
these changes. In our project the process can be added without affecting other parts of the
system.

Maintenance plays a vital role. The system liable to accept any modification after its
implementation. This system has been designed to favor all new changes. Doing this will not
affect the system’s performance or its accuracy.

In the project system testing is made as follows:

The procedure level testing is made first. By giving improper inputs, the errors
occurred are noted and eliminated. Then the web form level testing is made. For example storage
of data to the table in the correct manner.
In the form, the zero length username and password are given and checked. Also the
duplicate username is given and checked. The client side validations are made.
The dates are entered in wrong manner and checked. Wrong email-id is given and
checked.
This is the final step in system life cycle. Here we implement the tested error-free system
into real-life environment and make necessary changes, which runs in an online fashion. Here
system maintenance is done every months or year based on company policies, and is checked for
errors like runtime errors, long run errors and other maintenances like table verification and
reports.
Implementation is the stage of the project when the theoretical design is turned out into
a working system. Thus it can be considered to be the most critical stage in achieving a
successful new system and in giving the user, confidence that the new system will work and be
effective.
The implementation stage involves careful planning, investigation of the existing system
and it’s constraints on implementation, designing of methods to achieve changeover and
evaluation of changeover methods.
Implementation is the process of converting a new system design into operation. It is the
phase that focuses on user training, site preparation and file conversion for installing a candidate
system. The important factor that should be considered here is that the conversion should not
disrupt the functioning of the organization.

ABOUT THE SOFTWARE

WHAT IS “.NET”?

Microsoft .net is a set of micro soft software technologies for rapidly building and
integrating xml web services, micro soft windows-based applications, and web solutions.
The .net framework is a language-neutral platform for writing programs that can easily and
securely interoperate. There’s no language barrier with .net: there are numerous languages
available to the developer including managed c++, c#, visual basic and java script.
The .net framework provides the foundation for components to interact seamlessly,
whether locally or remotely on different platforms. It standardizes common data types and
communications protocols so that components created in different languages can easily
interoperate. “.net” is also the collective name given to various software components built upon
the .net platform. These will be both products (visual studio.net and windows.net server, for
instance) and services (like passport, .net my services, and so on).

THE .NET FRAMEWORK

Microsoft designed C# from the ground up to take advantage of its new .NET
Framework. Because C# is a player in this new .NET world, you should have a good
understanding of what the .NET Framework provides and how it increases your productivity.

The .NET Framework is made up of four parts, as shown in the Common Language
Runtime, a set of class libraries, a set of programming languages, and the ASP.NET
environment. The .NET Framework was designed with three goals in mind. First, it was intended
to make Windows applications much more reliable, while also providing an application with a
greater degree of security. Second, it was intended to simplify the development of Web
applications and services that not only work in the traditional sense, but on mobile devices as
well. Lastly, the framework was designed to provide a single set of libraries that would work
with multiple languages. The following sections examine each of the .NET Framework
components.

WEB DEVELOPMENT:

The .NET Framework was designed with one thing in mind: to fuel Internet development.
This new fuel to add to Internet development is called Web Services. You can think of Web
Services as a Web site that interacts with programs, rather than people. Instead of delivering
Web pages, a Web Service takes a request formatted as XML, performs a particular function, and
then returns a response to the requester as an XML message.

Note XML or eXtensible Markup Language is a self describing language much like that
of HTML. XML on the other hand has no predefined tags thus allowing it great flexibility in
representing a wide variety of objects.

A typical application for a Web Service would be to sit as a layer on top of a corporate billing
system. When a user surfing the Web purchases products from your Internet site, the purchase
information is then sent to the Web Services, which totals all the products, adds a record to the
accounts receivable database, and then returns a response with an order confirmation number.
Not only can this Web Service interact with Web pages, it can interact with other Web Services,
such as a corporate accounts payable system.

In order for the Web Service model to survive the natural evolution of programming
languages, it must include much more than a simple interface to the Web. The Web service
model also includes protocols that enable applications to find Web Services available across a
LAN or the Internet. This protocol also enables the application to explore the Web Service and
determine how to communicate with it, as well as how to exchange information. To enable Web
Service discovery, the Universal Discovery, Description and Integration (UDDI) was
established. This allows Web Services to be registered and searched, based on key information
such as company name, type of service, and geographic location.

APPLICATION DEVELOPMENT
Aside from Web development, you can still build traditional Windows applications with
the .NET Framework. Windows applications created with the .NET Framework are based upon
Windows Forms. These Windows Forms are somewhat of a crossbreed between Visual Basic 6
forms and the forms of Visual C++. Though forms look the same as their predecessors, they are
completely object-oriented and class-based, much like form objects in the Microsoft Foundation
Class. These new Windows Forms now support many classic controls found in Visual Studio,
such as the Button, TextBox, and Label, as well as ActiveX controls. Aside from the traditional
controls, new components such as PrintPreview, LinkLabel, ColorDialog, and OpenFileDialog
are also supported.

Building applications with .NET also provides you with many enhancements not found
in other languages, such as security. These security measures can determine whether an
application can write or read a disk file. They also enable you to embed digital signatures into
the application to ensure that the application was written by a trusted source. The .NET
Framework also enables you to embed component information, and version information, within
the actual code. This makes it possible for software to install on demand, automatically, or with
no user intervention at all. Together, all of these features greatly reduce support costs within the
enterprise.

COMMON LANGUAGE RUNTIME

Programming languages usually consist of both a compiler and a runtime environment. The
compiler turns the code that you write into executable code that can be run by users. The runtime
environment provides a set of operating system services to your executable code. These services
are built into a runtime layer so that your code does not need to worry about the low-level details
of working with the operating system. Operations such as memory management and file I/O are
good examples of services that might be provided by a runtime environment. Before .NET came
along, each language shipped with its own runtime environment. Visual Basic shipped with a
runtime called MSVBVM60.DLL. Visual C++ shipped with a DLL called MSVCRT.DLL. Each
of these runtime modules provided a set of low-level services to code that developers wrote.
Developers would write code and then build that code with the appropriate runtime in mind. The
executable code would ship with the runtime, which would be installed on a user's machine if it
weren't already present.

The main problem with these runtime environments is that they were designed for use
with a single language. The Visual Basic runtime provided nice features for operations like
working with memory and launching COM objects, but these features were only available to
Visual Basic users. Developers using Visual C++ could not use the features of the Visual Basic
runtime. Visual C++ users had their own runtime, with its own long list of features, but those
features were unavailable to Visual Basic users. This "separate runtime" approach prevented
languages from working together seamlessly.

It's not possible, for example, to grab some memory in a piece of Visual Basic code and
then hand it off to a piece of Visual C++ code, which frees the memory. The different runtimes
implement their own feature set in their own way. The feature sets of the various runtimes are
inconsistent. Even features that are found in more than one runtime are implemented in different
ways, making it impossible for two pieces of code written in different languages to work
together.

One of the design goals of the .NET Framework was to unify the runtime engines so that
all developers could work with a single set of runtime services. The .NET Framework's solution
is called the Common Language Runtime (CLR). The CLR provides capabilities such as memory
management, security, and robust error-handling to any language that works with the .NET
Framework. Thanks to the CLR, all .NET languages can use a variety of runtime services
without developers worrying about whether their particular language supports a runtime feature.
The CLR also enables languages to interoperate with one another. Memory can be
allocated by code written in one language — Visual Basic .NET, for instance — and can be freed
by code written in another language, say, C#. Similarly, errors can be raised in one language and
processed in another language.

.NET CLASS LIBRARIES


Developers like to work with code that has already been tested and shown to work, such
as the Win32 API and the MFC Class libraries. Code re-use has long been the goal of the
software development community. However, the practicality of code re-use has not lived up to
expectations. Many languages have had access to bodies of pre-tested, ready-to-run code. Visual
C++ has benefited from class libraries such as the Microsoft Foundation Classes (MFC), which
enabled C++ developers to build Windows applications quickly, and the Active Template
Library (ATL), which provided support for building COM objects. However, the language
specific nature of these libraries has made them unavailable for use in other languages.

Visual Basic developers are locked out of using ATL when building their COM objects.
The .NET Framework provides many classes that help developers re-use code. The .NET class
libraries contain code for programming topics such as threading, file I/O, database support, XML
parsing, and data structures, such as stacks and queues. Best of all, this entire class library is
available to any programming language that supports the .NET Framework. Thanks to the CLR,
any .NET language can use any class in the .NET class library. Because all languages now
support the same runtime, they can re-use any class that works with the .NET Framework. This
means that any functionality available to one language will also be available to any other .NET
language.

The class library re-use picture painted by the .NET Framework gets even better when
you realize that re-use extends to your code, not just code that Microsoft ships with .NET. The
code that Microsoft ships in the .NET class library code base is architecturally no different from
the code you write. The Microsoft code is simply code that was written using a language
supported by .NET and built using a .NET development tool. This means that Microsoft is using
the same tools that you will use to write your code. You can write code that can be used in
other .NET languages, just as Microsoft has with its class library. The .NET Framework enables
you to write code in C#, for example, and hand it off to Visual Basic .NET developers, who can
use your compiled code in their applications.

.NET Programming Language


The .NET Framework provides a set of tools that help you build code that works with the
.NET Framework. Microsoft provides a set of languages that are already ".NET-compatible". C#
is one of those languages. New versions of Visual Basic and Visual C++ have also been created
to take advantage of the .NET Framework, with a version of Jscript.NET on the way. The
development of .NET-compatible languages is not restricted to Microsoft. The .NET group at
Microsoft has published documentation showing how language vendors can make their
languages work with .NET, and vendors are making languages such as COBOL and Perl
compatible with the .NET Framework. There are currently 20 or more languages in the works
from third party vendors and institutions that plug into the .NET Framework.

Introducing C#
C#, the new language introduced in the .NET Framework, is derived from C++.
However, C# is a modern, objected-oriented (from the ground up) type-safe language.

Language features
The following sections take a quick look at some of the features of the C# language. If
some of these concepts don't sound familiar to you, don't worry. All of them are covered in detail
in later chapters.

Classes
All code and data in C# must be enclosed in a class. You can't define a variable outside of
a class, and you can't write any code that's not in a class. Classes can have constructors, which
execute when an object of the class is created, and a destructor, which executes when an object
of the class is destroyed. Classes support single inheritance, and all classes ultimately derive
from a base class called object. C# supports versioning techniques to help your classes evolve
over time while maintaining compatibility with code that uses earlier versions of your classes.
Data types
C# lets you work with two types of data: value types and reference types. Value types
hold actual values. Reference types hold references to values stored elsewhere in memory.
Primitive types such as char, int and float, as well as enumerated values and structures, are value
types. Reference types hold variables that deal with objects and arrays. C# comes with
predefined reference types (object and string), as well as predefined value types (sbyte, short, int,
long, byte, ushort, uint, ulong, float, double, bool, char, and decimal). You can also define your
own value and reference types in your code. All value and reference types ultimately derive from
a base type called object.

C# allows you to convert a value of one type into a value of another type. You can work
with both implicit conversions and explicit conversions. Implicit conversions always succeed and
don't lose any information (for example, you can convert an int to a long without losing any data
because a long is larger than an int). Explicit conversions may cause you to lose data (for
example, converting a long into an int may result in a loss of data because a long can hold larger
values than an int). You must write a cast operator into your code to make an explicit conversion
happen.

You can work with both one-dimensional and multidimensional arrays in C#.
Multidimensional arrays can be rectangular, in which each of the arrays has the same
dimensions, or jagged, in which each of the arrays has different dimensions. Classes and
structures can have data members called properties and fields. Fields are variables that are
associated with the enclosing class or structure. You may define a structure called Employee, for
example, that has a field called Name. If you define a variable of type Employee called
CurrentEmployee, you can retrieve the employee's name by writing CurrentEmployee.Name.
Properties are like fields, but enable you to write code to specify what should happen when code
accesses the value. If the employee's name must be read from a database, for example, you can
write code that says, "when someone asks for the value of the Name property, read the name
from the database and return the name as a string."
Functions
A function is a callable piece of code that may or may not return a value to the code that
originally called it. An example of a function would be the FullName function shown earlier, in
this chapter, in the Family class. A function is generally associated to pieces of code that return
information whereas a method generally does not return information. For our purposes however,
we generalize and refer to them both as functions. Functions can have four kinds of parameters:
• Input parameters have values that are sent into the function, but the function cannot change
those values.
• Output parameters have no value when they are sent into the function, but the function
can give them a value and send the value back to the caller.
• Reference parameters pass in a reference to another value. They have a value coming
in to the function, and that value can be changed inside the function.
• Params parameters define a variable number of arguments in a list.

C# and the CLR work together to provide automatic memory management. You don't
need to write code that says "allocate enough memory for an integer" or "free the memory that
this object was using." The CLR monitors your memory usage and automatically retrieves more
when you need it. It also frees memory automatically when it detects that it is no longer being
used (this is also known as Garbage Collection). C# provides a variety of operators that enable
you to write mathematical and bitwise expressions. Many (but not all) of these operators can be
redefined, enabling you to change how the operators work.

C# supports a long list of statements that enable you to define various execution paths
within your code. Flow control statements that use keywords such as if, switch, while, for, break
and continue enable your code to branch off into different paths, depending on the values of your
variables. Classes can contain code and data. Each class member has something called an
accessibility scope, which defines the member's visibility to other objects. C# supports public,
protected, internal, protected internal, and private accessibility scopes.

Variables
Variables can be defined as constants. Constants have values that cannot change during
the execution of your code. The value of pi, for instance, is a good example of a constant,
because its value won't be changing as your code runs. Enum type declarations specify a type
name for a related group of constants. For example, you could define an enum of Planets with
values of Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto, and use
those names in your code. Using the enum names in code makes code more readable than if you
used a number to represent each planet.

C# provides a built-in mechanism for defining and handling events. If you write a class
that performs a lengthy operation, you may want to invoke an event when the operation is
completed. Clients can subscribe to that event and catch the event in their code, which enables
them to be notified when you have completed your lengthy operation. The event handling
mechanism in C# uses delegates, which are variables that reference a function. Note An event
handler is a procedure in your code that determines the actions to be performed when an event
occurs, such as the user clicking a button.

If your class holds a set of values, clients may want to access the values as if your class
were an array. You can write a piece of code called an indexer to enable your class to be
accessed as if it were an array. Suppose you write a class called Rainbow, for example, that
contains a set of the colors in the rainbow. Callers may want to write MyRainbow[0] to retrieve
the first color in the rainbow. You can write an indexer into your Rainbow class to define what
should be returned when the caller accesses your class, as if it were an array of values.

Interfaces
C# supports interfaces, which are groups of properties, methods, and events that specify a
set of functionality. C# classes can implement interfaces, which tells users that the class supports
the set of functionality documented by the interface. You can develop implementations of
interfaces without interfering with any existing code, which minimizes compatibility problems.
nce an interface has been published, it cannot be changed, but it can evolve through inheritance.
C# classes can implement many interfaces, although the classes can only inherit from a
single base class.Let's look at a real-world example that would benefit from interfaces to
illustrate its extremely positive role in C#. Many applications available today support add-ins.
Assume that you have created a code editor for writing applications. This code editor, when
executed, has the capability to load add-ins. To do this, the add-in must follow a few rules. The
DLL add-in must export a function called CEEntry, and the name of the DLL must begin with
CEd. When we run our code editor, it scans its working directory for all DLLs that begin with
CEd. When it finds one, it is loaded; and then it uses the GetProcAddress to locate the CEEntry
functionwithin the DLL, thus verifying that you followed all the rules necessary to create an add-
in.

This method of creating and loading add-ins is very burdensome because it burdens the
code editor with more verification duties than necessary. If an interface were used in this
instance, your add-in DLL could have implemented an interface, thus guaranteeing that all
necessary methods, properties, and events were present with the DLL itself, and functioning as
documentation specified.

Attributes
Attributes declare additional information about your class to the CLR. In the past, if you
wanted to make your class self-describing, you had to take a disconnected approach in which the
documentation was stored in external files such as IDL or even HTML files. Attributes solve this
problem by enabling you, the developer, to bind information to classes — any kind of
information. For example, you can use an attribute to embed documentation information into a
class. Attributes can also be used to bind runtime information to a class, defining how it should
act when used. The possibilities are endless, which is why Microsoft includes many predefined
attributes within the .NET Framework.

Compiling C#
Running your C# code through the C# compiler produces two important pieces of
information: code and metadata. The following sections describe these two items and then finish
up by examining the binary building block of .NET code: the assembly.
Microsoft Intermediate Language (MSIL)

The code that is output by the C# compiler is written in a language called Microsoft
Intermediate Language, or MSIL. MSIL is made up of a specific set of instructions that specify
how your code should be executed. It contains instructions for operations such as variable
initialization, calling object methods, and error handling, just to name a few. C# is not the only
language in which source code changes into MSIL during the compilation process. All .NET-
compatible languages, including Visual Basic .NET and Managed C++, produce MSIL when
their source code is compiled. Because all of the .NET languages compile to the same MSIL
instruction set, and because all of the .NET languages use the same runtime, code from different
languages and different compilers can work together easily.

MSIL is not a specific instruction set for a physical CPU. It knows nothing about the
CPU in your machine, and your machine knows nothing about MSIL. How, then, does
your .NET code run at all, if your CPU can't read MSIL? The answer is that the MSIL code is
turned into CPU-specific code when the code is run for the first time. This process is called "just-
in-time" compilation, or JIT. The job of a JIT compiler is to translate your generic MSIL code
into
machine code that can be executed by your CPU. You may be wondering about what seems like
an extra step in the process. Why generate MSIL when a compiler could generate CPU-specific
code directly? After all, compilers have always done this in the past.

There are a couple of reasons for this. First, MSIL enables your compiled code to be
easily moved to different hardware. Suppose you've written some C# code and you'd like it to
run on both your desktop and a handheld device. It's very likely that those two devices have
different types of CPUs. If you only had a C# compiler that targeted a specific CPU, then you'd
need two C# compilers: one that targeted your desktop CPU and another that targeted your
handheld CPU. You'd have to compile your code twice, ensuring that you put the right code on
the right device. With MSIL, you compile once. Installing the .NET Framework on your desktop
machine includes a JIT compiler that translates your MSIL into CPU-specific code for your
desktop.
Installing the .NET Framework on your handheld includes a JIT compiler that translates
that same MSIL into CPU-specific code for your handheld. You now have a single MSIL code
base that can run on any device that has a .NET JIT compiler. The JIT compiler on that device
takes care of making your code run on the device.

Another reason for the compiler's use of MSIL is that the instruction set can be easily
read by a verification process. Part of the job of the JIT compiler is to verify your code to ensure
that it is as clean as possible. The verification process ensures that your code is accessing
memory properly and that it is using the correct variable types when calling methods that expect
a specific type. These checks ensure that your code doesn't execute any instructions that could
make the code crash.

The MSIL instruction set was designed to make this verification process relatively
straightforward. CPU-specific instruction sets are optimized for quick execution of the code, but
they produce code that can be hard to read and, therefore, hard to verify. Having a C# compiler
that directly outputs CPU-specific code can make code verification difficult or even impossible.
Allowing the .NET Framework JIT compiler to verify your code ensures that your code accesses
memory in a bug-free way and that variable types are properly used.

Metadata
The compilation process also outputs metadata, which is an important piece of the .NET
codesharing story. Whether you use C# to build an end-user application or you use C# to build a
class library to be used by someone else's application, you're going to want to make use of some
already-compiled .NET code. That code may be supplied by Microsoft as a part of the .NET
Framework, or it may be supplied by a user over the Internet. The key to using this external code
is letting the C# compiler know what classes and variables are in the other code base so that it
can match up the source code you write with the code found in the precompiled code base that
you're working with.

Think of metadata as a "table of contents" for your compiled code. The C# compiler
places metadata in the compiled code along with the generated MSIL. This metadata accurately
describes all the classes you wrote and how they are structured. All of the classes' methods and
variable information is fully described in the metadata, ready to be read by other applications.
Visual Basic .NET, for example, may read the metadata for a .NET library to provide the
IntelliSense capability of listing all of the methods available for a particular class. If you've ever
worked with COM (Component Object Model), you may be familiar with type libraries. Type
libraries aimed to provide similar "table of contents" functionality for COM objects.
However, type libraries suffered from some limitations, not the least of which was the
fact that not all of the data relevant to the object was put into the type library. Metadata in .NET
does not have this shortcoming. All of the information needed to describe a class in code is
placed into the metadata. You can think of metadata as having all of the benefits of COM type
libraries without the limitations.

Assemblies
Sometimes, you will use C# to build an end-user application. These applications are
packaged as executable files with an extension of .EXE. Windows has always worked with .EXE
files as application programs, and C# fully supports building .EXE files. However, there may be
times when you don't want to build an entire application. Instead, you may want to build a code
library that can be used by others. You may also want to build some utility classes in C#, for
example, and then hand the code off to a Visual Basic .NET developer, who will use your classes
in a Visual Basic .NET application. In cases like this, you won't be building an application.
Instead, you'll be building an assembly.

An assembly is a package of code and metadata. When you deploy a set of classes in an
assembly, you are deploying the classes as a unit; and those classes share the same level of
version control, security information, and activation requirements. Think of an assembly as a
"logical DLL." If you're familiar with Microsoft Transaction Server or COM+, you can think of
an assembly as the .NET equivalent of a package.

There are two types of assemblies: private assemblies and global assemblies. When you
build your assembly, you don't need to specify whether you want to build a private or a global
assembly. The difference is apparent when you deploy your assembly. With a private assembly,
you make your code available to a single application. Your assembly is packaged as a DLL, and
is installed into the same directory as the application using it. With a deployment of a private
assembly, the only application that can use your code is the executable that lives in the same
directory as your assembly.
If you want to share your code among many applications, you might want to consider
deploying your code as a global assembly. Global assemblies can be used by any .NET
application on the system, regardless of the directory in which it is installed. Microsoft ships
assemblies as a part of the .NET Framework, and each of the Microsoft assemblies is installed as
a global assembly. The .NET Framework contains a list of global assemblies in a facility called
the global assembly cache, and the .NET Microsoft Framework SDK includes utilities to both
install and remove assemblies from the global assembly cache.

Entity Relationship Diagram :


An entity-relationship (ER) diagram is a specialized graphic that
illustrates the relationships between entities in a database. ER
diagrams often use symbols to represent three different types of
information. Boxes are commonly used to represent entities.
Diamonds are normally used to represent relationships and ovals
are used to represent attributes.
An E-R diagram constitutes of following Components:

1. Entity: -Any real-world object can be represented as an entity


about which data can be stored in a database. All the real world
objects like a book, an organization, a product, a car, a person are
the examples of an entity. Any living or non-living objects can be
represented by an entity. An entity is symbolically represented by a
rectangle enclosing its name. Entities can be characterized into two
types:

Strong entity: A strong entity has a primary key attribute which


uniquely identifies each entity. Symbol of strong entity is same as
an entity.

Fig 2.1: Strong Entity

Weak entity: A weak entity does not have a primary key attribute
and depends on other entity via a foreign key attribute.
Fig 2.2: Weak Entity

2. Attribute: - Each entity has a set of properties. These properties of


each entity are termed as attributes. For example, a car entity
would be described by attributes such as price, registration number,
model number, color etc. Attributes are indicated by ovals in an e-r
diagram. An attribute can be characterized into following types:

Simple attribute: - An attribute is classified as a simple attribute if it


cannot be partitioned into smaller components. For example, age
and sex of a person. A simple attribute is represented by an oval.

1.1.10.2 Fig 2.3: Simple Attribute

Composite attribute: - A composite attribute can be subdivided into


smaller components which further form attributes. For example,
‘name’ attribute of an entity “person” can be broken down into first
name and last name which further form attributes. ‘Name is the
composite attribute in this example.
1.1.10.3 Fig 2.4: Composite Attribute

Multi valued attribute: – An attribute which can hold more than


one value, it is then termed as multi-valued attribute. For example,
phone number of a person. Symbol of multi-valued attribute is
shown below

1.1.10.4 Fig 2.5: Multi valued Attribute

3. Relationships:- A relationship is defined as bond or attachment


between 2 or more entities. Normally, a verb in a sentence signifies
a relationship.

Fig 2.6: Relationship


Entity Relationship Diagram (ERD):

Name

Mobile no

Client RTO Database

ID

ID card Address Conduct Exam Issue LLR

DFD (Data Flow Diagram):


A Data Flow Diagram (DFD) is a structured analysis and design tool that can be
used for flowcharting. A DFD is a network that describes the flow of data and the
processes that change or transform the data throughout a system. This network is
constructed by using a set of symbols that do not imply any physical implementation.
It has the purpose of clarifying system requirements and identifying major
transformations. So it is the starting point of the design phase that functionally
decomposes the requirements specifications down to the lowest level of detail. DFD
can be considered to an abstraction of the logic of an information oriented or a
process- oriented system flow-chart. For these reasons DFD’s are often referred to as
logical data flow diagrams

Components of DFD: DFDs only involve four symbols. They are:


1. Processes: Processes are the essential activities, carried out within the
system boundary, that use information. A process is represented in the model
only where the information which provides the input into the activity is
manipulated or transformed in some way, so that the data- flowing out of the
process is changed compared to that which flowed in. The activity may involve
capturing information about something that the organization is interested in,
such as a customer or a customer's maintenance call. It may be concerned with
recording changes to this information, a change in a customer's address for
example. It may require calculations to be carried out, such as the quantity left
in stock following the allocation of stock items to a customer's job; or it may
involve validating information, such as checking that faulty equipment is
covered by a maintenance contract.

1.1.10.5 Fig 2.7: Processes

2. Data-flows: A data-flow represents a package of information flowing


between two objects in the data-flow diagram. Data-flows are used to model
the flow of information into the system, out of the system, and between
elements within the system. Occasionally, a data-flow is used to illustrate
information flows between two external entities, which is, strictly speaking,
outside of the system boundaries. However, knowledge of the transfer of
information between external entities can sometimes aid understanding of the
system under investigation, in which case it should be depicted on the diagram.

1.1.10.6 Fig 2.8: Data Flows

3. Data stores: A data store is a place where data is stored and retrieved within
the system. This may be a file, Customer Contracts file for example, a catalogue
or reference list, Options Lists for example, a log book such as the Job Book,
and so on.
1.1.10.7 Fig 2.9: Data Stores

4. External Entities: External entities are entities outside of the system


boundary which interact with the system, in that they send information into
the system or receive information from it. External entities may be external to
the whole organization as in Customer and Supplier in our running example; or
just external to the application area where users' activities are not directly
supported by the system under investigation. Accounts and Engineering are
shown as external entities as they are recipients of information from the
system. Sales also provide input to the system. External entities are often

referred to as sources and sinks. All information represented within the system
is sourced initially from an external entity. Data can leave the system only via
an external entity.
1.1.10.8 Fig 2.10: External Entity
DFD Level 0

Client RTO Database

DFD Level 1
Client Registration for License Admin (RTO) Database

DFD Level2

Client
RTO Database
Registration

Request for License No

Use Case Diagram:


The requirements of a system can be captured by Use Case Diagram. They are
modeled to capture the intended behavior of the system. Use case interacts with the
human and actors that use the system accomplish some work. They define a set of
sequence of actors that a system performs to yield observable result of value to an
actor. An actor represents a rule that a human a hardware device or another system
with another system. Use Cases are used to come to a common understanding with
the system end user and domain experts. There are two components of use case
diagram:

1. Actors: An actor portrays any entity (or entities) that perform certain roles in
a given system. The different roles the actor represents are the actual business
roles of users in a given system. An actor in a use case diagram interacts with a
use case. For example, for modeling a banking application, a customer entity
represents an actor in the application.

Fig 2.11: Actor

2. Use case: A use case in a use case diagram is a visual representation of


distinct business functionality in a system. The key term here is "distinct
business functionality." To choose a business process as a likely candidate for
modeling as a use case, you need to ensure that the business process is
discrete in nature. As the first step in identifying use cases, you should list the
discrete business functions in your problem statement. Each of these business
functions can be classified as a potential use case. Remember that identifying
use cases is a discovery rather than a creation. As business functionality
becomes clearer, the underlying use cases become more easily evident. A use
case is shown as an ellipse in a use case diagram.

Fig 2.12: Use Case


Use Case Diagram For (Admin)
Use Case Diagram For (User)

Home page:
Login user:

RTO Test:
ATTENDING TEST:
New vehicle registrion:

Admin view user:


Modify registration:

RTO Test question:


Update questions:
Contact us info:

View feedback:
Download form:

NOC DATA:
Admin Login:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page


{
SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
string str = @"Data Source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True;";

string sql = "";


protected void Page_Load(object sender, EventArgs e)
{
conn = new SqlConnection(str);
}
protected void Button1_Click(object sender, EventArgs e)
{
sql = "select Admin_id from Admin_Master where Username = '"
+ TextBox1.Text + "' and Password ='" + TextBox2 .Text + "' ";
//Label1.Text = sql;

cmd = new SqlCommand(sql, conn);


conn.Open();
object c = cmd.ExecuteScalar();
conn.Close();

if (c != null)
{
Label1.Text = "WelCome To Admin Site...";
Session["admin"] = TextBox1.Text;
Response.Redirect("~/admin/default.aspx");
}
else
{
Label1.Text = "wrong Username or password...";
}

}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("~/default.aspx");
}
}

Feed back:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page


{
SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
string str = @"Data Source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True;";

string sql = "";

protected void Page_Load(object sender, EventArgs e)


{
conn = new SqlConnection(str);
}

protected void Button1_Click(object sender, EventArgs e)


{
sql = "insert into
Feedback(Feed_Date,Name,Mobile,Email,Comments)values('" +
TextBox2.Text + "','" + TextBox3.Text + "'," + TextBox4.Text + ",'" +
TextBox5.Text + "','" + TextBox6.Text + "')";
cmd = new SqlCommand(sql, conn);
conn.Open();
int i = cmd.ExecuteNonQuery();
conn.Close();
if (i > 0)
{
Label1.Text = "record inserted...";
}
else
{
Label1.Text = "record not inserted...";
}
}

protected void Button2_Click(object sender, EventArgs e)


{

TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
}
}

Registration:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Data.SqlClient;

public partial class Default2 : System.Web.UI.Page


{
SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
string str = @"Data Source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True;";

string sql = "";


string temp;
string photo;

protected void Page_Load(object sender, EventArgs e)


{
conn = new SqlConnection(str);
}
protected void Button1_Click(object sender, EventArgs e)
{

if (FileUpload1.HasFile)
{
FileUpload1.SaveAs(Server.MapPath("~/Document/" +
FileUpload1.FileName));
temp = FileUpload1.FileName + "";
}

if (FileUpload2.HasFile)
{
FileUpload2.SaveAs(Server.MapPath("~/photo/" +
FileUpload2.FileName));
photo = FileUpload2.FileName + "";
}

sql = "insert into


Registration(Username,Password,F_Name,L_Name,Address,City,Mobile,E_mai
l,Sec_Que,Sec_Ans,Status,temp,photo,TYPE)values('" + TextBox1.Text +
"','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text
+ "','" + TextBox5.Text + "','" + TextBox6.Text + "'," + TextBox7.Text
+ ",'" + TextBox8.Text + "','" + DropDownList1.Text + "','" +
TextBox9.Text + "','" + DropDownList2.Text + "','" + temp + "','" +
photo + "','" + DRP1.SelectedValue + "')";
cmd = new SqlCommand(sql, conn);
conn.Open();
int i = cmd.ExecuteNonQuery();
conn.Close();

if (i > 0)
{
Label1.Text = "record inserted...";
}
else
{
Label1.Text = "record not inserted...";
}
}

protected void Button2_Click(object sender, EventArgs e)


{
Response.Redirect("~/Default.aspx");
}
}

Result RTO:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Default3 : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request.QueryString["score"] != null)
{
lblScore.Text = "Your Score is :" +
Request.QueryString["score"].ToString();
}
else
{
lblScore.Text = "0";
}
}
}
}
RTO Test:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Drawing;

using System.Data.SqlClient;
//using RTO.DT;

public partial class _Default : System.Web.UI.Page


{
string strCn = @"Data Source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True;";

string sql = "";

SqlConnection conn;
SqlDataAdapter dap;
DataTable dt;

int q_n = 0;

protected void Page_Load(object sender, EventArgs e)


{

conn = new SqlConnection(strCn);


if (!IsPostBack)
{

sql = "SELECT TOP (15) q_id, q_name, opt_1, opt_2, opt_3,


ans, image FROM rto ORDER BY NEWID()";

dap = new SqlDataAdapter(sql, strCn);


dt = new DataTable();
dap.Fill(dt);
gv1.DataSource = dt;
gv1.DataBind();

lbl_no_of_que.Text = "0";

Show_Que();

}
else
{
chk_ans();
Show_Que();
}

//Session.Add("counter", "0");
}
protected void Button1_Click(object sender, EventArgs e)
{
//int a=0;
chk_ans();
//Session["counter"] =
int.Parse(Session["counter"].ToString());
// while(a<int.Parse(Session["counter"].ToString()))
// {

// }
//if (ListBox1.Items[0].Text == "1")
//{
// lbl1.BackColor = Color.Green;
//}
//else if (ListBox1.Items[0].Text == "0")
//{
// lbl1.BackColor = Color.Red;
//}
//else
//{
//}

//if (ListBox1.Items[1].Text == "1")


//{
// lbl1.BackColor = Color.Green;
//}
//else if (ListBox1.Items[1].Text == "0")
//{
// lbl1.BackColor = Color.Red;
//}
//else
//{
//}

//if (ListBox1.Items[2].Text == "1")


//{
// lbl1.BackColor = Color.Green;
//}
//else if (ListBox1.Items[2].Text == "0")
//{
// lbl1.BackColor = Color.Red;
//}
//else
//{
////}

Show_Que();

}
public void Show_Que()
{

q_n = int.Parse(lbl_no_of_que.Text);

// For English
lbl_que.Text = gv1.Rows[q_n].Cells[1].Text;
lbl_ans1.Text = gv1.Rows[q_n].Cells[2].Text;
lbl_ans2.Text = gv1.Rows[q_n].Cells[3].Text;
lbl_ans3.Text = gv1.Rows[q_n].Cells[4].Text;
Image1.ImageUrl = "~/Traffic_img/" +
gv1.Rows[q_n].Cells[6].Text;
lbl_c_ans.Text = gv1.Rows[q_n].Cells[5].Text;

//===============================================
//For Gujarati
//BT_rto1 b1 = new BT_rto1();

sql = "select * from rto1 where q_id = " +


gv1.Rows[q_n].Cells[0].Text;
dt = new DataTable();
MyClass my = new MyClass();
dt = my.Get_TABLE(sql);

lbl_que_g.Text = dt.Rows[0][1].ToString();
lbl_ans1_g.Text = dt.Rows[0][2].ToString();
lbl_ans2_g.Text = dt.Rows[0][3].ToString();
lbl_ans3_g.Text = dt.Rows[0][4].ToString();
/////////////////////////////////////////

//Show Que. No.......


lbl_no_of_que.Text = Convert.ToString(q_n + 1);
Label1.Text = "Que. : " + lbl_no_of_que.Text;

////////////
opt1.Checked = false;
opt2.Checked = false;
opt3.Checked = false;
/////////////
//Display opt wise Guj-Eng Que/Ans....
Show_OPT();

}
public void Show_OPT()
{
if (opteng.Checked == true)
{
lbl_que.Visible = true;
lbl_ans1.Visible = true;
lbl_ans2.Visible = true;
lbl_ans3.Visible = true;

lbl_que_g.Visible = false;
lbl_ans1_g.Visible = false;
lbl_ans2_g.Visible = false;
lbl_ans3_g.Visible = false;

}
if (optguj.Checked == true)
{
lbl_que.Visible = false;
lbl_ans1.Visible = false;
lbl_ans2.Visible = false;
lbl_ans3.Visible = false;

lbl_que_g.Visible = true;
lbl_ans1_g.Visible = true;
lbl_ans2_g.Visible = true;
lbl_ans3_g.Visible = true;

}
if (optboth.Checked == true)
{
lbl_que.Visible = true;
lbl_ans1.Visible = true;
lbl_ans2.Visible = true;
lbl_ans3.Visible = true;

lbl_que_g.Visible = true;
lbl_ans1_g.Visible = true;
lbl_ans2_g.Visible = true;
lbl_ans3_g.Visible = true;

}
}
public void chk_ans()
{

if (opt1.Checked == true)
{
if (lbl_c_ans.Text == "opt_1")
{

ListBox1.Items.Add("1");

}
else
{
ListBox1.Items.Add("0");

}
}
else if (opt2.Checked == true)
{
if (lbl_c_ans.Text == "opt_2")
{

ListBox1.Items.Add("1");
}
else
{
ListBox1.Items.Add("0");

}
}
else if (opt3.Checked == true)
{
if (lbl_c_ans.Text == "opt_3")
{

ListBox1.Items.Add("1");

}
else
{
ListBox1.Items.Add("0");

}
}
else
{
ListBox1.Items.Add("0");
}
set_color();

private void set_color()


{
for (int i = 0; i < ListBox1.Items.Count; i++)
{
switch (i)
{
case 0:
if (ListBox1.Items[i].Text == "1")
{
lbl1.BackColor = Color.Green;
lbl1.ForeColor = Color.Yellow;
}
else
{
lbl1.BackColor = Color.Red;
lbl1.ForeColor = Color.Yellow;
}
break;
case 1:
if (ListBox1.Items[i].Text == "1")
{
lbl2.BackColor = Color.Green;
lbl2.ForeColor = Color.Yellow;
}
else
{
lbl2.BackColor = Color.Red;
lbl2.ForeColor = Color.Yellow;
}
break;
case 2:
if (ListBox1.Items[i].Text == "1")
{
lbl3.BackColor = Color.Green;
lbl3.ForeColor = Color.Yellow;

}
else
{
lbl3.BackColor = Color.Red;
lbl3.ForeColor = Color.Yellow;
}
break;
case 3:
if (ListBox1.Items[i].Text == "1")
{
lbl4.BackColor = Color.Green;
lbl4.ForeColor = Color.Yellow;

}
else
{
lbl4.BackColor = Color.Red;
lbl4.ForeColor = Color.Yellow;
}
break;
case 4:
if (ListBox1.Items[i].Text == "1")
{
lbl5.BackColor = Color.Green;
lbl5.ForeColor = Color.Yellow;

}
else
{
lbl5.BackColor = Color.Red;
lbl5.ForeColor = Color.Yellow;
}
break;
case 5:
if (ListBox1.Items[i].Text == "1")
{
lbl6.BackColor = Color.Green;
lbl6.ForeColor = Color.Yellow;

}
else
{
lbl6.BackColor = Color.Red;
lbl6.ForeColor = Color.Yellow;
}
break;
case 6:
if (ListBox1.Items[i].Text == "1")
{
lbl7.BackColor = Color.Green;
lbl7.ForeColor = Color.Yellow;

}
else
{
lbl7.BackColor = Color.Red;
lbl7.ForeColor = Color.Yellow;
}
break;
case 7:
if (ListBox1.Items[i].Text == "1")
{
lbl8.BackColor = Color.Green;
lbl8.ForeColor = Color.Yellow;

}
else
{
lbl8.BackColor = Color.Red;
lbl8.ForeColor = Color.Yellow;
}
break;
case 8:
if (ListBox1.Items[i].Text == "1")
{
lbl9.BackColor = Color.Green;
lbl9.ForeColor = Color.Yellow;

}
else
{
lbl9.BackColor = Color.Red;
lbl9.ForeColor = Color.Yellow;
}
break;
case 9:
if (ListBox1.Items[i].Text == "1")
{
lbl10.BackColor = Color.Green;
lbl10.ForeColor = Color.Yellow;

}
else
{
lbl10.BackColor = Color.Red;
lbl10.ForeColor = Color.Yellow;
}
break;
case 10:
if (ListBox1.Items[i].Text == "1")
{
lbl11.BackColor = Color.Green;
lbl11.ForeColor = Color.Yellow;

}
else
{
lbl11.BackColor = Color.Red;
lbl11.ForeColor = Color.Yellow;
}
break;
case 11:
if (ListBox1.Items[i].Text == "1")
{
lbl12.BackColor = Color.Green;
lbl12.ForeColor = Color.Yellow;

}
else
{
lbl12.BackColor = Color.Red;
lbl12.ForeColor = Color.Yellow;
}
break;
case 12:
if (ListBox1.Items[i].Text == "1")
{
lbl13.BackColor = Color.Green;
lbl13.ForeColor = Color.Yellow;

}
else
{
lbl13.BackColor = Color.Red;
lbl13.ForeColor = Color.Yellow;
}
break;
case 13:
if (ListBox1.Items[i].Text == "1")
{
lbl14.BackColor = Color.Green;
lbl14.ForeColor = Color.Yellow;

}
else
{
lbl14.BackColor = Color.Red;
lbl14.ForeColor = Color.Yellow;
}
break;
case 14:
if (ListBox1.Items[i].Text == "1")
{
lbl15.BackColor = Color.Green;
lbl15.ForeColor = Color.Yellow;

}
else
{
lbl15.BackColor = Color.Red;
lbl15.ForeColor = Color.Yellow;
}
break;
}

protected void opteng_CheckedChanged(object sender, EventArgs e)


{
Show_OPT();

}
protected void optguj_CheckedChanged(object sender, EventArgs e)
{
Show_OPT();
}
protected void optboth_CheckedChanged(object sender, EventArgs e)
{
Show_OPT();
}

}
User forgot:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page


{
SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
string str = @"Data Source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True;";

string sql = "";

protected void Page_Load(object sender, EventArgs e)


{
conn = new SqlConnection(str);
}
protected void Button1_Click(object sender, EventArgs e)
{
sql = "select password from Registration where username = '"+
TextBox1.Text +"' and sec_ans ='"+ TextBox2.Text +"' ";
cmd = new SqlCommand(sql, conn);
conn.Open();
object c = cmd.ExecuteScalar();

if (c != null && c.ToString() != "")


{
Label1.Text = "Your Answer is : " + c.ToString();
}
else
{
Label1.Text = "wrong Username and password";
}
}
}

User login:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page


{
SqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
string str = @"data source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True";
// string str = @"Data Source=.\SQLEXPRESS;initial
catalog=RTO;Integrated Security=True;";

string sql = "";


int Reg_id;

protected void Page_Load(object sender, EventArgs e)


{
conn = new SqlConnection(str);
}
protected void Button1_Click(object sender, EventArgs e)
{

sql = "select Reg_id from Registration where Username = '" +


TextBox1.Text + "' and Password ='" + TextBox2.Text + "' ";
//Label1.Text = sql;

cmd = new SqlCommand(sql, conn);


conn.Open();
object c = cmd.ExecuteScalar();
conn.Close();

if (c != null)
{
int reg_id = Int32.Parse(c.ToString());
Session["user"] = TextBox1.Text;
Session["reg_id"] = Reg_id.ToString();
Response.Redirect("~/user/home1.aspx");
}
else
{
Label1.Text = "wrong user or password...";
}

}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("~/default.aspx");
}
}
Admin:

Feedback:
Download:

Registration:
Result:

RTO Questions:
CONCLUSION

 In today’s world with the increasing traffic and longer commuting


distances it is becoming very difficult for people to travel for their
particular licenses issue.
 Also most of the people today work for longer hours and do not have
the flexibility to take a break from work to give the licenses tests.
People have not spent more time for licenses test.
 The People want a facility where they can have easy to issue their
licenses.
 The facility to achieve schedule date by SMS, call or mail.
 The people collect their license from post and travel from long distance
for issuing license. So, the people waste their money.
 We like this opportunity to convey our special thanks to all those who
played role in making this project a success and a great learning
experience for us.

You might also like