Final Documentation-3
Final Documentation-3
BUS TICKET
BOOKING
SYSTEM
Submitted in the partial fulfillment of the Requirements for the award of the Degree of
Roll no:-249.
SHIVLE- 421401
MAHARASHTRA
2021-22
Date: ………………….
CERTIFICATE
This is to certify that the project entitled, “Bus Ticket Booking System”, is bonafied work of
Mansi Yogesh Patkar bearing Seat No. 249 submitted in partial fulfillment of the requirements for
the award of degree of BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY from
University of Mumbai.
ABSTRACT
Bus Ticket Booking System is a Web based application that works within a centralized
network. This project presents a review on the software program “Bus Ticket Booking System” as
should be used in a bus transportation system, a facility which is used to reserve seats, cancellation
of reservation and different types of route enquiries used on securing quick reservations. OBTRS is
built for managing and computerizing the traditional database, ticket booking and tracking bus and
travel made.
It maintains all customer details, bus details, reservation details. In order to achieve the
design, Imo Transport Company (ITC) was chosen as a case study because of its strategic
importance to Imo State. Structured Systems Analysis and Design Methodology (SSADM) was
adopted. In addition ASP .NET language was used for the front- end of the software while the back
end was designed using sql server. The software achieved is capable of improving the customer
hand and relationship management in ITC operations.
ACKNOWLEDGEMENT
They were the sources of continuous encouragement as such milestone was crossed. I like to
extend my gratitude to Dr. S M PATIL Sir our principal and Dr.Geeta Vishe Ma’am Vice
Principal of, SHANTARAMBHAU GHOLAP ARTS SCIENCE & GOTIRAMBHAU PAWAR
COMMERCE COLLEGE, SHIVLE who extended moral support, conductive work environment
and the much needed inspiration to conclude this project in time.
I take this opportunity to thank PROF.HEMANGI RANE MAM, Head of the Department
and all professors of the Department of SHANTARAM BHAU GHOLAP COLLAGE OF ARTS,
AND SCIENCE GOTIRAMBHAU PAWAR COMMERCE COLLEGE, SHIVLE for giving us an
opportunity to study in the Institution and provided the much needed guidance throughout the
duration of the course. They have provided the guidance and necessary support during each phase
of the project.
Thank You…..!
Presented By -
DECLARATION
I hereby declare that the project entitled, “BUS TICKET BOOKING SYSTEM” done at
SHANTARAMBHAU GHOLAP ARTS, SCIENCE & GOTIRAMBHAU PAWAR
COMMERCE COLLEGE, SHIVLE, has not been in any case duplicated to submit to any other
university for the award of any degree. To the best of my knowledge other than me, no one has
submitted to any other university.
The project is done in partial fulfillment of the requirements for the award of degree of
(BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY) to be submitted as final
semester project as part of our curriculum.
Table of Content
Sr no. Index
1.1 Background
1.2 Objective
1.3 Purpose
1.4 Scope
CHAPTER NO. 2 SYSTEM ANALYSIS
4.1 Code
4.2 Testing Approach
CHAPTER NO. 5 RESULTS
INTRODUCTION
Chapter 1
Introduction
Bus Ticket Booking System is a Web based application that works within a centralized
network. This project presents a review on the software program “Bus Ticket Booking System” as
should be used in a bus transportation system, a facility which is used to book seats and different
types of route enquiries used on securing quick booking.
This is the project on the online ticket booking system of “Bus Ticket Booking System”
which in most cases: the company has problems with their ticket booking and scheduling process.
Because of that, the company can provide the easier way of travelling to the customer service.
1.1 Background
I am doing the project for BUS TICKET BOOKING SYSTEM. This project intends to
solve the problem faced by the old system. This process is intended to automate the process of data
storage and data retrieval easily. The flow of project starts when a customer wants to book bus.
Electronic tickets, or e-tickets, gives evidence that their holders have the permission to enter
a place of entertainment, use a means of transportation, or have access to some Internet services.
The design of this online system will be beneficial to the company because it has not existed
before. However, Bus Ticket Booking System enables the customer to buy bus ticket, make
payment, and ask for information online easily.
Ticket activities.
Creation of a Customer id.
Assign a bus Tickets according to customer’s demand.
Advance bookings.
Seat booking.
Contact Forms.
1.3 Purpose
The solution to this problem is to create an online portal for buying bus ticket system Customer can
buy the bus ticket over the Internet, 24 hours a day, 7 Days a week and the bus ticket cannot be lost,
stolen or left behind. In addition, the online system lets the customers check the availability of the
bus ticket before they buy bus ticket.
1.4 Scope
The scope of the Bus Ticket Booking system is: - A Person should be able to
Login to the system through the first page of the application.
Change the password after logging into the system.
Able to choose the Seats which are available for a certain class.
Customer can view seat booking status graphically and select their desired seat in the bus.
This application uses SQL server as database. Thus it provides super smooth performance
and also protects data from any security threat.
SYSTEM ANALYSIS
Chapter 2
System Analysis
System Analysis
After analyzing the requirements of the task to be performed, the next step is to analyze the
problem and understand its context.
First activity in this phase is studying the existing system and other is to understand the
requirements and domain of the new system.
Both the activities are equally important, but the first activity serves as a basis of giving the
functional specifications and then successful design of the proposed system.
Understanding the properties and requirements of the new system is more difficult and requires
creative thinking and understanding of existing running system which is also difficult, improper
understanding of present system can lead diversion from solution.
Analysis Model
The model that is basically being followed is the SDLC MODEL, which states that the
phases are organized in a linear order. First of all the feasibility study is done.
The designs start after the requirement analysis is complete and the coding begins after the
design is complete. Once the programming is completed, the testing is done. In this model
the sequence of activities performed in a software development project are:-
Requirement Analysis
Project Planning
System Design
Detail Design
Coding
Unit Testing
System integration and testing
The existing Bus Booking System is not completely computerized. The customer has to visit
any booking branch if he wants to book a ticket. Bus scheduling, ticket booking, payment and many
other operations are done manually. This may lead to incorrect entries and there is a lot of room for
errors as the data is not completely synced. The availability of seats is not centrally maintained and
the travel operator is not fully aware of the availability and occupancy of the seats in his buses. This
is the major bottle neck.
Here in the Electronic bus ticketing, a detailed study of existing system is carried along
with all the steps in system analysis. An idea for creating a better project was carried and the next
steps were followed.
To avoid all these limitations and make the working more accurately the system needs to be
computerized.
BUS TICKET BOOKING SYSTEM is based on dot NET and is a major project for
students. The aim of proposed system is to develop a system of improved facilities. The proposed
system can overcome all the limitations of the existing system. The system provides proper security
and reduces the manual work. The existing system has several disadvantages and many more
BUS TICKET BOOKING SYSTEM
249-Mansi Yogesh Patkar
difficulties to work well. The system is very simple in design and to implement. The system
requires very low system resources and the system will work in almost all configurations. It has got
following features:-
Requirement analysis is a software engineering task that bridges the gap between the system
level software allocation and software design.
It enables the system engineer to specify software function and performance, indicate
software function and performance, indicate software interface with other system elements,
and establish design constraints that the software must meet.
The analysis process should move from essential information toward implementation detail.
ASP.NET is a part of Microsoft .Net platform. ASP.NET applications are compiled codes,
written using the extensible and reusable components or objects present in .Net framework. These
codes can use the entire hierarchy of classes in .Net framework.
NET is a developer platform made up of tools, programming languages, and libraries for
building many different types of applications.
Microsoft visual studio is found to be a very effective tool for developing web sites, web
applications as well as mobile applications. It provides drag and drop facility which helps to easily
design the application. It supports almost all commonly used programming language. With the help
of visual studio we can design our application and thereby instantly look whether the output is
exactly what we expected.
I will be using .net framework of Microsoft visual studio community 2017 for creating the
application. I will be developing the front end of my application using it.
Microsoft visual studio includes a code editor supporting the code completion component a s
well as code refactoring. Visual studio supports 36 different programming languages and allows the
code editor and debugger to support nearly any programming languages.
ASP.NET is used to produce interactive, data-driven web applications over the internet. It
consists of a large number of controls such as text boxes, buttons, and labels for assembling,
configuring, and manipulating code to create HTML pages.
ASP.NET web forms extend the event-driven model of interaction to the web applications.
The browser submits a web form to the web server and the server returns a full markup page or
HTML page in response.
ASP.NET is a technology, which works on the .Net framework that contains all web-related
functionalities. The .Net framework is made of an object-oriented hierarchy. An ASP.NET web
application is made of pages. When a user requests an ASP.NET page, the IIS delegates the
processing of the page to the ASP.NET runtime system.
The ASP.NET runtime transforms the .aspx page into an instance of a class, which inherits
from the base class page of the .Net framework. Therefore, each ASP.NET page is an object and all
its components i.e., the server-side controls are also objects.
A database management, or DBMS, gives the user access to their data and helps them transform
the data into information. Such database management systems include dBase, paradox, IMS, SQL
Server and SQL Server. These systems allow users to create, update and extract information from
their database.
A database is a structured collection of data. Data refers to the characteristics of people, things
and events. SQL Server stores each data item in its own fields.
Data storage is a database, which is a collection of tables with typed columns. SQL Server
supports different data types, including primitive types such
as Integer, Float, Decimal, Char (including character strings), Varchar (variable length character
strings), binary (for unstructured blobs of data), Text (for textual data) among others.
Microsoft SQL Server also allows user-defined composite types (UDTs) to be defined and
used. It also makes server statistics available as virtual tables and views Management Views or In
addition to tables, a database can also contain other objects including views, stored
procedures, indexes and constraints, along with a transaction log. A SQL Server database can
contain a maximum of objects, and can span multiple OS-level files with a maximum file size of
260 bytes (1 exabyte).The data in the database are stored in primary data files with an extension..
Secondary data files, identified with a extension, are used to allow the data of a single database to
be spread across more than one file, and optionally across more than one file system. Log files are
identified with the extension.
Storage space allocated to a database is divided into sequentially numbered pages, each
8 KB in size. A page is the basic unit of I/O for SQL Server operations. A page is marked with a
96-byte header which stores metadata about the page including the page number, page type, free
space on the page and the ID of the object that owns it. The page type defines the data contained in
the page. This data includes: data stored in the database, an index, an allocation map, which holds
information about how pages are allocated to tables and indexes; and a change map which holds
information about the changes made to other pages since last backup or logging, or contain large
data types such as image or text. While a page is the basic unit of an I/O operation, space is actually
managed in terms of an extent which consists of 8 pages. A database object can either span all 8
pages in an extent ("uniform extent") or share an extent with up to 7 more objects ("mixed extent").
A row in a database table cannot span more than one page, so is limited to 8 KB in size. However, if
the data exceeds 8 KB and the row contains varchar or varbinary data, the data in those columns
are moved to a new page (or possibly a sequence of pages, called an allocation unit) and replaced
with a pointer to the data.
Initially, customers used to book tickets manually by queuing in lines at bus stations or go to
travel agents who in turn used to book tickets for them. This was actually a tedious process and was
leading to wastage of time. It also had issues like having incorrect names or other information used
to book tickets. Disadvantages of existing system:
We can eliminate the drawbacks by developing an application which will allow customers to
register themselves and book tickets, cancel tickets or postpone or prepone travel dates with
feasibility. This actually is a welcome step for customers as they can access the application from
anywhere and will also avoid wastage of time that was caused due to the drawbacks in the previous
way of booking tickets manually.
Online ticket booking - User can book online ticket and get their e-ticket or can be able to
print.
Ticket cancellation online - If by any means user needs to cancel their booked ticket user
can cancel ticket by one click.
Bus scheduling - Operator once schedule bus for various routes, software automatically
displays routes with its details like time, departure, arrival, journey time.
Cancelled services list - Anyhow if bus operator cancel services for any routes, it will be
automatically displayed in Cancelled service page. A software requirements specification
(SRS) is a detailed explanation of a software system
going to relate with software system. The software requirement specification document dependable
of all necessary requirements required for project development
Software Requirements:
HARDWARE REQUIREMENT:-
SOFTWARE REQUIREMENT:-
SYSTEM DESIGN
Chapter 3
Module division
3.1 Basic Modules:-
User:
Here customers can purchase the ticket or reserve their seats by accessing the system as a guest
or as a member. With every purchasing or reservation the system will generate a reservation id or
purchased id for both guest and members at a time. Once the payment is done customers won’t be
able to send the request through the system to refund the payment if they want to cancel their
purchase. Customers can update their account details as for example: contact number, email
address, mail address etc. If the customers is not registered members then the system will not have
any account for the guest to update at any time they want. So the information as for example name,
address, contact, and email they will provide while reservation need to make sure they don’t change
for any reasons. Registered Customers are able to cancel their booking although there will be no
refund.
Login
Register
Bus info
Ticket
Payment
Logout
By defining the entities, their attributes, and showing the relationships between them, an ER
diagram illustrates the logical structure of databases.
ER diagrams are used to sketch out the design of a database. These are three basic elements in ER
models:
Relationships: Relationship provides the structure needed to draw the information from
multiple entities.
INTRODUCTION:
The focus of activity modelling is the sequence and conditions for coordinating lower -level
behaviors, rather than which classifiers own those behaviors.
These are commonly called control flow and object flow models.
The behaviors coordinated by these models can be initiated because other behaviors finish
executing, because objects and data become available, or because events occur external to the flow.
ForUserLogin:-
INTRODUCTION:
USE CASE DIAGRAM is an expression of relations between the use cases in a specific
system or object and the external actors. Use Case expresses the functions of the system and how the
system functions interact with the external actors.
Level 0:-
Level 1:-
Level 3:-
o Upper section: Contains the name of the class. This section is always required, whether you
are talking about the classifier or an object.
o Middle section: Contains the attributes of the class. Use this section to describe the qualities
of the class. This is only required when describing a specific instance of a class.
o Bottom section: Includes class operations (methods). Displayed in list format, each
operation takes up its own line. The operations describe how a class interacts with data.
IMPLEMENTATION
AND TESTING
Chapter 4
Implementation & Testing
4.1 Code
Once the design is complete, most of the major decisions about the system have been made.
The goal of the coding phase is to translate the design of the system into code in a given
programming language. For a given design, the aim of this phase is to implement the design in the
best possible manner. The coding phase affects both testing and maintenance profoundly.
A well written code reduces the testing and maintenance effort. Since the testing and
maintenance cost of software are much higher than the coding cost, the goal of coding should be to
reduce the testing and maintenance effort. Hence, during coding the focus should be on developing
programs that are easy to write. Simplicity and clarity should be strived for, during the coding
phase.An important concept that helps the understandability of programs is structured programming.
The goal of structured programming is to arrange the control flow in the program. That is, program
text should be organized as a sequence of statements, and during execution, the statements are
executed in the sequence in the program.For structured programming, a few single-entry-single-exit
constructs should be used.
These constructs includes selection (if-then-else), and iteration (while - do, repeat - until etc).
With these constructs it is possible to construct a program as sequence of single - entry - single - exit
constructs. There are many methods available for verifying the code. Some methods are static in
nature that is, that is they do not involve execution of the code. Examples of such methods are data
flow analysis, code reading, code reviews, testing (a method that involves executing the code, which
is used very heavily). In the coding phase, the entire system is not tested together. Rather, the
different modules are tested separately.
This testing of modules is called "unit testing". Consequently, this phase is often referred to
as "coding and unit testing". The output of this phase is the verified and unit tested code of the
different modules.
Software Development Life Cycle (SDLC) is a process used by the software industry to design,
develop and test high quality software’s. The SDLC aims to produce a high-quality software that
meets or exceeds customer expectations, reaches completion within times and cost estimates.
Planning
Requirement analysis is the most important and fundamental stage in SDLC. It is performed by
the senior members of the team with inputs from the customer, the sales department, market surveys
and domain experts in the industry. This information is then used to plan the basic project approach
and to conduct product feasibility study in the economical, operational and technical areas.
Planning for the quality assurance requirements and identification of the risks associated with
the project is also done in the planning stage. The outcome of the technical feasibility study is to
define the various technical approaches that can be followed to implement the project successfully
with minimum risks.
Defining
Once the requirement analysis is done the next step is to clearly define and document the product
requirements and get them approved from the customer or the market analysts. This is done through
an SRS (Software Requirement Specification) document which consists of all the product
requirements to be designed and developed during the project life cycle.
Designing SRS is the reference for product architects to come out with the best architecture for
the product to be developed. Based on the requirements specified in SRS, usually more than one
design approach for the product architecture is proposed and documented in a DDS - Design
Document Specification.
This DDS is reviewed by all the important stakeholders and based on various parameters as risk
assessment, product robustness, design modularity, budget and time constraints, the best design
approach is selected for the product.
Building
In this stage of SDLC the actual development starts and the product is built. The programming
code is generated as per DDS during this stage. If the design is performed in a detailed and
organized manner, code generation can be accomplished without much hassle.
Developers must follow the coding guidelines defined by their organization and programming
tools like compilers, interpreters, debuggers, etc. are used to generate the code. Different high level
programming languages such as C, C++, Pascal, Java and PHP are used for coding. The
programming language is chosen with respect to the type of software being developed.
Testing
This stage is usually a subset of all the stages as in the modern SDLC models, the testing activities
are mostly involved in all the stages of SDLC. However, this stage refers to the testing only stage of
the product where product defects are reported, tracked, fixed and retested, until the product reaches
the quality standards defined in the SRS.
Deployment
Once the product is tested and ready to be deployed it is released formally in the appropriate
market. Sometimes product deployment happens in stages as per the business strategy of that
organization. The product may first be released in a limited segment and tested in the real business
environment (UAT- User acceptance testing).
Then based on the feedback, the product may be released as it is or with suggested
enhancements in the targeting market segment. After the product is released in the market, its
maintenance is done for the existing customer base.
Test Approach: A test approach is the test strategy implementation of a project, defines how
testing would be carried out. Test approach has two techniques: Proactive - An approach in which
the test designs process is initiated as early as possible in order to find and fix the defects before the
build is created Different Test approaches:
There are many strategies that a project can adopt depending on the context and some of them are:
Factors to be considered:-
In object-oriented programming, the smallest unit is a method, which may belong to a base/
super class, abstract class or derived/ child class. (Some treat a module of an application as a
unit. This is to be discouraged as there will probably be many individual units within that
module.) Unit testing frameworks, drivers, stubs, and mock/ fake objects are used to assist in
unit testing.
System Testing
Once source code has been generated, software must be tested to uncover (and correct) as
many errors as possible before delivery to customer. Our goal is to design a series of test cases
that have a high likelihood of finding errors. To uncover the errors software techniques are used.
These techniques provide systematic guidance for designing test that
(2) Exercise the input and output domains of the program to uncover errors in program
function, behavior and performance.
System Integration:
The main reason for organizations to use system integration is their need to improve
productivity and quality of their operations. The goal is to get the organizations
RESULTS
HOME PAGE:
LOGIN PAGE:-
Code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=LAPTOP-TLUMM63A\SQL;Initial
Catalog=buswebsite;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("select*from register Where uname='" +
TextBox1.Text + "'and pass='" + TextBox2.Text + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Response.Redirect("TicketBooking.aspx");
}
else
{
Response.Write("<script> alert('Please enter valid username and password')</script>");
}
}
}
REGISTRATION PAGE:-
Code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
cmd.Parameters.AddWithValue("@pass", TextBox7.Text);
cmd.Parameters.AddWithValue("@cpass", TextBox8.Text);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
GridView1.DataBind();
}
}
Response.Redirect("Login.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
string query = "UPDATE register SET
cname=@cname,cadd=@cadd,cnumber=@cnumber,email=@email,uname=@uname,pass=@pass,c
pass=@cpass WHERE cid=@cid";
string constr =
ConfigurationManager.ConnectionStrings["buswebsiteConnectionString"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand(query))
{
cmd.Parameters.AddWithValue("@cid", TextBox1.Text);
cmd.Parameters.AddWithValue("@cname", TextBox2.Text);
cmd.Parameters.AddWithValue("@cadd", TextBox3.Text);
cmd.Parameters.AddWithValue("@cnumber", TextBox4.Text);
cmd.Parameters.AddWithValue("@email", TextBox5.Text);
cmd.Parameters.AddWithValue("@uname", TextBox6.Text);
cmd.Parameters.AddWithValue("@pass", TextBox7.Text);
cmd.Parameters.AddWithValue("@cpass", TextBox8.Text);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
GridView1.DataBind();
}
}
}
protected void Button3_Click(object sender, EventArgs e)
{
string query = "DELETE FROM register WHERE cid=@cid";
string constr =
ConfigurationManager.ConnectionStrings["buswebsiteConnectionString"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand(query))
{
cmd.Parameters.AddWithValue("@cid", TextBox1.Text);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
GridView1.DataBind();
}
}
}
protected void Button4_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=LAPTOP-TLUMM63A\SQL;Initial
Catalog=buswebsite;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("select * from register Where uname='" +
TextBox1.Text + "'and pass='" + TextBox2.Text + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Response.Redirect("TicketBooking.aspx");
}
else
{
Response.Write("<script> alert('Please enter valid username and password')</script>");
}
}
}
TICKET BOOKING:-
Code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Calendar1.SelectedDate > Calendar1.TodaysDate)
{
Label5.Text = TextBox1.Text + "<br>" + TextBox2.Text + "<br>" + TextBox3.Text +
"<br>Tickets Booked for" + Calendar1.SelectedDate.ToShortDateString();
}
else
{
Label5.Text = "Sorry! Ticket not available";
}
Response.Redirect("Seatbooking.aspx");
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox4.Text = Calendar1.SelectedDate.ToLongDateString();
}
}
SEAT BOOKING:-
Code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
alreadybooked();
}
}
private void alreadybooked()
{
string mycon = @"Data Source=LAPTOP-TLUMM63A\SQL;Initial
Catalog=buswebsite;Integrated Security=True";
string myquery = "Select * from Seatstatus";
SqlConnection con = new SqlConnection(mycon);
SqlCommand cmd = new SqlCommand();
cmd.CommandText = myquery;
cmd.Connection = con;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
int rows = ds.Tables[0].Rows.Count;
int i = 0;
while (i < rows)
{
string status;
status = ds.Tables[0].Rows[i]["status"].ToString();
if (status == "B")
{
bookedseat[i] = 1;
if (i == 0)
{
Button1.BackColor = System.Drawing.Color.Red;
Button1.Enabled = false;
}
if (i == 1)
{
Button2.BackColor = System.Drawing.Color.Red;
Button2.Enabled = false;
}
if (i == 2)
{
Button3.BackColor = System.Drawing.Color.Red;
Button3.Enabled = false;
}
if (i == 3)
{
Button4.BackColor = System.Drawing.Color.Red;
Button4.Enabled = false;
}
if (i == 4)
{
Button5.BackColor = System.Drawing.Color.Red;
Button5.Enabled = false;
}
if (i == 5)
{
Button6.BackColor = System.Drawing.Color.Red;
Button6.Enabled = false;
}
if (i == 6)
{
Button7.BackColor = System.Drawing.Color.Red;
Button7.Enabled = false;
}
if (i == 7)
{
Button8.BackColor = System.Drawing.Color.Red;
Button8.Enabled = false;
}
if (i == 8)
{
Button9.BackColor = System.Drawing.Color.Red;
Button9.Enabled = false;
}
if (i == 9)
{
Button10.BackColor = System.Drawing.Color.Red;
Button10.Enabled = false;
}
if (i == 10)
{
Button11.BackColor = System.Drawing.Color.Red;
Button11.Enabled = false;
}
if (i == 11)
{
Button12.BackColor = System.Drawing.Color.Red;
Button12.Enabled = false;
}
if (i == 12)
{
Button13.BackColor = System.Drawing.Color.Red;
Button13.Enabled = false;
}
if (i == 13)
{
Button14.BackColor = System.Drawing.Color.Red;
Button14.Enabled = false;
}
if (i == 14)
{
Button15.BackColor = System.Drawing.Color.Red;
Button15.Enabled = false;
}
if (i == 15)
{
Button16.BackColor = System.Drawing.Color.Red;
Button16.Enabled = false;
}
if (i == 16)
{
Button17.BackColor = System.Drawing.Color.Red;
Button17.Enabled = false;
}
if (i == 17)
{
Button18.BackColor = System.Drawing.Color.Red;
Button18.Enabled = false;
}
if (i == 18)
{
Button19.BackColor = System.Drawing.Color.Red;
Button19.Enabled = false;
}
if (i == 19)
{
Button20.BackColor = System.Drawing.Color.Red;
Button20.Enabled = false;
}
if (i == 20)
{
Button21.BackColor = System.Drawing.Color.Red;
Button21.Enabled = false;
}
if (i == 21)
{
Button22.BackColor = System.Drawing.Color.Red;
Button22.Enabled = false;
}
if (i == 22)
{
Button23.BackColor = System.Drawing.Color.Red;
Button23.Enabled = false;
}
if (i == 23)
{
Button24.BackColor = System.Drawing.Color.Red;
Button24.Enabled = false;
}
if (i == 24)
{
Button25.BackColor = System.Drawing.Color.Red;
Button25.Enabled = false;
}
}
if (status == "A")
{
bookedseat[i] = 0;
if (i == 0)
{
Button1.BackColor = System.Drawing.Color.Gray;
}
if (i == 1)
{
Button2.BackColor = System.Drawing.Color.Gray;
}
if (i == 2)
{
Button3.BackColor = System.Drawing.Color.Gray;
}
if (i == 3)
{
Button4.BackColor = System.Drawing.Color.Gray;
}
if (i == 4)
{
Button5.BackColor = System.Drawing.Color.Gray;
}
if (i == 5)
{
Button6.BackColor = System.Drawing.Color.Gray;
}
if (i == 6)
{
Button7.BackColor = System.Drawing.Color.Gray;
}
if (i == 7)
{
Button8.BackColor = System.Drawing.Color.Gray;
}
if (i == 8)
{
Button9.BackColor = System.Drawing.Color.Gray;
}
if (i == 9)
{
Button10.BackColor = System.Drawing.Color.Gray;
}
if (i == 10)
{
Button11.BackColor = System.Drawing.Color.Gray;
}
if (i == 11)
{
Button12.BackColor = System.Drawing.Color.Gray;
}
if (i == 12)
{
Button13.BackColor = System.Drawing.Color.Gray;
}
if (i == 13)
{
Button14.BackColor = System.Drawing.Color.Gray;
}
if (i == 14)
{
Button15.BackColor = System.Drawing.Color.Gray;
}
if (i == 15)
{
Button16.BackColor = System.Drawing.Color.Gray;
}
if (i == 16)
{
Button17.BackColor = System.Drawing.Color.Gray;
}
if (i == 17)
{
Button18.BackColor = System.Drawing.Color.Gray;
}
if (i == 18)
{
Button19.BackColor = System.Drawing.Color.Gray;
}
if (i == 19)
{
Button20.BackColor = System.Drawing.Color.Gray;
}
if (i == 20)
{
Button21.BackColor = System.Drawing.Color.Gray;
}
if (i == 21)
{
Button22.BackColor = System.Drawing.Color.Gray;
}
if (i == 22)
{
Button23.BackColor = System.Drawing.Color.Gray;
}
if (i == 23)
{
Button24.BackColor = System.Drawing.Color.Gray;
}
if (i == 24)
{
Button25.BackColor = System.Drawing.Color.Gray;
}
}
i++;
}
}
protected void Button26_Click(object sender, EventArgs e)
{
int i = 0;
for (i = 0; i < 25; i++)
{
if (tempbookseat[i] == 1)
{
string mycon = @"Data Source=.\SQL;Initial Catalog=buswebsite;Integrated
Security=True";
string updatedata = "Update SeatStatus set status='B' Where seatno=" + (i + 1);
SqlConnection con = new SqlConnection(mycon);
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = updatedata;
cmd.Connection = con;
cmd.ExecuteNonQuery();
con.Close();
}
}
Session["tempbooking"] = tempbookseat;
Response.Redirect("Thanks.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
if (tempbookseat[0] == 0)
{
Button1.BackColor = System.Drawing.Color.Green;
tempbookseat[0] = 1;
}
else
{
Button1.BackColor = System.Drawing.Color.Gray;
tempbookseat[0] = 0;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
if (tempbookseat[1] == 0)
{
Button2.BackColor = System.Drawing.Color.Green;
tempbookseat[1] = 1;
}
else
{
Button2.BackColor = System.Drawing.Color.Gray;
tempbookseat[1] = 0;
}
}
protected void Button3_Click(object sender, EventArgs e)
{
if (tempbookseat[2] == 0)
{
Button3.BackColor = System.Drawing.Color.Green;
tempbookseat[2] = 1;
}
else
{
Button3.BackColor = System.Drawing.Color.Gray;
tempbookseat[2] = 0;
}
}
protected void Button4_Click(object sender, EventArgs e)
{
if (tempbookseat[3] == 0)
{
Button4.BackColor = System.Drawing.Color.Green;
tempbookseat[3] = 1;
}
else
{
Button4.BackColor = System.Drawing.Color.Gray;
tempbookseat[3] = 0;
}
}
protected void Button5_Click(object sender, EventArgs e)
{
if (tempbookseat[4] == 0)
{
Button5.BackColor = System.Drawing.Color.Green;
tempbookseat[4] = 1;
}
else
{
Button5.BackColor = System.Drawing.Color.Gray;
tempbookseat[4] = 0;
}
}
protected void Button6_Click(object sender, EventArgs e)
{
if (tempbookseat[5] == 0)
{
Button6.BackColor = System.Drawing.Color.Green;
tempbookseat[5] = 1;
}
else
{
Button6.BackColor = System.Drawing.Color.Gray;
tempbookseat[5] = 0;
}
}
protected void Button7_Click(object sender, EventArgs e)
{
if (tempbookseat[6] == 0)
{
Button7.BackColor = System.Drawing.Color.Green;
tempbookseat[6] = 1;
}
else
{
Button7.BackColor = System.Drawing.Color.Gray;
tempbookseat[6] = 0;
}
}
protected void Button8_Click(object sender, EventArgs e)
{
if (tempbookseat[7] == 0)
{
Button8.BackColor = System.Drawing.Color.Green;
tempbookseat[7] = 1;
}
else
{
Button8.BackColor = System.Drawing.Color.Gray;
tempbookseat[7] = 0;
}
}
protected void Button9_Click(object sender, EventArgs e)
{
if (tempbookseat[8] == 0)
{
Button9.BackColor = System.Drawing.Color.Green;
tempbookseat[8] = 1;
}
else
{
Button9.BackColor = System.Drawing.Color.Gray;
tempbookseat[8] = 0;
}
}
protected void Button10_Click(object sender, EventArgs e)
{
if (tempbookseat[9] == 0)
{
Button10.BackColor = System.Drawing.Color.Green;
tempbookseat[9] = 1;
}
else
{
Button10.BackColor = System.Drawing.Color.Gray;
tempbookseat[9] = 0;
}
}
protected void Button11_Click(object sender, EventArgs e)
{
if (tempbookseat[10] == 0)
{
Button11.BackColor = System.Drawing.Color.Green;
tempbookseat[10] = 1;
}
else
{
Button11.BackColor = System.Drawing.Color.Gray;
tempbookseat[10] = 0;
}
}
protected void Button12_Click(object sender, EventArgs e)
{
if (tempbookseat[11] == 0)
{
Button12.BackColor = System.Drawing.Color.Green;
tempbookseat[11] = 1;
}
else
{
Button12.BackColor = System.Drawing.Color.Gray;
tempbookseat[11] = 0;
}
}
protected void Button13_Click(object sender, EventArgs e)
{
if (tempbookseat[12] == 0)
{
Button13.BackColor = System.Drawing.Color.Green;
tempbookseat[12] = 1;
}
else
{
Button13.BackColor = System.Drawing.Color.Gray;
tempbookseat[12] = 0;
}
}
protected void Button14_Click(object sender, EventArgs e)
{
if (tempbookseat[13] == 0)
{
Button14.BackColor = System.Drawing.Color.Green;
tempbookseat[13] = 1;
}
else
{
Button14.BackColor = System.Drawing.Color.Gray;
tempbookseat[13] = 0;
}
}
else
{
Button17.BackColor = System.Drawing.Color.Gray;
tempbookseat[16] = 0;
}
}
protected void Button18_Click(object sender, EventArgs e)
{
if (tempbookseat[17] == 0)
{
Button18.BackColor = System.Drawing.Color.Green;
tempbookseat[17] = 1;
}
else
{
Button18.BackColor = System.Drawing.Color.Gray;
tempbookseat[17] = 0;
}
}
protected void Button19_Click(object sender, EventArgs e)
{
if (tempbookseat[18] == 0)
{
Button19.BackColor = System.Drawing.Color.Green;
tempbookseat[18] = 1;
}
else
{
Button19.BackColor = System.Drawing.Color.Gray;
tempbookseat[18] = 0;
}
}
protected void Button20_Click(object sender, EventArgs e)
{
if (tempbookseat[19] == 0)
{
Button20.BackColor = System.Drawing.Color.Green;
tempbookseat[19] = 1;
}
else
{
Button20.BackColor = System.Drawing.Color.Gray;
tempbookseat[19] = 0;
}
}
protected void Button21_Click(object sender, EventArgs e)
{
if (tempbookseat[20] == 0)
{
Button21.BackColor = System.Drawing.Color.Green;
tempbookseat[20] = 1;
}
else
{
Button21.BackColor = System.Drawing.Color.Gray;
tempbookseat[20] = 0;
}
}
protected void Button22_Click(object sender, EventArgs e)
{
if (tempbookseat[21] == 0)
{
Button22.BackColor = System.Drawing.Color.Green;
tempbookseat[21] = 1;
}
else
{
Button22.BackColor = System.Drawing.Color.Gray;
tempbookseat[21] = 0;
}
}
protected void Button23_Click(object sender, EventArgs e)
{
if (tempbookseat[22] == 0)
{
Button23.BackColor = System.Drawing.Color.Green;
tempbookseat[22] = 1;
}
else
{
Button23.BackColor = System.Drawing.Color.Gray;
tempbookseat[22] = 0;
}
}
protected void Button24_Click(object sender, EventArgs e)
{
if (tempbookseat[23] == 0)
{
Button24.BackColor = System.Drawing.Color.Green;
tempbookseat[23] = 1;
}
else
{
Button24.BackColor = System.Drawing.Color.Gray;
tempbookseat[23] = 0;
}
}
protected void Button25_Click(object sender, EventArgs e)
{
if (tempbookseat[24] == 0)
{
Button25.BackColor = System.Drawing.Color.Green;
tempbookseat[24] = 1;
}
else
{
Button25.BackColor = System.Drawing.Color.Gray;
tempbookseat[24] = 0;
}
}
}
BUSES:-
PAYMENT:-
Code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void Button2_Click(object sender, EventArgs e)
{
Random r = new Random();
int num = r.Next();
TextBox2.Text = num.ToString();
}
protected void Button3_Click(object sender, EventArgs e)
{
TextBox2.Text = TextBox1.Text;
Label1.Text = "SuccessFully Verify OTP";
}
}
CONCLUSION
CONCLUSION
It can be observed that computer applications are very important in every field of human
endeavour. Here all the information about customer that made reservation can be gotten just by
clicking a button with this new system, some of the difficulties encountered with the manual
system are overcome. It will also reduce the workload of the staff, reduce the time used for making
reservation at the bus terminal and also increase efficiency. The application also has the ability to
update records in various files automatically thereby relieving the company’s staff the stress of
working from file security of data. This project, as a whole, will give a new way in bus reservations
and ticketing processes. The automation and management of seats and reservations will be done
online. However, this project does not limit the walk-in passengers that is that is that is
passengers who visit the company’s counter because it also caters for them. This also lessens the use
of papers like in the traditional way of ticketing.
REFERANCE
REFERANCE:-
These projects was impossible to be a success without the support and help from the
experience guide at company, the books and mainly the Internet really prove it for us the
“Information Highway”. Everything was really easy to find out on the Internet
Book reference-
WEBSITES:
https://www.w3schools.com/
https://youtu.be/oJ9iTFF5FDs
https://youtu.be/PX3arEQ9ru8
https://www.makemytrip.com/bus-tickets/