You are on page 1of 51

1

CHAPTER 1

INTRODUCTION

1.1 Company Profile

LUISANT SOFTWARE SOLUTIONS

1. Luiant Software Solutions was established in the year 2012. Ever since committed to IT

services providing, Luiant has been enjoying its exponential growth with Web

Development setting up for our clients worldwide.

2. Our IT services provide seamless integration between the customer and Luiant.

3. We go far beyond the established onsite/offshore model by offering in-depth local

consulting, onsite teams focused on the customer's business applications.

4. Luiant Software Solutions is an innovative technology industry focused, business driven

professional services firm.

5. We serve to deliver cost effective interactive technology and design solutions without

compromising on quality. We have another part of company here we are Undergoing

R&D in IEEE & ACM, Etc.

6. Using the latest programming and design technologies, Luiant Software Solutions creates

the optimal, effective online as well as desktop experience for every client.
2

1.2 OBJECTIVE

 The purpose of developing this application is to streamline the vehicle management

process in the company and to avoid any human errors.

 One of the major tasks is sending the vehicles for servicing. In the manual process,

there are no provisions to know whether the vehicle need to sent for servicing, unless

the vehicle record is verified manually.

 Adding vehicles and/or equipment is a simple process and doesn’t require a wealth of

information.

 Admin can add a vehicle with the most basic information.

 The application will keep track of many details such as Employee number, Name,

personal information, License Information. It also allows the user to edit their

Employee Information. Under this module there will be facility to add, delete, Modify

the information regarding Employee.


3

CHAPTER 2

SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

The existing system of vehicle booking is solely done at the showroom. Due to space
constraints, vehicle showrooms are generally placed at the outskirts of the city and new
customers will have to make repeated journeys to complete all the formalities.

Drawbacks

 Managing huge Fleet information manually is a tedious and error prone task.
 In order to schedule vehicles as well as staff, scheduler of this system should not know
how many vehicles are there on board and available for allocation.
 Keeping track of repair information is a must as some times vehicles might be referred
for insurance.

2.2 PROPOSED SYSTEM

The proposed system has it own advantage such as quick in processing. The proposed
system would avoid all the errors in the manual system. It also reduces human Labors and time.
The existing system is found necessary to reduce the lot of manual work in the system.
Proposed system is the computerization of the system with GUI based client server system,
which takes care of the process involved. The application gives the user easy to work with and
also carry out all the labor and product details.

Advantages

 Very simple and easy to implement


 Protection of data
 Ensure data accuracy
 Administrator discretion and control over the entire system
 Online facilities
 Reduces manual data entry
4

CHAPTER 3

SYSTEM SPECIFICATION

3.1 HARDWARE REQUIREMENT

Processor : CPU Dual Core - 2.4 GHz

Hard Disk : 20 GB HDD

RAM : 1 GB

Keyboard : Standard PS/2 Keyboard

3.2 SOFTWARE REQUIREMENT

Operating System : Windows 8 or higher

Technologies used : ASP. Net Framework 3.5

Programming Language : C#.Net

IDE : Visual Studio 2013

Database : SQL SERVER 2008

Browser : Internet Explorer 5.0 and other


5

CHAPTER 4

SOFTWARE DESCRIPTION

4.1 FRONT END

 C# being a .NET language, supports language interoperability, i.e. C# can access code
written in any .NET compliant language and can also inherit the classes written in these
languages. This is not possible in Java.

 The code written in C#, on compilation generates an ‘.exe' or ‘.dll' file which is also
called Portable Executable file. These files contain MSIL (Microsoft Intermediate
Language) code. As against this, the Java code on compilation generates a ‘.class' file,
which contains byte code.

 The portable executable file of C# can contain any number of classes, whereas, the
‘.class' file in Java contains only one class.

 The methods in C# are not virtual by default. On the contrary, methods in Java are
virtual by default, which degrades the performance.

 The classes in C# are grouped in Namespaces, whereas, classes in Java are grouped in
Packages.

 The C# namespaces are not related to the directories. The packages in Java are directly
related with the directory names.

 The variables of primitive data types in C# are more powerful. This is because even
though they are not objects functions can be called using them. The variables of
primitive data types in Java cannot call functions.

 C# has features like Properties and Indexers. These features are not available in the Java
language.

 C# supports Structures, Operator Overloading and Preprocessors directives, whereas,


Java has none of them.
6

SQL SERVER

ADO.NET provides a set of classes which a script can use to interact with databases.
Scripts can create instances of ADO.NET data classes and access their properties and methods.

A set of classes which work with a specific type of database is known as a .NET Data
Provider. ADO.NET comes with two Data Providers, the SQL Server.NET Data Provider
(which provides optimised access for Microsoft SQL Server databases) and the OLEDB.NET
Data Provider, which works with a range of databases.

FEATURES OF SQL SERVER

The OLAP Services feature available in SQL Server version 7.0 is now called SQL
Server 2000 Analysis Services. The term OLAP Services has been replaced with the term
Analysis Services.

Analysis Services also includes a new data mining component. The Repository
component available in SQL Server version 7.0 is now called Microsoft SQL Server 2008 Meta
Data Services.

Reason for choosing SQL Server

 Redundancy can be avoided

 Inconsistency can be eliminated

 Data can be shared

 Standards can be enforced

 Security restrictions can be applied

 Integrity can be maintained

 Conflicting requirements can be balanced

 Data independence can be achieved.


7

CHAPTER 5

PROJECT DESCRIPTION

5.1 PROBLEM DEFINITION

Problem identifying the existing system is a time-consuming process to find the


information about the different fields.

It is difficult to communicate with the regarding sectors and specifically for educational
based area, even then the students suffer a lot to identify where to get an area of exact
information and so.

5.2 OVERVIEW OF THE PROJECT

 The project keeps track the information about the Vehicles, sales, service, Parts, and
services.
 The details of the maintenance that are being performed such as repairs/services and to
be performed are also maintained.
 The maintenance to be performed can also be scheduled for each type of vehicles. The
details of the parts/inventory used for the vehicles are maintained.
 The reorder level and the reorder quantity are predefined for each particular type of
part.
 The particulars of the various vendors are maintained in this system.
8

5.3 MODULE DESCRIPTION


The System consists of following Modules:

 Employee Details

 Customer

 Vehicle

 Registration

 Sales

 Service

 Order

Employee

The details of the employees like name, designation and many other details of the
employees working in the showroom can be maintained through this application. This module
helps to give the detailed information about the newly entered joined employee and they have
to create credentials with basic information, so that they can access their updates in all aspect
of departments for communicating and customers at a specialized level in each department.

Customer

The details of the customers like name, address, vehicle booked and many other details
can be maintained through this application. Customer details must need for the sales process
and vehicle service information’s also.

Vehicle

This module is used to store all the vehicle details of the company. It contains the
information such as the reg no, engine no, owner name, address, model name, vehicle color,
brand name, reg date, fc date.
9

Registration

This module is used to stores the details of goods purchased by the company. It contains
the details such as customer name, customer id, address, phone no, vehicle model, brand name,
date booking, vehicle prize, amount paid. When the application is installed user must register
with their basic details such as name, email ID, mobile number, vehicle no, car model, and etc
before start with the application. This process is used to the user to login with the application
then only user can able to work on the application.

Sales
This module is used to stores the details of goods sale by the company. It contains the
details such as Customer name, address, phno, model name, color, prize, date of sales. This
module is used to generate the billing for each booking to the customer. Customer can pay
payment through online.
Service
This module is used to stores the details of vehicle service by the company. Vehicle
no, Customer name, phone number, model name, brand name, service date, service status and
send a mail to the customer when the service completed.
Order

This module is used to the customer booking and details and status of the vehicle
delivery by the admin. After the delivery all the information’s are stored in the database such
as delivery date, customer details and product details with payment details. This module is
used to store the booking details such as customer name, date, source destination. This details
are stored by the customer and view by the adman for maintain payment and billing.

Reports

In this module is used to show the reports of the entire transactions of the company.
All the information’s are stored in the database and reports are generated for all the purpose.
Reports can generate daily or monthly by the administrator.
10

5.4 DATA FLOW DIAGRAM

Level 0: Context Diagram

vehicle request
Showroom
Admin / database
User response

Figure 5.1 context diagram


11

LEVEL: 1 ADMIN

Request
Admin 1.1
1.1 login
Login Response

Add
1.2
1.2 customer
customer
view

Add
1.3 1.3 employee

employee
view

Add
1.4

sales 1.4 sales


view

Add
1.5 1.5 service

service
view

Add
1.6 1.6 vehiclereg
Vehicle
reg
12

1.7 add
1.7 Vehicle
Vehicle
view

1.8 add
1.8 Order
order
view

Reports
13

LEVEL: 2 USERS

1.1
User 1.2 registration
Registrat
ion

1.2
Login

1.3
1.2 vehicle
Vehicle
14

Figure 5.2 DFD for User

5.5 DATABASE DESIGN


Table: Customer

Primary key: Id

Description: The table contains the customer details

Constraints: Not null, primary key, check

Table 5.1 Customer

Fieldname DataType Size Constrains Description


Id Int 7 This contains accepted 0 Id
to 7 only
Name Varchar 50 Not null, check ’A-Z’ Customer
&& ‘a-z’. Name
Dob Datetime 8 Not null, Accepted only Date of birth
0 to 9.
Gender Char 6 Not null, check ’A-Z’ Gender
&& ‘a-z’
Occupation Nvarchar 20 Not null, check ’A-Z’ Occupation
&& ‘a-z’
Address Nvarchar 200 Not null, check ’A-Z’ Address
&& ‘a-z’ and 0 to 9.
Phone Bigint 10 Not null, Phone
check(num>0&&num=9)
Email Nvarchar 30 Not null, check ’A-Z’ Email
&& ‘a-z’ and 0 to 9.
City Varchar 20 Not null, check ’A-Z’ City
&& ‘a-z’
Pin Int 7 Not null, accepted only 0 Pin
to 6 only

Table: Employee.

Primary key: Id

Description: This table contains the employee details

Constraints: Not null, primary key, check


15

Table 5.2 Employee

Fieldname DataType Size Constrains Description


Id Int (7) This contains accepted 0 Id
to 7 only
Name Varchar (20) Not null, check ’A-Z’ Name
&& ‘a-z’.
Dept Nvarchar (20) Not null, check ’A-Z’ Department
&& ‘a-z’.
Desig Nvarchar (20) Not null, check ’A-Z’ Designation
&& ‘a-z’.
Address Nvarchar (50) Not null, check ’A-Z’ Address
&& ‘a-z’ and 0 to 9.
MobNo Bigint (10) Not null, Mobile No
check(num>0&&num=9)
Email Nvarchar (20) Not null, check ’A-Z’ Email
&& ‘a-z’and 0 to 9.
City Varchar (30) Not null, check ’A-Z’ City
&& ‘a-z’.
Dob Datetime (8) Not null, Date of birth
check(num>0&&num=9)

Table: Sales.

Primary key: Id

Description: This table contains sales details

Constraints: Not null, primary key, check

Table 5.3 Employee

Fieldname DataType Size Constrains Description


Id Int (7) This contains accepted Id
0 to 7 only
Name varchar (20) Not null, check ’A-Z’ Name
&& ‘a-z’.
Model Nvarchar (20) Not null, check ’A-Z’ Vehicle Model
&& ‘a-z’and 0 to 9
Amount Int (7) Not null, check(cost>0) Amount

Description Varchar (50) Not null, check ’A-Z’ Description


&& ‘a-z’. about car
16

Salesdate Datetime (8) This accepted 0 to 7 Sales date


only

Table: Service

Primary key: sid

Description: This table contains the service details

Constraints: Not null, primary key, check

Table 5.4 Employee

Fieldname DataType Size Constrains Description


Sid Int (7) This contains Service id
accepted 0 to 7
only
Sname varchar (30) Not null, check Service name
’A-Z’ && ‘a-
z’.
Sdays Int (7) This contains Service days
accepted 0 to 7
only
Stype nvarchar (20) Not null, check Service type
’A-Z’ && ‘a-z’
and 0 to 9
Sdate datetime (8) This Accepted Service date
only 0 to 9
Sstatus nvarchar (20) Not null, check Service status
’A-Z’ && ‘a-
z’.
Scharge nvarchar (20) Not null, Service charge
check(cost>0)
ServiceStartingdate datetime (8) This Accepted Service Starting
only 0 to 9 date
Ddate datetime (8) This Accepted Delivery date
only 0 to 9
Mod nvarchar (20) Not null, check Mode of
’A-Z’ && ‘a- delivery
z’.
Repairs nvarchar (20) Not null, check Repairs
’A-Z’ && ‘a-
z’.
17

Table: tbl_UserReg

Primary key: UserId

Description: this table contains user registration details

Constraints: Not null, primary key, check

Table 5.5 User registration table

Fieldname DataType Size Constrains Description


UserId Int (7) This contains accepted 0 User Id
to 7 only
Name Varchar (20) Not null, check ’A-Z’ Name
&& ‘a-z’.
Gender Char 6 Not null, check ’A-Z’ Gender
&& ‘a-z’
MobileNo Decimal (10) Not null, Mobile No
check(num>0&&num=9)
Email Nvarchar (20) Not null, check ’A-Z’ Email
&& ‘a-z’ and 0 to 9
Password Nvarchar (20) Not null, check ’A-Z’ Password
&& ‘a-z’ and 0 to 9
Address Nvarchar (50) Not null, check ’A-Z’ Address
&& ‘a-z’

Table: Vehicle

Primary key: id

Description: This table contains vehicle details

Constraints: Not null, primary key, check

Table 5.6 vehicle table

Fieldname DataType Size Constrains Description


Id Int (7) This accepted 0 to Id
7 only
Name nvarchar (20) Not null, check ’A- Name
Z’ && ‘a-z’
18

Modelno bigint (10) Not null, check ’A- Model number


Z’ && ‘a-z’ and 0
to 9
Modelname nvarchar (10) Not null, check ’A- Model name
Z’ && ‘a-z’
Type nvarchar (10) Not null, check ’A- Type
Z’ && ‘a-z’
Seat Int (7) This accepted 0 to Seat
7 only
Color varchar (10) Not null, check ’A- Color
Z’ && ‘a-z’
Fuel char (20) Not null, check ’A- Fuel
Z’ && ‘a-z’
Warranty Int (7) This accepted 0 to Warranty
7 only
Price Int (7) Not null, Price
check(cost>0)
Description nvarchar (50) Not null, check ’A- Description
Z’ && ‘a-z’
Photo image Max Image value Photo

Table: vehiclereg

Primary key: Regno

Description: This table contains vehicle registration table

Constraints: Not null, primary key, check

Table 5.7 vehicle registration table

Fieldname DataType Size Constrains Description


Regno Int (7) This contains Registration
accepted 0 to 7 number
only
Regdate datetime (8) This Accepted Registration
only 0 to 9 date
Owner varchar (20) Not null, check Owner
’A-Z’ && ‘a-z’
Deliverydate datetime (8) This Accepted Delivery date
only 0 to 9
Payment Int (7) Not null, Payment
check(cost>0)
Loan Int (7) Not null, loan
check(cost>0)
19

5.6 INPUT DESIGN

Registration Page

Registration page used to register the details of the users such as username, password,
full name, mobile number and Email id. Which is used to login into the user page in the
application. Registration detail is stored in the database. (Refer figure)

Login Page

Login page allows user to give the values such as username and password. Once the user
registers their details in a registration page, login can be done. (Refer Figure )

Booking Details
Booking details panel allow the user to enter the name, address, date, phone number
of the customer. (Refer figure).
Employee Details
Employee details panel will allow the admin to give input values such as Name,
Designation, Date, category, Type, overview, highlight, cost, and modify contents. (Refer
figure)
Service Details
Service details panel will allow the admin to give input values such as vehicle name,
no.of days, service Date, service name, Type, overview, description of complaints, cost, and
modify contents. (Refer figure)
Sales Details
Sales details panel allow the user to enter the sales vehicle, customer address address,
date, cost of the vehicle of the customer. (Refer figure).
Customer Details
Customer details panel will allow the admin to give input values such as Name,
address, DOB, email, mobile, gander and etc. (Refer figure)
20

5.7 OUTPUT DESIGN

Registration Page

Use can get the success message or error message from the system based on their
input values. (Refer figure)

Login page
The username and password are successfully referred from the login table and
successfully navigate to the User page. (Refer Figure)
Customer page
Admin can view the customer details which is stored by the admin. (Refer Figure).
Vehicle page

Upload page is used to allow the user to upload the vehicle image from our local disk
by admin. (Refer Figure)
Booking page
Admin can view the vehicle and deliver to the customer for booking. (Refer Figure).
Sales page
Admin can view the sales details and retrieve the information’s date wise (Refer
Figure).
Employee page
Admin can view the employee details which is stored by the admin. (Refer Figure).
Service page
Admin can view the service details of the vehicle and get the notification based on the
service delivery which is stored by the admin. (Refer Figure).
21

CHAPTER 6

SYSTEM TESTING

6.1 UNIT TESTING


Check whether the employee details module is working correctly or not.

Form Name: Login form

Description: This form is tested by giving the username and password

Input: Enter the username and password

Output: if the username and password is correct the page will redirect into homepage
otherwise it will send alert message “invalid username and password”.

Figure 9.1 unit testing in login form


22

6.2 INTEGRATION TESTING


If the admin accepts the condition and terms then must load the next form.

Form Name: login details

Description: this form is tested by giving the username and password

Input: username and password.

Output: admin dashboard.

Figure 9.2 integration testing


23

6.3 Validation Testing

In the registration page, if the user did not give proper information like invalid email,
mobile number and etc., a dialog box with an error message will be displayed.

Form Name: user registration

Description: this form is tested by giving the registration details

Input: registration with wrong email

Output: please enter valid email

Figure 9.3 validation testing


24

Figure 9.4 validation testing


25

CAPTER 7

SYSTEM IMPLEMENTATION

This phase consists of the following processes:

 Prepare for System Implementation, where all steps needed in advance of actually
deploying the vehicle showroom system is performed, including preparation of both the
production environment and the Consumer communities and also showroom details.

 Deploy System, where the full deployment plan, initially developed during System
Design and evolved throughout subsequent lifecycle phases, is executed and validated.
That the details are collecting for the anamalais Toyota.

 Transition to Performing Organization, where responsibility for and ownership of


the application are transitioned from the Project Team to the unit in the Performing
Organization that will provide system support and maintenance.
26

CAPTER 8

CONCLUSION

In this project “Vehicle showroom management system” concluded that the


application works well and satisfy the end users. The application is tested very well and
errors are properly debugged. The application is simultaneously accessed from more
than one system. Simultaneous login from more than one place is tested.

Further enhancements can be made to the application, so that the web


application functions are very attractive and useful manner than the present one. The
speed of the transactions become more enough now.

SCOPE OF FUTURE ENHANCEMENT

 Online payments can be included in future.


 Managing prospective dealers and to avail discounts and offers to fetch more profits.
Managing these discounts and offers can be incorporated in future.
 Integrating GPS with the application which tracks the current vehicle information
which includes its location, speed etc., which can be very much useful in certain
instances when the vehicle is missing for some reason.
 Incorporating auto alert system to send vehicle for servicing.
27

CAPTER 9

APPENDICES

Source Code

Registration Page

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.SqlClient;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

SqlConnection con = new SqlConnection(@"Data


Source=PRAVINKUMAR\SQLEXPRESS;Initial Catalog=CarShowroom;User
ID=sa;Password=welcome");

protected void Page_Load(object sender, EventArgs e)

protected void Button1_Click(object sender, EventArgs e)


28

try

if (txtName.Text.Trim() == "" || txtDOB.Text.Trim() == "" || txtAddress.Text.Trim()


== "" || txtMobile.Text.Trim() == "" || txtEmail.Text.Trim() == "" || txtPassword.Text.Trim()
== "" )

Response.Write("<script type='text/javascript'>alert('Empty field error!')</script>");

return;

if(txtMobile.Text.Length != 10)

Response.Write("<script type='text/javascript'>alert('Invalid mobile')</script>");

return;

System.Text.RegularExpressions.Regex rEmail = new


System.Text.RegularExpressions.Regex(@"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-
9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$");

if (!rEmail.IsMatch(txtEmail.Text.Trim()))

Response.Write("<script type='text/javascript'>alert('Invalid email')</script>");

return;

}
29

SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM registration WHERE


email='" + txtEmail.Text + "'", con);

DataSet ds = new DataSet();

da.Fill(ds);

if (ds.Tables[0].Rows.Count > 0)

Response.Write("<script type='text/javascript'>alert('Email id already


exist')</script>");

return;

SqlCommand cmd = new SqlCommand("insert into


registration(name,gender,dob,address,mobile,email,password)
values('"+txtName.Text+"','"+ddlGender.SelectedValue+"','"+txtDOB.Text+"','"+txtAddress.
Text+"','"+txtMobile.Text+"','"+txtEmail.Text+"','"+txtPassword.Text+"')", con);

con.Open();

cmd.ExecuteNonQuery();

con.Close();

Response.Write("<script type='text/javascript'>alert('Registeration
successfully')</script>");

Response.Redirect("Default.aspx");

catch(Exception ex)

}
30

finally{

con.Close();

protected void Button2_Click(object sender, EventArgs e)

Response.Redirect("Default.aspx");

Login Page

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.SqlClient;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

{
31

SqlConnection cn = new SqlConnection(@"Data


Source=PRAVINKUMAR\SQLEXPRESS;Initial Catalog=CarShowroom;User
ID=sa;Password=welcome");

protected void Page_Load(object sender, EventArgs e)

if (!IsPostBack)

Session.Remove("Table");

Session.Remove("UserId");

Session.Remove("BackPage");

protected void Button1_Click(object sender, EventArgs e)

try

cn.Close();

cn.Open();

SqlDataAdapter da = new SqlDataAdapter("select * from registration where


name='"+DropDownList1.Text+"'and password='"+TextBox3.Text+"'", cn);

DataSet ds = new DataSet();

da.Fill(ds);

cn.Close();
32

if (DropDownList1.Text == "admin" && TextBox3.Text == "admin")

Response.Redirect("home.aspx");

else if(DropDownList1.Text == "Employee" && TextBox3.Text == "emp")

Response.Redirect("EmpHome.aspx");

else if (DropDownList1.Text == "Customer" && TextBox3.Text == "cus")

Response.Redirect("customerhome.aspx");

else if (ds.Tables[0].Rows.Count > 0)

Session["UserId"] = ds.Tables[0].Rows[0]["id"].ToString();

Response.Redirect("UserHome.aspx");

else

{
33

Label1.Text = "Invalid!!!";

catch

finally

cn.Close();

protected void Button3_Click(object sender, EventArgs e)

Response.Redirect("UserRegistration.aspx");

protected void Button2_Click(object sender, EventArgs e)

//Response.Redirect("UserRegistration.aspx");

}
34

Employee Details

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.Data.SqlClient;

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

SqlConnection cn = new SqlConnection(@"Data


Source=PRAVINKUMAR\SQLEXPRESS;Initial Catalog=CarShowroom;User
ID=sa;Password=welcome");

protected void Page_Load(object sender, EventArgs e)

Session["Table"] = "";

Session["BackPage"] = "";

protected void Button1_Click(object sender, EventArgs e)

try
35

if (TextBox1.Text.Trim() == "" || TextBox2.Text.Trim() == "" || TextBox3.Text.Trim()


== "" || TextBox4.Text.Trim() == "" || TextBox5.Text.Trim() == "" || TextBox6.Text.Trim()
== "" || TextBox7.Text.Trim() == "" || TextBox8.Text.Trim() == "" || TextBox9.Text.Trim()
== "")

Response.Write("<script type='text/javascript'>alert('Empty field error!')</script>");

return;

if (TextBox6.Text.Length != 10)

Label1.Text = "Invalid mobile";

return;

System.Text.RegularExpressions.Regex rEmail = new


System.Text.RegularExpressions.Regex(@"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-
9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$");

if (!rEmail.IsMatch(TextBox7.Text.Trim()))

Response.Write("<script type='text/javascript'>alert('Invalid email')</script>");

return;

cn.Close();

cn.Open();
36

SqlCommand cmd = new SqlCommand("insert into employee values('" +


TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','"
+ TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text +
"','" + TextBox9.Text + "')", cn);

cmd.ExecuteNonQuery();

Label1.Text = "Details Added Successfully";

cn.Close();

catch

protected void Button2_Click(object sender, EventArgs e)

try

cn.Close();

cn.Open();

SqlDataAdapter da = new SqlDataAdapter("select * from employee where id='" +


TextBox1.Text + "'", cn);

DataSet ds = new DataSet();

da.Fill(ds);

TextBox1.Text = ds.Tables[0].Rows[0][0].ToString();

TextBox2.Text = ds.Tables[0].Rows[0][1].ToString();
37

TextBox3.Text = ds.Tables[0].Rows[0][2].ToString();

TextBox4.Text = ds.Tables[0].Rows[0][3].ToString();

TextBox5.Text = ds.Tables[0].Rows[0][4].ToString();

TextBox6.Text = ds.Tables[0].Rows[0][5].ToString();

TextBox7.Text = ds.Tables[0].Rows[0][6].ToString();

TextBox8.Text = ds.Tables[0].Rows[0][7].ToString();

TextBox9.Text = ds.Tables[0].Rows[0][8].ToString();

cn.Close();

catch

protected void Button3_Click(object sender, EventArgs e)

try

cn.Close();

cn.Open();

SqlCommand cmd = new SqlCommand("update employee set name='" +


TextBox2.Text + "',dept='" + TextBox3.Text + "',desig='" + TextBox4.Text + "',address='" +
TextBox5.Text + "',no='" + TextBox6.Text + "',email='" + TextBox7.Text + "',city='" +
TextBox8.Text + "',dob='" + TextBox9.Text + "' where id='"+TextBox1.Text+"'", cn);

cmd.ExecuteNonQuery();
38

Label1.Text = "Details Updated Successfully";

cn.Close();

catch

protected void Button4_Click(object sender, EventArgs e)

try

cn.Close();

cn.Open();

SqlCommand cmd = new SqlCommand("delete employee where id='" +


TextBox1.Text + "'", cn);

cmd.ExecuteNonQuery();

Label1.Text = "Details Deleted Successfully";

cn.Close();

catch

}
39

protected void btnReport_Click(object sender, EventArgs e)

Session["Table"] = "employee";

Session["BackPage"] = "EmployeeDetails.aspx";

Response.Redirect("Report.aspx");

}
40

9.1 Screen Shot

Registration
41

Login
42

Admin Home
43

Employee
44

Customer
45

Vehicle
46

Vehicle registration
47

Service
48

Sales
49

User Home
50

Order
51

CHAPTER 10

Reference Books

 MacDonald, Matthew, User Interfaces in C#: Windows Forms and Custom Controls,
Apress Publisher, 1st Edition, 2002.

 Jeffrey Richter.J, Applied Microsoft® .NET Framework Programming, Microsoft


Press Publisher, 1st Edition, 12 July 2002.

 Patrick Smacchia, Practical .Net2 and C# 2: Harness the Platform, the Language, and
the Framework, Paradoxal Press Publisher, 2nd Edition, 2006.

 Jeffrey Richter.J, CLR via C# (Microsoft, Developer Reference), Microsoft Press


Publisher, 5th Edition, 2012.

Web References

 www.w3schools.com

 www.programmersheaven.com

 www.codeproject.com

 www.sourcefordgde.com

 www.ieee.org

 www.csharp-station.com

You might also like