e Car Rental System Documentation
-
Upload
sauravkumar -
Category
Documents
-
view
255 -
download
5
Transcript of e Car Rental System Documentation
-
8/17/2019 e Car Rental System Documentation
1/77
-
8/17/2019 e Car Rental System Documentation
2/77
GROUP MEMBERS
SOURAV KUMAR , WEST BENGAL UNIVERSITY OFTECHNOLOGY
ARNAB CHATTERJEE ,GOVT COLLEGE OF ENGINEERING &CERAMIC TECHNOLOGY
MANOJ MALLICK, GOVT COLLEGE OF ENGINEERING & LEATHER TECHNOLOGY
ALIF HIRAT MALLICK ,GOVT COLLEGE OF ENGINEERING &LEATHER TECHNOLOGY
-
8/17/2019 e Car Rental System Documentation
3/77
-
8/17/2019 e Car Rental System Documentation
4/77
-
8/17/2019 e Car Rental System Documentation
5/77
-
8/17/2019 e Car Rental System Documentation
6/77
ACKNOWLEDGEMENT
I TAKE THIS OPPORTUNITY TO EXPRESS MY PROFOUND GRATITUDE AND DEEP REGARDS TO
MY FACULTY MR. KOUSHIK GHOSH FOR HIS EXEMPLARY GUIDANCE,MONITARING AND
CONSTANT ENCOURAGEMENT THROUGH OUT THE COURSE OF THIS PROJECT . THE
BLESSING , HELP AND GIDENCE GIVEN BY HIM TO TIME SHALL CARRY ME A LONG WAY IN THE
JOURNY OF LIFE WHICH I AM ABOUT TO EMBARK .
I AM OBLIZED TO MY PROJECTING MEMBERS FOR THE VALUABLE IMFORMATION
PROVIDED BY THEM IN THEIR RESPECTIVE FIELDS.I AM GRATEFUL FOR THEIR CO-OPERATION
DURING THE PERIOD OF MY ASSIGMENT .
SAURAV KUMAR
-
8/17/2019 e Car Rental System Documentation
7/77
PROJECT OBJECTIVE
It is a system design especially for car
rental business (hire) with a fleet of large,
premium and small cars.
The car rental system provides complete
functionality of booking car as per hirer’s
need.
Facilitating the hirer with cut edgetechnology for instant hiring with exact
location provided by the hirer.
-
8/17/2019 e Car Rental System Documentation
8/77
PROJECT SCOPE
The web application provides the admin a 24X7
observation on the hirer and driver.
The hirer can book or search for a cab from our
web portal 24X7 among the category of their
favorite car along with the specific location and
fare . A driver can be recruited by their CV and
experience.
A guest to the web portal may submit a query.
-
8/17/2019 e Car Rental System Documentation
9/77
Requirement Specification
Domain Description
• ADMIN
• HIRER
•
DRIVER
PROBLEM DEFINATION
•
To book a cab in a hurry andwhen it is needed.
• Now a days a hirer is facing the
problem to travel by rapid refusal
from the drivers.
• This problem should be solved to
save time, needless negotiation
and accurate fare.
-
8/17/2019 e Car Rental System Documentation
10/77
Functional Requirements
• Admin :
Admin can add a car, manage booking car and rent and
also view feedback and
enquiry.
• Hirer/User :
User can view information of available car, booking car,
easily get the car on rent and also give feedback and can
enquiry.
8
-
8/17/2019 e Car Rental System Documentation
11/77
USERS & THEIR CORRESPONDING REQUIREMENTS (Abstract View) :
Owners point of view :
1.
Log in using an system generated username and
password.
2.
Add the Car.
3.
List of the Car in categories.
4.
Type of Car.
5.
Date of the journey .6.
Time involved for a booked Car.
7. At a instance of time the no of cars in the garage.
8.
Updating of Cars
a)
If faulty car then eliminate it.
b) New cars are bought and added.
9.
Hirer’s details.
10. Driver’s details.
11.
The estimated bill generation and provided to driver
and hirer .
12. New driver recruitment.
9
-
8/17/2019 e Car Rental System Documentation
12/77
Hirer’s point of view :
1.
Registration or sign up .
2.
Log in .
3.
Types of Car.
4.
Date & Time .
5.
Mileage.
6.
AC/NON AC.
7.
Driver assignment to each car.
8.
Comfort level
9. Rate per K.M
10. Destination and Source Cities .
11. Any type of discount offered by the Company .
12. An estimated bill will be generated at the booking time.
13. Return journey or not .
-
8/17/2019 e Car Rental System Documentation
13/77
Detail Analysis Of Requirements
Hirer’s Point Of View
The User Interface part or the front end of the application is for
the owner & hirer being the main part of this project, all the
profit are depending upon them. The project will go on if theyare satisfied by the friendly interface. So, it’s the designer’s or
analysis responsibility to provide an interface that makes the
application too easy to go anywhere he/she to go. So, from the
user’s point of view they might want the topic following
The hirers can see two options login and sign up.
In case of sign up :-
They have to fill up the details form,
Name:
Date of birth:
Contact:
Voter ID/Pan card no./Adhar card no.:
Address:
Email-ID:
User name:Password:
-
8/17/2019 e Car Rental System Documentation
14/77
In case of login:-
In the sign up / registration been done they can
login to the home page by putting their user ID, password and
also their Voter ID/Pan card no./Adhar card no( what he puts
during the registration) to book a cab. The information will be
sent to the admin to store the basics.
The hirer will see the followings as the front end :
A) Type of car:
The hirer will provided with three category of car
a)
SUV:
A sports utility vehicle, or suburban utility vehicle
(SUV), is a vehicle similar to a station wagon, estate
car, or van usually equipped with four-wheel drivefor on-road or off-road ability. Some SUV's include
the towing capacity of a pickup truck with the
passenger-carrying space of a minivan or large
sedan.
-
8/17/2019 e Car Rental System Documentation
15/77
b) SEDAN:
A sedan is a passenger car in a three-box
configuration with A, B & C-pillars and principal
volumes articulated in separate compartments for
engine, passenger and cargo. The passenger
compartment features two rows of seats and
adequate passenger space in the rear
compartment for adult passengers. The cargo
compartment is typically in the rear.
c)
Small car:
A small car is a car have four seats and equipped
with four wheel drive for a short distance. Hirers can
use this car for business or personal purpose . Its also
comes with AC/Non AC.
B)
Date & Time :
The hirers can book the cab at a certain date and time.
The requested cab will be gotten after the approval ofowner.
-
8/17/2019 e Car Rental System Documentation
16/77
C) City & Location:
The database provides the user the location as soon as
they chose the city. This makes the hirer to choose any
location in a particular city at ease. It is saved as a home
town.
D)
Pick up and end location :
The location is randomly generated in the page as soon
as he/she chooses the city.
E)
Other Information :
Whether the hirer is interested in AC or Non AC, What is
the charge/km for the schemas had been chosen. As
soon as the hirer provides what kind of car he/she needs,
the information will go as a request in the server and the
server responds that the car is available or not.
F) Driver’s details:
After the approval has been done for the requested cab
the hirer will be provided the car no.,the name of the driver
and the contact no of the driver.
-
8/17/2019 e Car Rental System Documentation
17/77
G)
Estimated charge :
The hirer can also see the charge for the travel on the
basis of the type of cab, travelling distance , AC or Non
AC.this estimated charge is an assumption by the system
by the default values provided to it and it may vary.
H)
Cancellation:
In this case the hirer can cancel his cab booking for the
few reasons- (1) mistook on putting information of
journey, (2) the fare is no fair, (3) the cab will be late to
come.
I)
The mode of payment:
Hirer has to chose the payment method in the time of
booking the cab . until the payment method is selected
the booking will not be approved
Cash: It’s the offline payment method.
This is paid to the driver after the end of
the jouney.
-
8/17/2019 e Car Rental System Documentation
18/77
J) Query:
The hirer will be provided a form to feedback on the basis
of the behavior of the driver, the fare is taken, the
conformability provided by the company. The form will
be submitted after giving the feedback.
E.g. there will be 5 stars and hirer select 1 to 5 stars to
make the owner know about the progress.
Administrator’s point of view
The another part of the user interface provided by the software
is Administrator’s point of view. Owner should so be able the
track of all activities such that the system goes well. Owner
should keep the track of the cars, the driver details, the hirersdetails and many others.
A) login :
The owner will be provided with a personalized
interface where the owner can get into the details of his
company (ref. the car, the hirer and driver).But to get
there he would have to enter his credentials into the login
page. These credential would be allocated to him by thesystem.
-
8/17/2019 e Car Rental System Documentation
19/77
B) Car details:
Owner has to mention the details of the car of his
company
a)
At the start of the month the company will by
cars as per requirement concern
b)
How many cars in the garage ?
c)
How many are of SUV/SEDAN/SMALL CAR ?
d)
If there is any damage car, sort it out.
e)
Owner will be provided the car name ,registration
no as a database.
f) How many are an AC and ON AC?
g)
If a car is book for a day or for a while then owner
will disappear the car from the list such that thecan is no longer available for the hirer.
C) Hirer details :
a)
After the registration phase of the hirer the
database of the owner named client will be
updated .
b)
The feedback from the driver over the hirer willbe sent to owner such that owner can take
the proper step
e.g: a bad feedback will make the registration
of the hirer cancelled
-
8/17/2019 e Car Rental System Documentation
20/77
D) Driver :
a)
The driver database (name, date of birth,
driving license no, driver-ID, no of trips )
b)
Every driver will be registered with a specific
car. The owner will decide.
c)
In the each tripe the driver will update with the
distance traversed.
d)
Recruitment facility:
The footer area of website will display the
recruitment notice of new drivers. Aspirants
may apply by clicking on the link and by
uploading their Bio-data in the subsequent
stage. Admin would be able to observe these
bio-data and may select suitable candidates.
E) Bill generation :
The driver or the hirer will sent the starting k.m.
At the and of the journey the driver or the hirer
will provide the ending K.M. The owner will
calculate the faire on the basis of distance
traverse, the type f the car , AC or Non AC. the
e-bill will be generated and sent to the driver
and the hirer both the hirer will do the rest.
F)
View Query :
The admin easily view the feedbacks and solve the
query.
-
8/17/2019 e Car Rental System Documentation
21/77
Hardware and Software
Requirement
HARDWARE REQUIREMENTS
compartment for adult passengers. The cargo compartment is
typically
Client side:
RAM 512 MB
Hard disk 10 GB
Processor 1.0 GHz
Server side:
RAM 1 GB
Hard disk 20 GB
Processor 2.0 GHz
-
8/17/2019 e Car Rental System Documentation
22/77
SOFTWARE REQUIREMENTS
Client side:
Web Browser Internet Explorer 6 or
any compatible
Operating System Windows or any
Server side:
Web Server IIS 7.5
Framework .NET 4.5 with C#
Database Server MS SQL Server 2014
Web Browser Internet Explorer 6
or any compatible
Operating System Windows Server 2007
-
8/17/2019 e Car Rental System Documentation
23/77
Database Design
Database table schema
>>passenger:
>>car
>>category
-
8/17/2019 e Car Rental System Documentation
24/77
>>Booking
>>Driver:
-
8/17/2019 e Car Rental System Documentation
25/77
Application Work Flow:
-
8/17/2019 e Car Rental System Documentation
26/77
SCREENSHOTS OF WEB-PORTAL
WELOCOME.aspx
REGISTER.aspx
-
8/17/2019 e Car Rental System Documentation
27/77
LOGIN.aspx
CONTACT_US.aspx
-
8/17/2019 e Car Rental System Documentation
28/77
PRIVACY.aspx
APPLY_RECRUITMENT.aspx
-
8/17/2019 e Car Rental System Documentation
29/77
ADMIN_INTERFACE.aspx
ADD_CAR.aspx
-
8/17/2019 e Car Rental System Documentation
30/77
CAR_MANAGEMENT.aspx
ADD_CATAGORY.aspx
-
8/17/2019 e Car Rental System Documentation
31/77
ADD_CATAGORY.aspx
DRIVER_MANAGEMENT.aspx
-
8/17/2019 e Car Rental System Documentation
32/77
BOOKING_MANAGEMENT.aspx
BILLING_MANAGEMENT.aspx
-
8/17/2019 e Car Rental System Documentation
33/77
USER_MANAGEMENT.aspx
APPLY_RECRUITMENT.aspx
-
8/17/2019 e Car Rental System Documentation
34/77
VIEW_PROFILE.aspx
HIRER_INTERFACE.aspx
-
8/17/2019 e Car Rental System Documentation
35/77
SEARCH.aspx
BOOKING_HISTORY.aspx
-
8/17/2019 e Car Rental System Documentation
36/77
Future Scope:
1. Make our web-page much attractive to both the Admin and the
Hirer , Here we have to use CSS, HTML and XHTML properly.
2. Here we have not given the feature in case of the hirer or admin
forgets the password of his/her account.
3. We have decided to include more features of cars that a hirer
can choose the best compatible with him/her.
4.
The admin will be provided much control power to handle boththe driver and hirer.
5. In future each driver will be provided with a new account.
6. The driver and hirer should have better knowledge among them.
7. There will be more cities and states included in the web-portal.
8. We have decided to include an auto-generated location
tracking system(GPS) such that more security and portability can
be provided.
-
8/17/2019 e Car Rental System Documentation
37/77
CODE:
WELCOME.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WELCOME : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("~/REGISTER.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
-
8/17/2019 e Car Rental System Documentation
38/77
Response.Redirect("~/LOGIN.aspx");
}
protected void Button3_Click(object sender, EventArgs e)
{
Response.Redirect("~/APPLY_RECRUITMENT.aspx");
}
protected void Button4_Click(object sender, EventArgs e)
{
Response.Redirect("policy.aspx");
}
protected void Button5_Click(object sender, EventArgs e)
{
Response.Redirect("CONTACT_US.aspx");
}
protected void Button9_Click(object sender, EventArgs e)
{
Response.Redirect("http://google.com/search?q="+TextBox1.Text);
}
}
}
-
8/17/2019 e Car Rental System Documentation
39/77
ADD_CAR.aspx.cs
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm10 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DropDownList2.Items.Add("AC");
DropDownList2.Items.Add("NON-AC");
}
protected void Button1_Click(object sender, EventArgs e)
{
-
8/17/2019 e Car Rental System Documentation
40/77
SqlConnection con = new SqlConnection("Data Source=AFTERLIFE;Initial
Catalog=ecar;Integrated Security=True");
string im_ext, im_name, im_path;
im_ext = System.IO.Path.GetExtension(FileUpload1.FileName.ToString());
if (im_ext == ".jpg" || im_ext == ".jpeg" || im_ext == ".png")
{
im_name = TextBox3.Text + im_ext;
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/images/") + im_name);
im_path = "~/images/" + im_name;
SqlCommand cmd = new SqlCommand("insert into
car(registrationno,categoryname,bookingstatus,carname,acornonac,price,image) values
(@var1,@var2,@var3,@var4,@var5,@var6,@var7)", con);
cmd.Parameters.AddWithValue("@var1", TextBox3.Text);
cmd.Parameters.AddWithValue("@var2", DropDownList1.SelectedValue);
cmd.Parameters.AddWithValue("@var3", "unbooked");
cmd.Parameters.AddWithValue("@var4", TextBox1.Text);
cmd.Parameters.AddWithValue("@var5", DropDownList2.SelectedValue);
cmd.Parameters.AddWithValue("@var6", int.Parse(price.Text));
cmd.Parameters.AddWithValue("@var7", im_path);
-
8/17/2019 e Car Rental System Documentation
41/77
con.Open();
cmd.ExecuteNonQuery();
messenger.Text = "Added";
DataBind();
con.Close();
}
else
{
messenger.Text = "Not an image...";
}
}
}
}
-
8/17/2019 e Car Rental System Documentation
42/77
ADD_CATEGORY.aspx.cs
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm11 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=AFTERLIFE;InitialCatalog=ecar;Integrated Security=True");
SqlCommand cmd = new SqlCommand("insert into category values
(@var1,@var2,@var3,@var4)", con);
-
8/17/2019 e Car Rental System Documentation
43/77
cmd.Parameters.AddWithValue("@var1", TextBox1.Text);
cmd.Parameters.AddWithValue("@var2", TextBox3.Text);
cmd.Parameters.AddWithValue("@var3", int.Parse(totalcars.Text));
cmd.Parameters.AddWithValue("@var4", int.Parse(TextBox4.Text));
con.Open();
cmd.ExecuteNonQuery();
messenger.Text = "Added";
DataBind();
con.Close();
}
}
}
-
8/17/2019 e Car Rental System Documentation
44/77
ADMIN_INTERFACE.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
ADMIN_INTERFACE
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class ADMIN_INTERFACE : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-
8/17/2019 e Car Rental System Documentation
45/77
ADMIN_PROFILE.aspx.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm5 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = DBAccess.FetchData("Select * from passenger where userid='admin' and
password='12345678'");
DataTable dt = new DataTable();
dt = ds.Tables[0];
-
8/17/2019 e Car Rental System Documentation
46/77
foreach (DataRow dr in dt.Rows)
{
Label1.Text = dr[2].ToString();
Label2.Text = dr[0].ToString();
Label3.Text = dr[1].ToString();
Label5.Text = dr[4].ToString();
Label6.Text = dr[5].ToString();
Label7.Text = dr[6].ToString();
Label8.Text = dr[3].ToString();
ImageMap1.ImageUrl = dr[7].ToString();
}
}
}
}
-
8/17/2019 e Car Rental System Documentation
47/77
APPLY_RECRUITMENT.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class APPLY_RECRUITMENT : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
{
Response.Redirect("WELCOME.ASPX");
}
-
8/17/2019 e Car Rental System Documentation
48/77
protected void Button1_Click(object sender, EventArgs e)
{
string im_ext, im_name, im_path;
im_ext = System.IO.Path.GetExtension(FileUpload1.FileName.ToString());
if (im_ext == ".docx" || im_ext == ".pdf" || im_ext == ".doc")
{
im_name = email.Text + im_ext;
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/cv/") + im_name);
im_path = im_name;
DBAccess.SaveData("insert into cv(email,cvpath) values('" + email.Text + "','" + im_path +"')
Label2.Text = "Success.......";
}
else
{
Label2.Text = "unsupported file";
}
}
}
}
-
8/17/2019 e Car Rental System Documentation
49/77
CAR_MANAGEMENT.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data.SqlClient;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DropDownList bookstatus = GridView1.FooterRow.FindControl("DropDownList2") as
DropDownList;
DropDownList acornon = GridView1.FooterRow.FindControl("DropDownList3") as DropDownList;
bookstatus.Items.Add("booked");
bookstatus.Items.Add("unbooked");
acornon.Items.Add("ac");
acornon.Items.Add("non-ac");
}
-
8/17/2019 e Car Rental System Documentation
50/77
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
DataBind();
}
//public string InsertCommand { get; set; }
protected void Button3_Click1(object sender, EventArgs e)
{
try
{
SqlConnection con = new SqlConnection("Data Source=AFTERLIFE;Initial
Catalog=ecar;Integrated Security=True");
SqlCommand cmd = new SqlCommand("insert into
car(registrationno,categoryname,bookingstatus,carname,acornonac,price) values
(@var1,@var2,@var3,@var4,@var5,@var6)", con);
TextBox cn = GridView1.FooterRow.FindControl("carno") as TextBox;
// TextBox status = GridView1.FooterRow.FindControl("TextBox6") as TextBox;
TextBox cname = GridView1.FooterRow.FindControl("TextBox7") as TextBox;
-
8/17/2019 e Car Rental System Documentation
51/77
DropDownList cat = GridView1.FooterRow.FindControl("DropDownList1") as DropDownList;
DropDownList bookstatus = GridView1.FooterRow.FindControl("DropDownList2") as
DropDownList;
DropDownList acornon = GridView1.FooterRow.FindControl("DropDownList3") as
DropDownList;
TextBox ac = GridView1.FooterRow.FindControl("TextBox8") as TextBox;
TextBox price = GridView1.FooterRow.FindControl("TextBox9") as TextBox;
DropDownList dA = GridView1.FooterRow.FindControl("dropActive") as DropDownList;
cmd.Parameters.AddWithValue("@var1", cn.Text);
cmd.Parameters.AddWithValue("@var2", cat.SelectedValue);
cmd.Parameters.AddWithValue("@var3", bookstatus.SelectedValue);
cmd.Parameters.AddWithValue("@var4", cname.Text);
cmd.Parameters.AddWithValue("@var5", acornon.SelectedValue);
cmd.Parameters.AddWithValue("@var6",int.Parse(price.Text));
con.Open();
cmd.ExecuteNonQuery();
messager.Text="Added";
DataBind();
con.Close();
}
-
8/17/2019 e Car Rental System Documentation
52/77
catch (Exception ex)
{
messager.Text=ex.ToString();
}
}
}
}
-
8/17/2019 e Car Rental System Documentation
53/77
CONTACT_US.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class CONTACT_US : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage m = new MailMessage();
SmtpClient sc = new SmtpClient();
try
{
MailMessage mailMsg = new MailMessage();
-
8/17/2019 e Car Rental System Documentation
54/77
mailMsg.From = new MailAddress(TextBox2.Text);
mailMsg.To.Add("[email protected]");
mailMsg.IsBodyHtml = true;
mailMsg.Subject = "Contact Details";
mailMsg.Body = "Contact Details" + "Name:" + TextBox1.Text + "
Email -address :" + TextBox2.Text + "
Comments :" + TextBox3.Text;SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
mailMsg.Priority = MailPriority.Normal;
smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "caradmin"
smtp.Timeout = 25000;
smtp.EnableSsl = true;
smtp.Send(mailMsg);
-
8/17/2019 e Car Rental System Documentation
55/77
Label6.Text = "Thank you. Your contact details and feed back has been submitted.";
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("welcome.aspx");
}
}
}
-
8/17/2019 e Car Rental System Documentation
56/77
HIRER_ASK.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class HIRER1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
MailMessage m = new MailMessage();
SmtpClient sc = new SmtpClient();
try
-
8/17/2019 e Car Rental System Documentation
57/77
{
MailMessage mailMsg = new MailMessage();
mailMsg.From = new MailAddress(TextBox2.Text);
mailMsg.To.Add("[email protected]");
mailMsg.IsBodyHtml = true;
mailMsg.Subject = "Contact Details";
mailMsg.Body = "Contact Details" + "Name:" + TextBox1.Text + "
Email -address :" + TextBox2.Text + "
Comments :" + TextBox3.Text;SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
mailMsg.Priority = MailPriority.Normal;
smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "caradmin"
smtp.Timeout = 25000;
-
8/17/2019 e Car Rental System Documentation
58/77
smtp.EnableSsl = true;
smtp.Send(mailMsg);
Label6.Text = "Thank you. Your contact details and feed back has been submitted.";
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
}
-
8/17/2019 e Car Rental System Documentation
59/77
HIRER_VIEW_BOOKING.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm18 : System.Web.UI.Page
{
protected void SqlDataSourcmhe1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
if (Session["UserName"] != null)
{
// do this only when Session Variable stores as a string the Username
e.Command.Parameters["@Username"].Value = Session["uid"];
}
else
{
Response.Write("log in first");
}}}}
-
8/17/2019 e Car Rental System Documentation
60/77
HIRER.MASTER.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class HIRER : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
//Session["x"] = "abc";
}
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
Session.Abandon();
Response.Redirect("WELCOME.aspx");
}
}}
-
8/17/2019 e Car Rental System Documentation
61/77
HIRER_PROFILE.aspx.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm17 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = DBAccess.FetchData("Select * from passenger where userid='" +
Session["uid"].ToString() + "' and password='" + Session["pwd"].ToString() + "'");
DataTable dt=new DataTable();
dt=ds.Tables[0];
foreach ( DataRow dr in dt.Rows)
{
-
8/17/2019 e Car Rental System Documentation
62/77
Label1.Text = dr[2].ToString();
Label2.Text = dr[0].ToString();
Label3.Text = dr[1].ToString();
Label5.Text = dr[4].ToString();
Label6.Text = dr[5].ToString();
Label7.Text = dr[6].ToString();
Label8.Text = dr[3].ToString();
ImageMap1.ImageUrl = dr[7].ToString();
}
}
}
}
-
8/17/2019 e Car Rental System Documentation
63/77
LOGIN.aspx.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("WELCOME.aspx");
}
protected void Page_Load(object sender, EventArgs e)
{
}
-
8/17/2019 e Car Rental System Documentation
64/77
protected void register_Click(object sender, EventArgs e)
{
Response.Redirect("register.aspx");
}
protected void login_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "admin" || TextBox1.Text == "ADMIN" && txtPassword.Text == "12345678")
{
Response.Redirect("admin_interface.aspx");
}
else
{
DataSet ds = DBAccess.FetchData("Select * from passenger where userid='" + TextBox1.Text +
"' and password='" + txtPassword.Text + "'");
if (ds.Tables[0].Rows.Count == 0)
{
Label4.Text = "Login Failed";
}
else
{
//Label1.Text = "Login Success";
-
8/17/2019 e Car Rental System Documentation
65/77
Session["uid"] = TextBox1.Text;
Session["pwd"] = txtPassword.Text;
Response.Redirect("hirer_interface.aspx");
}
}
}
protected void Button9_Click(object sender, EventArgs e)
{
Response.Redirect("http://google.com/search?q="+TextBox1.Text);
}
}
}
-
8/17/2019 e Car Rental System Documentation
66/77
LOGOUT.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class LOGOUT : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("WELCOME.aspx");
}
}
}
-
8/17/2019 e Car Rental System Documentation
67/77
POLICY.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class POLICY : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("welcome.aspx");
}
}
}
-
8/17/2019 e Car Rental System Documentation
68/77
RECRUIT.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm12 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
-
8/17/2019 e Car Rental System Documentation
69/77
protected void Button1_Click(object sender, EventArgs e)
{
DBAccess.SaveData("insert into
driver(driverid,name,address,experiance,licenseno,salary,age,phone,cvid) values('" + t1.Text + "','" +
t2.Text + "','" + t3.Text + "','" + int.Parse(t4.Text) + "','" + t5.Text+"','" +int.Parse(t6.Text) +"','" + int.Parse(t7.Tex
+ "','" + t8.Text + "','"+int.Parse(t9.Text)+"')");
DBAccess.SaveData("update driver set dateofjoining =(SELECT CONVERT(date, getdate())s)
where driverid='"+t1.Text+"'");
messenger.Text = "Recruited";
}
}
}
-
8/17/2019 e Car Rental System Documentation
70/77
REGISTER.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class REGISTER : System.Web.UI.Page
{
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("welcome.aspx");
}
protected void login2_Click(object sender, EventArgs e)
{
Response.Redirect("login.aspx");
}
protected void register2_Click(object sender, EventArgs e)
{
-
8/17/2019 e Car Rental System Documentation
71/77
try
{
//saurav's own algo for unique id generation
string email = TextBox5.Text.Substring(0, 3);
string time = DateTime.Now.Second.ToString().Substring(0,2);
string phone = TextBox8.Text.Substring(0, 2);
string id = email + time+phone;
// this portion for upload image file
string im_ext, im_name, im_path;
im_ext = System.IO.Path.GetExtension(FileUpload1.FileName.ToString());
if (im_ext == ".jpg" || im_ext == ".jpeg" || im_ext == ".png")
{
im_name = TextBox8.Text + im_ext;
FileUpload1.PostedFile.SaveAs(Server.MapPath("~/images/") + im_name);
im_path = "~/images/" + im_name;
DBAccess.SaveData("insert into passenger values('" + id + "','" + TextBox3.Text + "','" +
TextBox1.Text + "','" + TextBox8.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" +
int.Parse(TextBox7.Text) + "','" + im_path + "','allowed')");
Label2.Text = "Success,Your UserID is "+id;
}
else
{
Label2.Text = "Not an image...";
}
}
-
8/17/2019 e Car Rental System Documentation
72/77
catch (Exception ex)
{
Label2.Text = ex.Message.ToString();
}
}
protected void Button9_Click(object sender, EventArgs e)
{
Response.Redirect("http://google.com/search?q="+TextBox2.Text);
}
}
}
-
8/17/2019 e Car Rental System Documentation
73/77
SEARCH.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm7 : System.Web.UI.Page
{
protected void Button10_Click(object sender, EventArgs e)
{
int spfare=0,fare=0;
string s = Calendar1.SelectedDate.ToShortDateString();
if (start.SelectedValue=="newtown" || start.SelectedValue=="howrah")
{
if (end.SelectedValue== "newtown" || end.SelectedValue=="howrah")
{
spfare = 300;
}
}
-
8/17/2019 e Car Rental System Documentation
74/77
if (start.SelectedValue=="newtown" || start.SelectedValue=="sealdah")
{if(end.SelectedValue== "newtown" || end.SelectedValue== "sealdah")
{
spfare = 400;
}
}
if (start.SelectedValue == "howrah" || start.SelectedValue == "sealdah")
{
if (end.SelectedValue == "howrah" || end.SelectedValue == "sealdah")
{
spfare = 100;
}
}
if (cat.SelectedValue == "hatchback")
{
fare=spfare+0;
}
-
8/17/2019 e Car Rental System Documentation
75/77
if (cat.SelectedValue == "sedan")
{
fare = spfare + 200;
}
if (cat.SelectedValue == "suv")
{
fare = spfare + 300;
}
if (ac.SelectedValue == "AC")
{
fare = fare + 200;
}
DBAccess.SaveData("insert into
booking(dateofjourney,userid,totalfare,category,startloc,endloc,status,acornon) values('" + s + "','" +
Session["uid"] + "','" + fare + "','" + cat.SelectedValue + "','" + start.SelectedValue + "','" +
end.SelectedValue + "','" + "unapproved" + "','" + ac.SelectedValue + "')");
messenger.Text = "Book Request Processed";
}
}
}
-
8/17/2019 e Car Rental System Documentation
76/77
USER_MANAGEMENT.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace E_Car_Rental_Project
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e
{
GridView1.EditIndex = -1;
DataBind();
}
}
}
78
-
8/17/2019 e Car Rental System Documentation
77/77
Certificate
This is to certify that Mr. ARNAB CHATTERJEE of
Government College of Engineering and CERAMIC
Technology, Registration No. 121100110047 OF 2012-13
has successfully completed a project on E-Car Rental
System using .Net under the guidance of Mr. Koushik
Ghosh.
MR. KOUSHIK GHOSH
GLOBSYN FINISHING SCHOO
(A DEVISION OF GLOBSYN SKILL