0% found this document useful (0 votes)
116 views54 pages

Bus System

The document provides a history and introduction to ASP.NET, Microsoft's web application framework and programming platform for building dynamic web sites, web applications and web services. It discusses how ASP.NET was developed as a successor to Active Server Pages (ASP) to address common complaints about ASP and allow for cleaner code. It describes the initial development of ASP.NET under the code names "XSP" and "ASP+" before being renamed to ASP.NET. The document also provides an overview of new features introduced in version 1.1 of ASP.NET compared to version 1.0.

Uploaded by

Prints Bindings
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views54 pages

Bus System

The document provides a history and introduction to ASP.NET, Microsoft's web application framework and programming platform for building dynamic web sites, web applications and web services. It discusses how ASP.NET was developed as a successor to Active Server Pages (ASP) to address common complaints about ASP and allow for cleaner code. It describes the initial development of ASP.NET under the code names "XSP" and "ASP+" before being renamed to ASP.NET. The document also provides an overview of new features introduced in version 1.1 of ASP.NET compared to version 1.0.

Uploaded by

Prints Bindings
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 54

A

PROJECT REPORT

ON

“ONLINE BUS RESERVATION”

PREFACE

Excellence is an attitude that the whole of the human race is born with. It is the
environment that makes sure that whether the result of this attitude is visible or otherwise. The
well planned, properly executed and evaluated industrial training help a lot in including the good
work culture. It provides linkage between student and industry in order to develop the awareness
of industrial approach to problem solving based on broad understanding of process and mode of
operation of an organization.

During this period, the students get there real first hand experience on working in the
actual environment. Most of the theoretical knowledge that they have gained during the course of
there studies is put to test here. Apart from this, the students get opportunity to learn the latest
technologies, which immensely help them in their career. This also benefits the organizations as
many students doing their projects perform very well.

I had the opportunity to have the real practical experience, which has increased my
sphere of knowledge to a great extent. Now I am better equipped to handle the real things than
anyone else that has not undergone any such training. I learnt how an actual project progresses,
what sort of problems actually occurs, how to produce quality products and so on. And being in
such a reputed organization I had the best of experience.

1
TABLE OF CONTENTS

 History
 Introduction about .Net

 Controls

 Requirement Analysis

 Tables

 System Analysis

 Design

 Form

 Coding

 Result

 Conclusion

 Bibliography

2
HISTORY

After the release of Internet Information Services 4.0 in 1997, Microsoft began
researching possibilities for a new web application model that would solve common complaints
about Active Server Pages, especially with regard to separation of presentation and content and
being able to write "clean" code. Mark Anders, a manager on the IIS team, and Scott Guthrie,
who had joined Microsoft in 1997 after graduating from Duke University, were tasked with
determining what that model would look like. The initial design was developed over the course
of two months by Anders and Guthrie, and Guthrie coded the initial prototypes during the
Christmas holidays in 1997.

The initial prototype was called "XSP"; Guthrie explained in a 2007 interview that,
"People would always ask what the X stood for. At the time it really didn't stand for anything.
XML started with that; XSLT started with that. Everything cool seemed to start with an X, so
that's what we originally named it." The initial development of XSP was done using Java, but it
was soon decided to build the new platform on top of the Common Language Runtime (CLR)
instead. Guthrie described this decision as a "huge risk", as the success of their new web
development platform would be tied to the success of the CLR, which, like XSP, was still in the
early stages of development, so much so that the XSP team was the first team at Microsoft to
target the CLR.

With the move to the Common Language Runtime, XSP was re-implemented in C#
(known internally as "Project Cool" but kept secret from the public), and renamed to ASP+, as

3
by this point the new platform was seen as being the successor to Active Server Pages, and the
intention was to provide an easy migration path for ASP developers
.
Mark Anders first demonstrated ASP+ at the ASP Connections conference in Phoenix,
Arizona on May 2, 2000. Demonstrations to the wide public and initial beta release of ASP+
(and the rest of the .NET Framework) came at the 2000 Professional Developers Conference on
July 11, 2000 in Orlando, Florida. During Bill Gates's keynote presentation, Fujitsu
demonstrated ASP+ being used in conjunction with COBOL, and support for a variety of other
languages was announced, including Microsoft's new Visual Basic .NET and C# languages, as
well as Python and Perl support by way of interoperability tools created by ActiveState.
Once the ".NET" branding was decided on in the second half of 2000, it was decided to
rename ASP+ to ASP.NET. Mark Anders explained on an appearance on The MSDN Show that
year that, "The .NET initiative is really about a number of factors, it’s about delivering software
as a service, it's about XML and web services and really enhancing the Internet in terms of what
it can do .... we really wanted to bring its name more in line with the rest of the platform pieces
that make up the .NET framework.

4
5
INTRODUCTION TO JAVA

This java program for transport management system contains all the
information for bus route, bus information, driver information,
passenger information, Ticket information and many more. It is a very
good project on transport management. Following this we have also
tried to keep different types of features regarding bus routes, departure
time, payment for seat booking, passenger information, type of bus
etc.

This program is Transport Management System called AwetraSoft. It


allows user to add driver, sell tickets and other cool features. In our
system we have also tried to provide travelers to book seats, buy
tickets and reserve their information in the system.
Besides those projects we have also studied many more projects on
Transportation, Ticket Booking, and Reservation System. Different
projects have made including different features. Some have added
driver information also. Finally studying all of these projects we have
made our project in our own way.

Changes in 1.1 on comparison with 1.0


 Built-in support for mobile ASP.NET controls. Previously available as an

add-on for .NET Framework, now part of the framework.


 Security changes - enable Windows Forms assemblies to execute in a
semi-trusted manner from the Internet, and enable Code Access Security
in ASP.NET applications.
 Built-in support for ODBC and Oracle databases. Previously available as
an add-on for .NET Framework 1.0, now part of the framework.

 .NET Compact Framework - a version of the .NET Framework for small


devices.
 Internet Protocol version 6 (IPv6) support.
 Numerous API changes.

6
Recommendation
We have made a fundamental system of BOOKING TICKET. But it
can be made more efficient by adding many more features. There can
be added driver’s information and employee’s information also. So it
would be easier for the admin to control the entire system.
Technology is becoming more advanced day by day. So it would be a
wonderful project if we can make it more technology based. It can be
made more beneficial for the travelers if we could add extra facilities.
If someone wants to implement further project on transport
management, he can think about how it can be more efficient and
beneficial both for the passengers and the authority. But before
implementation the things which should be keep in mind-
a) How much efficient it is.
b) Is it complicated or user friendly system.
c) How much secured the reserved information are.
d) Is the system updating frequently or not.

Keeping all these things in mind one should go for the implementation
of the system.

7
INTRODUCTION TO WEB

What is a Website ?

A Website (alternatively, Web site or web site) is a collection of Web


pages, images, videos and other digital assets that is hosted on one or several Web
server(s), usually accessible via the Internet, cell phone or a LAN.

A Web page is a document, typically written in HTML, that is almost


always accessible via HTTP, a protocol that transfers information from the Web
server to display in the user's Web browser.

All publicly accessible websites are seen collectively as constituting the


"World Wide Web".

The pages of websites can usually be accessed from a common root URL
called the homepage, and usually reside on the same physical server. The URLs
of the pages organize them into a hierarchy, although the hyperlinks between
them control how the reader perceives the overall structure and how the traffic
flows between the different parts of the sites.

Some websites require a subscription to access some or all of their


content. Examples of subscription sites include many business sites, parts of many
news sites, academic journal sites, gaming sites, message boards, Web-based e-
mail, services, social networking website, and sites providing real-time stock
market data.

As of March 2007 there are over 8 billion web pages in total on the World
Wide Web.
CONTROLS

 Controls are the tools for all of the tasks you perform on a Web form.
 Defines the appearance of the form.
 Provides a way to get information and perform tasks on behalf of the user.
 Microsoft Visual Studio .NET includes two different types of controls that
you can use on a Web form:
• HTML Controls
• Server Controls

14
o There are a lot of ways to display text on a page:
o For read-only text, you can write directly to the Response object,
as in Response.Write(“Some text”)
o you can use a Label control.
o you can use a TextBox control and set its ReadOnly property to
True.
o you can use a Literal control and compose the text in HTM

TextBox Control Properties


The Button, LinkButton, and ImageButton server controls all trigger post-
back events to perform commands.

15
A post-back event begins a request from the browser, causing the server to
process the page' s events

Technologies used
Microsoft .NET Framework includes a set of standard class libraries.
The class library is organized in a hierarchy of namespaces. Most of the built in
APIs are part of either System.* or Microsoft.* namespaces. It encapsulates a
large number of common functions, such as file reading and writing, graphic
rendering, database interaction, and XML document manipulation, among others.

16
REQUIREMENT ANALYSIS

Project Description

This is Online Bus Reservation package to manage Buses, Routes,


Services, Passengers & avail a degree of comfort to both Organization
& Passenger. Today the leading Bus Travel companies are using these
Packages to have a ease of mentality with their work.

Features:

The project keep track of following modules:

 Avail Online Reservation

 Rootmaps

 Availability Of Seats

 Fares

 Services

 Payment

17
Development:

This project is coded under JAVA environment in


Online_reservation

DATABASE: The
finance management system handles MS-Access database
called…\Finance\App_Data\bus.mdb.This database contains four
tables with following structures:

1.Source

2.Destination

3.Arrival Time

4.Departure Time

5.Fare

18
BUS TABLE:-

19
SYSTEM ANALYSIS

System Analysis is a management technique, which helps in designing a


new system or improving an existing system. System Analysis is the process of
gathering and interpreting facts, diagnosing problems (if any), using
information to recommend improvements to the system. There are four basic
elements of system analysis: - Output, Input, Files, processes. For
computerization of any system, the existing system must be thoroughly being
understood to determine “how the computer can be best used to make its
operation most effective”. This is acquired by analyzing existing system.

FEASIBILITY STUDY

Feasibility study is the process of determination of whether or not a


project is worth doing. Feasibility studies are undertaken within tight time
constraints and normally culminate in a written and oral feasibility report. I have
taken two weeks in feasibility study with my co-developer. The contents and
recommendations of this feasibility study helped us as a sound basis for deciding
how to proceed the project. It helped in taking decisions such as which software
to use, hardware combinations, etc.
1. Technical Feasibility
2. Economical Feasibility
3. Operational Feasibility

1. Technical Feasibility

20
Technical feasibility determines whether the work for the project can
be done with the existing equipment, software technology and available
personnel. Technical feasibility is concerned with specifying equipment and
software that will satisfy the user requirement.
This project is feasible on technical remarks also, as the proposed
system is more beneficiary in terms of having a sound proof system with new
technical components installed on the system. The proposed system can run on
any machines supporting Windows and Internet services and works on the best
software and hardware that had been used while designing the system so it would
be feasible in all technical terms of feasibility.

2. Economical Feasibility
Economical feasibility determines whether there are sufficient
benefits in creating to make the cost acceptable, or is the cost of the system too
high. As this signifies cost-benefit analysis and savings. On the behalf of the
cost-benefit analysis, the proposed system is feasible and is economical regarding
its pre-assumed cost for making a system.
We classified the costs of e-shopping according to the phase in
which they occur. As we know that the system development costs are usually one-
time costs that will not recur after the project has been completed. For calculating
the Development costs we evaluated certain cost categories viz.

1. Personal costs
2. Computer usage
3. Supply and equipments costs
4. Cost of any new computer equipments and software.

3. Operational Feasibility
Operational feasibility criteria measure the urgency of the problem
(survey and study phases) or the acceptability of a solution (selection, acquisition

21
and design phases). How do you measure operational feasibility? There are two
aspects of operational feasibility to be considered:

UML (UNIFIED MODIFY LANGUAGE)

The Unified Modeling Language (UML) is a standard language for specifying,


visualizing, constructing, and documenting the artifacts of software systems, as
well as for business modeling and other non-software systems. The UML
represents a collection of best engineering practices that have proven successful in
the modeling of large and complex systems. The UML is a very important part of
developing object oriented software and the software development process.  The
UML uses mostly graphical notations to express the design of software projects. 
Using the UML helps project teams communicate, explore potential designs, and
validate the architectural design of the software.

Goals of UML

The primary goals in the design of the UML were:

1. Provide users with a ready-to-use, expressive visual modeling language so


they can develop and exchange meaningful models.
2. Provide extensibility and specialization mechanisms to extend the core
concepts.
3. Be independent of particular programming languages and development
processes.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of the OO tools market.
6. Support higher-level development concepts such as collaborations,
frameworks, patterns and components.
7. Integrate best practices.

22
Why Use UML?

As the strategic value of software increases for many companies, the


industry looks for techniques to automate the production of software and to
improve quality and reduce cost and time-to-market. These techniques include
component technology, visual programming, patterns and frameworks. Businesses
also seek techniques to manage the complexity of systems as they increase in
scope and scale. In particular, they recognize the need to solve recurring
architectural problems, such as physical distribution, concurrency, replication,
security, load balancing and fault tolerance. Additionally, the development for the
World Wide Web, while making some things simpler, has exacerbated these
architectural problems. The Unified Modeling Language (UML) was designed to
respond to these needs.

REQUIREMENTS:

INTERFACE REQUIRED-

PLATFORM USED:- WIN XP OR HIGHER VERSION

LANGUAGE USED: -C#.NET

DATABASE USED: -MS-ACCESS

HARDWARE REQUIREMENTS-

PROCESSOR: -456 MHZ OR ABOVE

RAM:- 128 MB AND ABOVE

23
DESIGN

Forms Name

 Home Page
 Rootmap Page
 Reservation Page
 Available Bus Page
 Reservation Form Page
 Confirmation Page
 Contact Us Page

24
Home Page

25
Root Map Page

26
27
Reservation Page:-

28
Available Bus Page

29
Reservation Form Page

30
31
Confirmation Page

Contact Us Page

32
Coding
This project is coded under the c#.net environment using software
visual studio 2008 framework..there are coding of some pages--------

33
1.HTML coding for master page-

<%@ Master Language="C#" AutoEventWireup="true"


CodeFile="MasterPage.master.cs"
Inherits="NewFolder1_MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >


<head runat="server">
<title>Untitled Page</title>
</head>
<body alink="#ff9999">
<form id="form1" runat="server">
<div>
<asp:contentplaceholder
id="ContentPlaceHolder1" runat="server">
<asp:Image ID="Image1" runat="server"
Height="92px" ImageUrl="~/bus images/banner11.GIF"
Style="z-index: 100; left: 108px;
position: absolute; top: 45px" Width="161px" />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
&nbsp;

34
<asp:Image ID="Image2" runat="server"
Height="90px" ImageUrl="~/bus images/banner2.gif"
Style="z-index: 101; left: 109px;
position: absolute; top: 134px" Width="161px" />
<asp:Label ID="Label1" runat="server"
BackColor="#C00000" Font-Names="Georgia" Font-Size="XX-
Large"
ForeColor="White" Height="71px"
Style="font-size: 40pt; z-index: 102; left: 272px;
position: absolute; top: 45px; text-
align: center" Text="Bus Reservation"
Width="488px"></asp:Label>
<asp:Image ID="Image3" runat="server"
Height="52px" ImageUrl="~/bus images/0.jpg"

Style="z-index: 103; left: 353px;


position: absolute; top: 126px; bottom: 363px;"
Width="347px" />
<asp:HyperLink ID="home" runat="server"
Style="z-index: 104; left: 295px; position: absolute;
top: 195px"
NavigateUrl="~/Default.aspx" Font-Bold="True" Font-
Names="Monotype Corsiva" Font-Size="Large"
ForeColor="DarkSlateBlue"
Width="57px">HOME</asp:HyperLink>
<asp:HyperLink ID="root" runat="server"
Style="z-index: 105; left: 371px; position: absolute;
top: 195px"
NavigateUrl="~/rootmap.aspx" Font-Bold="True" Font-
Names="Monotype Corsiva" Font-Size="Large"
ForeColor="DarkSlateBlue"
Width="89px">ROOTMAP</asp:HyperLink>
<asp:HyperLink ID="reg" runat="server"
Style="z-index: 106; left: 476px; position: absolute;
top: 195px"
NavigateUrl="~/reservation.aspx" Font-Bold="True" Font-
Names="Monotype Corsiva" Font-Size="Large"
ForeColor="DarkSlateBlue"
Width="133px">RESERVATION</asp:HyperLink>
<asp:HyperLink ID="HyperLink4"
runat="server" Style="z-index: 107; left: 626px;
position: absolute;
top: 195px"
NavigateUrl="~/contactus.aspx" Font-Bold="True" Font-
Names="Monotype Corsiva" Font-Size="Large"
ForeColor="DarkSlateBlue" Width="111px">CONTACT
US</asp:HyperLink>

35
<asp:Image ID="Image4" runat="server"
Height="87px" ImageUrl="~/bus images/banner1.gif"
Style="z-index: 108; left: 762px;
position: absolute; top: 45px" Width="164px" />
<asp:Image ID="Image5" runat="server"
Height="89px" Style="z-index: 110; left: 762px;
position: absolute; top: 132px"
Width="163px" ImageUrl="~/bus images/banner22.GIF" />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</asp:contentplaceholder>
<asp:ContentPlaceHolder
ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="Default.aspx.cs"

36
Inherits="NewFolder1_Default"
MasterPageFile="~/MasterPage.master" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content ID="id1"
ContentPlaceHolderID="ContentPlaceHolder2"
runat="server">

<div>
<table style="z-index: 100; left: 148px; width:
659px; position: absolute; top: 297px;
height: 330px">
<tr>
<td style="width: 109px; ">
<asp:Image style="Z-INDEX: 100; LEFT:
17px; POSITION: absolute; TOP: 4px" id="Image1"
runat="server" Width="81px" ImageUrl="~/bus
images/chatsupport.gif" Height="78px">
</asp:Image>
</td>
<td style="width: 490px; "><p
style="text-align: justify; vertical-align: text-
top;"><strong>BusReservation.com</strong> is India’s
largest bus ticketing platform.

It’s the flagship brand of Travis Internet Pvt. Ltd., a


company setup by travel industry professionals with a
wide ranging international exposure. Travis is
internationally funded to position itself as one of the
major players in the emerging online travel market in
India. By leveraging the power of the Internet, the
Ticketvala online system provides real time quotations,
real time bus booking services for round trips, and
multiple payment channels, cost comparison, last minute
booking and an in-house call centre and even home
delivery of tickets.

The company’s management team comes with a remarkable


blend of entrepreneurial and operational experience and
excellence in the travel industry. It’s this deep
understanding of the travel industry and technology
that has enabled it to create the best end-to-end
customer experience for by providing information at
their fingertips in a matter of seconds are a few of
the conveniences that are offered to its customers.

Ticketvala.com is deeply committed and dedicated to its


vision in providing a distinctive travel platform to

37
bring value to all the members in the ecosystem and has
received funding by Footprint Ventures, a leading
Bangalore based venture capital firm.
</p>
</td>
</tr>
<tr>
<td style="width: 109px; height: 48px">
</td>
<td style="width: 490px; height: 48px">
<asp:Image ID="Image2"
runat="server" Height="35px" ImageUrl="~/bus
images/hdfcbank.jpg"
Style="z-index: 100; left:
138px; position: absolute; top: 336px" Width="128px" />
<asp:Image ID="Image4"
runat="server" Height="33px" ImageUrl="~/bus
images/4.jpg"
Style="z-index: 102; left:
277px; position: absolute; top: 336px"
Width="83px" />
<asp:Image ID="Image5"
runat="server" Height="36px" ImageUrl="~/bus
images/5.jpg"
Style="z-index: 104; left:
371px; position: absolute; top: 333px"
Width="98px" />
<asp:Image ID="Image3"
runat="server" Height="34px" ImageUrl="~/bus
images/3.jpg"
Style="z-index: 101; left:
489px; position: absolute; top: 337px"
Width="80px" />

</td>
</tr>
</table>
<asp:Image ID="Image6" runat="server"
Height="62px" ImageUrl="~/bus images/bus lane.jpg"
Style="z-index: 100; left: 348px; position:
absolute; top: 233px"
Width="277px" />

</div>
</asp:Content>

38
Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;

39
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class NewFolder1_Default :


System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs
e)
{

}
}

Reservation.aspx.

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="reservation.aspx.cs"
Inherits="NewFolder1_reservation"
MasterPageFile="~/MasterPage.master" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>

40
<asp:Content ID="id1"
ContentPlaceHolderID="ContentPlaceHolder2"
runat="server">

<div>
<table style="z-index: 100; left: 115px; width:
734px; position: absolute; top: 245px;
height: 355px">
<tr>
<td style="width: 115px; height: 66px">
<asp:Image style="Z-INDEX: 100;
LEFT: 4px; POSITION: absolute; TOP: 5px" id="Image1"
runat="server" Width="82px" ImageUrl="~/bus
images/chatsupport.gif" Height="72px">
</asp:Image>
</td>
<td style="width: 490px; height: 66px">
&nbsp;
<asp:GridView ID="GridView1"
runat="server" Height="95px"
Style="z-index: 100; left: 147px;
position: absolute; top: 126px" Width="629px"
AllowPaging="True" PageSize="3"
EnableSortingAndPagingCallbacks="True"
AutoGenerateColumns="False"
OnRowCommand="GridView1_RowCommand">

<Columns>
<asp:BoundField DataField="Bus_No"
HeaderText="Bus_No" />
<asp:HyperLinkField
DataTextField="Bus_Type"
DataNavigateUrlFormatString="ReservationForm.aspx?
Bus_No={0}" DataNavigateUrlFields="Bus_No"
HeaderText="Bus_Type"/>
</Columns>
<Columns>
<asp:BoundField
DataField="Departure_time" HeaderText="Departure_time"
/>
</Columns>
<Columns>
<asp:BoundField
DataField="Arrive_time" HeaderText="Arrive_time" />

41
</Columns>
<Columns>
<asp:BoundField DataField="Source"
HeaderText="Source" />
</Columns>
<Columns>
<asp:BoundField
DataField="Destination" HeaderText="Destination" />
</Columns>
<Columns>
<asp:BoundField
DataField="Total_sheet" HeaderText="Total_sheet" />
</Columns>
<Columns><asp:BoundField
DataField="Free_sheet" HeaderText="Free_sheet"
/></Columns>
<Columns><asp:BoundField
DataField="Fares" HeaderText="Fares" /></Columns>
</asp:GridView>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<td style="width: 115px; height: 51px">
&nbsp;
<asp:DropDownList
ID="DropDownList1" runat="server"
DataSourceID="AccessDataSource1"
DataTextField="Source"
DataValueField="Source" Height="24px" Style="z-index:
105;
left: 48px; position: absolute;
top: 127px" Width="86px">
</asp:DropDownList>
<br />
<br />
<br />
<asp:DropDownList
ID="DropDownList2" runat="server"
DataSourceID="AccessDataSource2"
DataTextField="Destination"
DataValueField="Destination" Height="19px" Style="z-
index: 101;
left: 48px; position: absolute;
top: 181px" Width="89px">
</asp:DropDownList>

42
<asp:Button ID="Button1"
runat="server" OnClick="Button1_Click" Style="z-index:
102;
left: 47px; position: absolute;
top: 224px" Text="Search" />
&nbsp;<br />
<br />
<br />
<asp:Label ID="Label1"
runat="server" ForeColor="Red" Height="18px" Style="z-
index: 103;
left: 9px; position: absolute;
top: 102px" Text="From :" Width="62px"></asp:Label>
<asp:Label ID="Label2"
runat="server" ForeColor="Red" Height="18px" Style="z-
index: 104;
left: 9px; position: absolute;
top: 156px" Text="To :" Width="62px"></asp:Label>
&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp;<asp:AccessDataSource
ID="AccessDataSource1"
runat="server"
DataFile="~/App_Data/bus.mdb"
SelectCommand="SELECT DISTINCT
[Source] FROM [bus01]">
</asp:AccessDataSource>
<asp:AccessDataSource
ID="AccessDataSource2" runat="server"
DataFile="~/App_Data/bus.mdb"
SelectCommand="SELECT DISTINCT
[Destination] FROM [bus01]"></asp:AccessDataSource>
<br />
&nbsp; &nbsp;&nbsp;
</td>
<td style="width: 490px; height: 51px">
<asp:Image ID="Image2"
runat="server" Height="45px" ImageUrl="~/bus
images/hdfcbank.jpg"
Style="z-index: 100; left:
167px; position: absolute; top: 298px" Width="143px" />
<asp:Image ID="Image4"
runat="server" Height="61px" ImageUrl="~/bus
images/ac1.jpg"
Style="z-index: 101; left:
470px; position: absolute; top: 293px" Width="83px" />

43
<asp:Image ID="Image5"
runat="server" Height="61px" ImageUrl="~/bus
images/booking1.gif"
Style="z-index: 102; left:
311px; position: absolute; top: 15px" Width="230px" />
&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp;&nbsp;

</td>
</tr>
</table>
</div>
</asp:Content>

Reservation.aspx.cs

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

44
using System.Web.UI.HtmlControls;
using System.Data.OleDb;

public partial class NewFolder1_reservation :


System.Web.UI.Page
{

public System.Data.OleDb.OleDbConnection con = new


OleDbConnection();
public System.Data.OleDb.OleDbDataAdapter da = new
OleDbDataAdapter();
public DataSet ds = new DataSet();

protected void Page_Load(object sender, EventArgs


e)
{
openconnection();
da.SelectCommand = new OleDbCommand("select *
from bus01 where Source='" + DropDownList1.Text + "'
and Destination='" + DropDownList2.Text + "'", con);
da.Fill(ds, "bus1");

con.Close();
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void Button1_Click(object sender,
EventArgs e)
{

}
protected void openconnection()
{
con.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
MapPath("App_Data")+"\\bus.mdb";

protected void GridView1_RowCommand(object sender,


GridViewCommandEventArgs e)
{
//e.CommandArgument
}
}

45
ReservationForm.aspx.cs

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

46
public partial class NewFolder1_ReservationForm :
System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs


e)
{

TextBox5.Text =
GridView1.Rows[0].Cells[0].Text.ToString();
TextBox2.Text =
GridView1.Rows[0].Cells[4].Text.ToString();
TextBox3.Text =
GridView1.Rows[0].Cells[5].Text.ToString();

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

}
protected void Button1_Click(object sender,
EventArgs e)
{
System.Data.OleDb.OleDbConnection con = new
OleDbConnection();
System.Data.OleDb.OleDbCommand cmd = new
System.Data.OleDb.OleDbCommand();
//System.Data.OleDb.OleDbCommandBuilder cb =
new OleDbCommandBuilder();

con.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
MapPath("App_Data")+"\\bus.mdb";
con.Open();

cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "update bus01 set
Free_sheet=(Free_sheet-" +
Convert.ToInt32(TextBox4.Text) + ") where Bus_No=" +
Convert.ToInt32(TextBox5.Text);
cmd.ExecuteNonQuery();

47
Response.Redirect("~/ticket.aspx");

//System.Data.OleDb.OleDbDataAdapter dap = new


OleDbDataAdapter("select * from bus01",con);
//DataSet ds = new DataSet();
//dap.Fill(ds, "bus01");
//cb.DataAdapter = dap;
//DataRow dr = ds.Tables["bus01"].NewRow();
//dap.UpdateCommand = new OleDbCommand();
//dap.UpdateCommand.CommandText = "update bus01
set Free_sheet='" + TextBox4.Text + "' where Bus_No=" +
Convert.ToUInt32(TextBox5.Text);
//dap.UpdateCommand.Connection = con;
//dap.UpdateCommand.ExecuteNonQuery();
}
}

Rootmap.aspx

<%@ Page Language="C#" AutoEventWireup="true"


CodeFile="rootmap.aspx.cs"
Inherits="NewFolder1_rootmap"
MasterPageFile="~/MasterPage.master" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>

<asp:Content ID="id1"
ContentPlaceHolderID="ContentPlaceHolder2"
runat="server">

48
<div>
&nbsp;
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<table style="z-index: 100; left: 116px; width:
811px; position: absolute; top: 246px;
height: 1px">
<tr>
<td style="height: 72px" colspan="2">
<asp:Image ID="Image1"
runat="server" Height="88px" ImageUrl="~/bus
images/chatsupport.gif"
Style="z-index: 100; left:
10px; position: absolute; top: 2px" Width="98px" />
&nbsp;
<asp:Image ID="Image6"
runat="server" Height="145px" Style="z-index: 101;
left: 142px;
position: absolute; top: 109px"
Width="486px" BorderStyle="None" ImageUrl="~/bus
images/bus station1.jpg" />
<asp:Label ID="Label4"
runat="server" Height="29px" Style="z-index: 102; left:
144px;
position: absolute; top: 20px"
Width="372px"></asp:Label>
<asp:Label ID="Label5"
runat="server" Height="38px" Style="z-index: 104; left:
145px;
position: absolute; top: 52px"
Width="374px"></asp:Label>
</td>
<td style="width: 137px; height: 72px">

49
<asp:DropDownList
ID="DropDownList1" runat="server" Height="24px"
Style="z-index: 100;
left: 672px; position:
absolute; top: 30px" Width="126px" BackColor="Window"
ForeColor="Red" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChan
ged">
<asp:ListItem>&lt;-Click Here-
&gt;</asp:ListItem>
<asp:ListItem>Delhi
Jammu</asp:ListItem>
<asp:ListItem>Delhi
Agra</asp:ListItem>
<asp:ListItem>Delhi
Manali</asp:ListItem>
<asp:ListItem>Delhi
Shimla</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label1"
runat="server" BackColor="White" ForeColor="Red"
Height="25px" Style="font-size:
16pt; z-index: 102; left: 672px; position: absolute;
top: 7px; text-align: left"
Text="Root Map" Width="125px"></asp:Label>
</td>
</tr>
<tr>
<td style="width: 3px; height: 229px">
&nbsp; &nbsp; &nbsp;<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</td>
<td style="height: 229px" colspan="2">
&nbsp;&nbsp;
</td>
</tr>
<tr>
<td style="width: 3px; height: 11px">
</td>

50
<td style="width: 392px; height: 11px">
<asp:Image ID="Image2" runat="server"
Height="52px" ImageUrl="~/bus images/hdfcbank.jpg"
Style="z-index: 100; left:
164px; position: absolute; top: 302px" Width="147px" />
&nbsp;&nbsp;
<asp:Image ID="Image3"
runat="server" Height="54px" ImageUrl="~/bus
images/booking1.gif"
Style="z-index: 101; left:
495px; position: absolute; top: 299px" Width="209px" />

</td>
<td style="width: 137px; height: 11px">
</td>
</tr>
</table>

</div>
</asp:Content>

Roootmap.aspx.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class NewFolder1_rootmap :
System.Web.UI.Page
{
protected void
DropDownList1_SelectedIndexChanged(object sender,
EventArgs e)
{

51
if(DropDownList1.SelectedItem.Value=="Delhi
Jammu")
{
Image6.ImageUrl = "~/bus
images/delhijammu.gif";
Label4.Text = "DELHI TO JAMMU MAP";
Label5.Text = "Distance between Delhi to
Jammu 602Km";
}
if(DropDownList1.SelectedItem.Value=="Delhi
Manali")
{
Image6.ImageUrl = "~/bus
images/delhimanali.gif";
Label4.Text = "DELHI TO MANALI MAP";
Label5.Text = "Distance between Delhi to
Manali 570Km";
}
if(DropDownList1.SelectedItem.Value=="Delhi
Agra")
{
Image6.ImageUrl = "~/bus
images/delhiagra.gif";
Label4.Text = "DELHI TO AGRA MAP";
Label5.Text = "Distance between Delhi to
Agra 203Km";
}
if (DropDownList1.SelectedItem.Value == "Delhi
Shimla")
{
Image6.ImageUrl = "~/bus
images/delhishimla.gif";
Label4.Text = "DELHI TO SHIMLA MAP";
Label5.Text = "Distance between Delhi to
Shimla 370Km";
}
}
}

52
Ticket.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="ticket.aspx.cs" Inherits="ticket"
MasterPageFile="~/MasterPage.master" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content ID="id1"
ContentPlaceHolderID="ContentPlaceHolder2"
runat="server">
<div>
<asp:Label ID="Label1" runat="server" Font-
Bold="True" Font-Size="XX-Large" ForeColor="Red"
Style="z-index: 100; left: 211px; position:
absolute; top: 345px" Text="Your seat is reserved
successfully."
Width="486px"></asp:Label>

</div>
</asp:Content>

53
Ticket.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
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;

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


{
protected void Page_Load(object sender, EventArgs
e)
{

}
}

Web configuration file-


ASP.net supports the dynamic compilation of ASP.net pages.Web service, http
handlers and ASP.net application files(global.asax), source files and so on. These
files are automatically compiled on demand when first required by a Web
application.The asp.net compilation settings can be configured using the
<compilation> section in web.config or machine.config. Here the configuration
setting for this project is as:

<?xml version="1.0"?>
<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v
2.0">
<appSettings>

54
<add key="CompanyName"
value="Megasoftwares"/>
<add key="CompanyStreetAddress" value="Rohini
Sector-11"/>
<add key="CompanyCityStateZip" value="Delhi
110088"/>
<add key="EmailAddress"
value="[email protected]"/>
<add key="version" value="1.0.0"/>
<!--<add key="UserName"
value="admin"></add>-->
<!--<add key="Password"
value="admin"></add>-->
</appSettings>
<connectionStrings>

<add name="connectionstringdata"
connectionString="~/App_Data/FinanceManagement.mdb"
providerName="System.Data.OleDb"/>
</connectionStrings>
<system.web>

<authentication mode="Forms" />

<compilation debug="true">
<assemblies>
<add assembly="System.Data, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Management,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Security,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Design, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Drawing.Design,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>

55
</system.web>
</configuration>

RESULT

The project on “ONLINE BUS RESERVATION” is


successfully done. By the ASP.NET Technology, we make the project and
get as same as in the above pages in this report.

56
CONCLUSION

The architecture of the .net the way various units are linked to each
other and the way working of .net project coding is controlled make the
student realize that engineering is not just learning the structured description
and working of .net project but the greater part is of planning and proper
management. It is also used to learn new and advanced technology.
Training is not carried out into its tree sprit. It is recommended that
there should be some project specially meant for student where presence of
authorities should be ensured .
However training has proved to be quite faithful. It has allowed an
opportunity to get an exposure of the practical implement to theoretical
fundamentals.

57
58
BIBILIOGRAPHY

1. “A Text Book On .NET” – Apress


2. “A Text Book on ASP.NET” –Wrox. Publishers
 www.codeprojects.com
 www.microsoft.com

59

You might also like