0% found this document useful (0 votes)
55 views216 pages

Project (Lap Tech)

Uploaded by

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

Project (Lap Tech)

Uploaded by

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

1

1. Introduction :-

"Laptech" is a web-based project which is made for remote-shopping or shopping through

Internet. As the technology is being advanced the way of life is changing accordance. Now a

day's we can place the order for Laptops from our home. There is no need to go the shop of the

Laptops we want. The order can be placed online through Internet. The payment, the

confirmation of purchasing; we can do every thing we want. Now we can think that how the

days have been changed with time. People had to stand in rows to wait there terms to buy a

particular thing from a popular shop. But what is happening now a day's; we can extremely

surprise that those things can be available on the door-step in few hours.

People had to suffer the rush of the market when they went for shopping. They used to think

hundred times to buy any thing having the sufficient money for shopping. The problem was

the rush; the quarrel at the time of buying the things. But the advancement of technology

brought the new way for shopping. The way of shopping was completely changed with the

coming of Internet Technology.

People havez to fill a simple form on the internet to place their order for the Laptops they

want to buy. Now they can place their order from the home.

This project entitled "Laptech" is an implementation of the above description. It means, it

implements the E-shopping or in other word shopping through Internet. It lets the user to place

their order online for any article.

1.1 Objective :-

Today the internet and its boom have created a new economic scenario that not only stresses

on the classical concept of the "product" but also on the modern concept of "service". It is this

level of service that dictates whether a commerc ial venture will succeed or not in the market.
2

To provide a high accessibility of service we will design the online shopping website, so that

potential customers need not go to a physical shop to buy products or services. There are

several objective of this websites are following given bellows.

• This site is gives all the information about the e-shopping to provide better service for the

customer .

• It provides the facility to the customers who want to shop on-line due to lock of time.

• It provides facility to the customer to payment by the cash and cheque and DD also.

• It's providing the full details about the product and related information about the product like

cost size etc.

• With the help of it we can save the time and money also.

• It provides the remote shopping by the cash,or DD,or Debit card also.

• It provides better security and good delivery service to the

Customer.

2. System Analysis :-

2.1 Problem Definition:-

The e-shopping Administrator is the super user and has complete control over all the activities

that can be performed. The application notifies the administrator of a ll shop creation requests,

and the administrator can then approve or reject them. The administrator also manages the list

of available product categories. The administrator can also view and delete entries in the

guestbook.
3

2.2 Indentification of Need :-

Lap_tech Systems described above can lead to error free, secure reliable and fast management

system for Shopping.

It can assist the staff to concentrate on their related (for Shopping) activities rather to

concentrate on the records and reports of issuing Products, registration and suppliers .This will

help organization in better utilization of human resources.

In this phase, the user identifies the need for a new or improved system. n large organizations

this identification may be part of a systems planning process.Online Shopping Portal is a

specific requirement of the client that integrates the buying and selling services specifically to

their customers.Need for the new system is due to major drawbacks of existing system.

Reports can be generated at any time within few seconds, so that manual labour is not

required, and also analysis can be performed much more frequently which helps in taking

decision. The details regarding all users, products can also be maintained as their information

is very helpful and sometimes becomes a critical requirement. Allows user to get registered

from their places and transact for the required product.

To overcome these problems in existing system we develop "Lap_tech".

2.3 PRELIMINARY INVESTIGATION :-

2.3.1 Benefit to Organization :-

The organization will obviously be able to gain benefits such as savings in operating cost,

reduction in paperwork, better utilization of human resources and more presentable image

increasing goodwill. The other benefits are improved service and faster and better access to
4

up-to-date information.

2.3.2 The Initial Cost

The initial cost of setting up the system will include the cost of hardware (server/clients,

network adapter and related hardware), software (server OS, add-on software, utilities) &labor

(setup & maintenance). The same has to bear by the organization.

2.3.3 Running Cost

Besides, the initial cost the long term cost will include the running cost for the system

including the AMC, Product charges,cost for human resources,cost for update/renewal of

various related software.

2.3.4 Need for Training

The users along with the administrator need to be trained at the time of implementation oif the

system for smooth running of the system. The client will provide the training site.

2.3.5 Admin

User can submit a shop creation request through the application. When the request is approved

by theAdministrator, the requester is notified, and from there on is given the role of Web

Owner. The Web Owner is responsible for setting up the Web and maintaining it. The job

involves managing the sub-categories of the brand in the Lap_tech. Also, the Web owner can

add or remove items from his shop. The web Owner can view different reports that give deta

ils of the sales and orders specific to his shop. The Web Owner can also decide to close Web

and remove the Items.

2.3.6 Customer :-

Here customer is the perosn who is authenticate by the admin. Customer can be allowed to

search the product with or without LogIn procedure. Customer allowed to order that particular
5

product whatever he/she decided to buy. Customer can Pay their payment through different

modes, like COD(Cash On delivery ) and online.

2.3.7 Vendor :-

Here vendor is the Company owner who will be authenticate by the admin . After

authentication process vendor allowed to visible their particular product on our web page

vendor have only authrity to Add product,Vendor can not be able to delete their product.

3.FEASIBILITY STUDY :-

Feasibility is the determination of whether or not a project is worth doing. The process fo

lowed in making this determination is called a feasibility study. This type of study determines

if a project can and should be taken. Once it has been determined t hat a project is feasible, the

analyst can go ahead and prepare the project specification which finalizes project

requirements.

Different Type of Feasibility Study:-

ln the conduct of the feasibility study, the analyst will usually consider seven distinct, but

inter- related types of feasibility.

They are,

 Technical Feasibility

 Operational Feasibility

 Economic Feasibility

 Social Feasibility

 Management Feasibility

 Legal Feasibility
6

 Time Feasibility

3.1 Technical Feasibility:

This is concerned with specifying equipment and software that willsuccessfully satisfy the user

requirement; the technical needs of thesystem may vary considerably, but might include the

facility to produce outputs in a given time:-

• Response time under certain conditions.

• Ability to process a certain volume of transaction at aParticular speed.

• Facility to communicate data to distant location.

In examine technical feasibility configuration of the system is givenmore importance than the

actual make of hardware. The configurationshould give the complete picture about the

system‟s requirement. How many work stations are required, how these units are

interconnected so that they could operate and communicate smoothly. What speeds of input

and output should be achieved at particular quality of printing. This can be used as a basis for

the tender document.

3.2 Operational Feasibility:-

It is mainly related to human organization and political aspects. The points to be considered

are:-

• What changes will be brought with the system?

•What organizational structures are distributed?

• What new skills will be required? Do the existing staff members have these skills? If not, can

they be trainedin due course of time?

Generally project will not be rejected simply because of operationalinfallibility but such
7

considerations are likely to critically affect the nature and scope of the eventual

recommendations.

3.3 Economical Feasibility :-

Economic analysis is the most frequently used technique for evaluating the effectiveness of a

proposed system. More frequenty known as cost I benefit analysis; the procedure is to

determine the benefits and saving that are expected from a proposed system and compare

them with costs. If benefits outweight costs, a decision is taken to design and implement the

system. Otherwise, future justification or alternative in the proposed system will have to be

made if it is to have a change of being approved. This is an ongoing effort that improves in

accuracy at each phase of the system life cycle.

3.4 Social Feasibility:-

Social feasibility is a determination of whether a proposed project will be acceptable to the

people or not. This determination typically examines the probability of the project accepted by

the group directly affected by the proposed system change.

3.5 Management Feasibility:-

It is a determination of whether a proposed project will be acceptable to management. If does

not accept a project or gives a negligible support to it; the analyst will tend to view the project

as a non-feasible one.

3.6 Legal Feasibility:-

Legal feasibility Is a determination of whether a proposed project on known Acts Statutes, as

well as any pending legisnation. Although in some instances the project might appear sound.

on closer investigation it may be found to infringe on several legal areas.


8

3.7 Time Feasibility:-

Time feasibility is a determination of whether a proposed project can be implemented fully

with n a stipulated time frame. If a project takes too much time it is likely to be rejected.

4. REASON FOR USES ASP.NET WITH C# AS FRONT-END


.Net Framework is of the most prevailed framework to develop the web based application.

This is the outcome of Microsoft which was developed for competing java in the world

market. It supports many programming languages like C++, C#, Visual Basic, XML etc.

I have used ASP. Net w ith C# to develop this softwa re due to following reasons:

• It is Very easy to use ASP. net to develop web-based application because of its user-friendly

functionalities.

• C# is the la nguage that uses both CUI and GUI Interfaces thus more flexibility.

• Auto-generated and More Powerful IDE.

• Common to use Server;

5.MODULE DESCRIPTION :-

We know that it is quite difficult to do any thing of its whole part at a time.

Soit is the task of the programmer to break/split the whole set of task into various small

module so that one can handle them effectively.But

it depends upon the software system that in which Extent it will be broken so that thereis no

inter-dependency among them.

This project developed for "On-Line Shopping" is brokeninto following module.


9

 Admin Module

 Customer Module

 Vendor Module

 Payment Module

 Order Module

 Product Module

5.1 Admin:

Admin is a person whose responsibility is to maintain the database that contains each and

every data regarding the all the Customer and Vendor. Admin can add Customer and Vendor

details into the database, can be able to delete Customer and Vendor details.

Admin has some other responsibilities they are :

• Admin is can maintain the Product of each and every Vendor.

• Admin can generate the invoice of the payment and

• Admin can export the details to Mysql.

5.2 Customer :-

Here the Customer means the Buyer. The responsibility of the Customer is to login into the

site and can choose his/her laptop and can able update his/her personal details if there is any

wrong details are present. Whenever the Customer will register his/her name then the

Customer will be given by one individual username and password. When the Customer will

type the correct username and password then the will enter into another page. In that page, the

Customer can select two options that are view product and order product. A Customer can able

to update his/her personal details and can be able to view the payment details.
10

5.3 Vendor :-
Here vendor is the Company owner who will be authenticate by the admin. After

authentication process vendor allowed to visible their particular product on our web page.

Vendor have only authority to Add product, vendor can not be able to delete their product.

5.4 Order Module:-

When a customer goes through checkout, the information on their order is automatically

transfer to the orde section for you to keep track of. In the administration, you can view all the

order made on their site, manually add orders, or edit the details of existing order the order

section is located under sale > order. On this page every order ever made form the store is

listed in details.

5.5 Shipping report:-

The Shipping Report can be accessed through Reports > Sales >Shipping. The Shipping report

displays which shipping method is being used the most by customers in the store front.

Shipping information is displayed in either daily, weekly,monthly, or yearly increments

depending on which option you select in the Group any drop box.

The Shipping Report displays the followinginformat on:-

• Date Start: The date of the first day of the week tracked ( if set to week in Group By).

• Date End: The date of the last day of the week tracked (if set to weekin

Group By).

• Shipping Title: The shipping method used. The shipping title with the highest

totalwill be displayed at the top. The lowest totalw ill be at the bottom.

• No. of Orders: The number of orders made through the store between the

date start and end.


11

• Total: The total amount of money paid for shipping between the date start

and end.

5.6 Returns report :-

The Returns Report can be accessed through Reports>Sales> Returns. The returns report

shows how many returns were

requested within a given time frame. The returns informat onis displayed in either daily,

weekly, monthly, or yearly increments depending on which option you select in the Group by

drop box.

• The Returns Report displays the following informat on:

• Date Start: The date of the first day of the week tracked ( if set to week in

Group By)

• Date End: The date of the last day of the week tracked (if set to weekin

Group By)

• No. Returns: The number of return requests submitted or aeated between the date start and

date end.

5.7 Products viewed report :-

The Products Viewed Report gives you an idea of what products are being viewed the most, or

the least, in the store front. You can access this sect on under Reports > Products > Viewed in

the administrat on side. The report will position the top viewed product first. Along with the

product name and model, the report will display the number of customers who viewed that

product in the store front, and the percentage of views for this specific product out of all the

views for products on the site. Clicking Reset will clear the information below and reset the

report to only collect informat on from that moment on.


12

5.8 Sales reports :-

The reports under Sales Reports can be accessed from Reports Sales. Orders, taxes, shipping,

returns, and coupon sales information can be tracked in list form.

Tax Report: The Tax Report can be accessed through Reports > Sales > Tax. The Tax report

displays which type of tax is being paid the most by customers in the store front. Tax

information is displayed in either daily, weekly, monthly, or yearly increments depending on

which option you selectin the "Group By" drop box.

The Tax Report displays the following information:

• Date Start: The date of the first day of the week tracked ( if set to week in Group By).

• Date End: The date of the last day of the week tracked (if set to weekin

Group By).

• Tax Title: The title of the tax type used.

• No. of Orders: The number of orders made through the store between the

date start and end.

• Total: The total amount of money paid for taxes by customers between the date start and

end.

6.Software Requirements Specifications :-

The Software Requirements Specification is produced at the culmination of the analysis task.

The function and performance allocated to software as part of system engineering are refined

by establishing a complete information description, a detailed functional and behavioral

description, an indication of performance requirements and design constraints, appropriate

validation criteria, and other data pertinent to requirements.


13

6.1 Introduction :-

6.1.1 Purpose -

The main purpose, to make this software is to over come of problems of database

handling, maintain registers of members, Products, and information about worker which are

works at Shopping etc.

6.1.2 Intended Audience –

This SRS is meant for basically my final semester project report of MCA. Besides, it is

obviously targeted for the managers of mentioned center, the client, to get and overall

description and advantage of the proposed system over the existing manual system.

6.1.3 Product Vision and Scope –

The proposed system is being developed keeping in mind the requirements/need of the client

to automate its existing system for record keeping, report generation and management level

information system. Keeping in mind the needs, the system has been developed as per

guidelines laid by the client's center. The system is capable enough to handle Shopping

records, Product's records, member's records, visitors records, report generation, and storing

other related information.

6.2 Overall Description

6.2.1 Product Perspectives:

The proposed system falls under RDBMS (Relational Data Base Management System)

category . Ihave adopted PHP as front end for the software and MYSQL as back end.

PHP is at present one of the most popular deve lopment platform for web based system that is

efficient for web programming.


14

MYSQL is at present the most reliable and secure RDBMS tool. MYSQL Server works to

efficiently manage its resource, a database of information, among the multiple clients

requesting and sending data in the network. MYSQL has many important features that make

it not only an exceptional database management system but also an excellent database

server choice for client/server database computing.

So the overall system will prove to reliable, secure and efficient for the organization.

6.2.2 Product Functions Functionalities:

 Any person can query for Products availability according to specified conditions.

 A Person can Product/cancel the Product only after he logs in.

 A user can sign up for a profile if he doesn't have one already.

 On logging in, the user has options to.

 Product issued .

 Edit Profile information.

 Cancellation of his Producted issued.

 View all current Products Producted by him.

 Logout.

A person can get all infoi-mation regarding a Shopping if he keys in It.

•A person can get all information about a Products if he keys in the Product id.

• A person can get the availability of all Products for the next 20 days.

• Official members are suppose to do that work which distributed by the administrator.

• Administrator or assigned official members can add/modify/delete Shopping information.


15

• Administrator or assigned official members can add/modify/delete seat type according

their availability and generate report.

• Administrator or assigned official members can add/modify/delete Shopping information.

• Administrator or assigned official members can define and manage charges information.

• Administrator or assigned official members can define scheme and modify time to time

and generate report.

• Administrator can add/modify/delete official member and generate report.

• Administrator can add/modify/delete user information and generate report.

6.3 Operating Environment –

The proposed software is to run on client/server model network. A client/server can

deliver the better performance than the file server system because a client application and

database server work together to sprnt processing load of applications (thus the term

distributed processing). The server manages the database among the number of clients,

while the client send, request, and analyze the data entry form with small specific data set,

such as rows in a table not file as in the file server system. A database server is intelligent

enough so that it lock and return only the rows a client request, which ensure concurrency,

minimize the network traffic and increase the system performance.

Assumptions and Dependencies While cost estimation of the proposed system it has been

assumed that the cost hardware and for license of Operating System and back end w ill be

met by client (the organization). Hence only the cost incurred for the proposed software is

included therein.

The followings are identified as some of the potential risk factors or dependencies:
16

 Non-availability of required resources.

 Power cuts.

 Slippage of schedule due to unpredictable holidays, etc.

6.4 Life Cycle Model –

Iam using SDLC model that begin at system level and progresses through analysis, design,

coding, testing, implementation and maintenance.

7. External Interface Requirements

7.1 User Interfaces –

It has been required that every form's interface should be user friendly and simple to use.

Besides, there should be facility of accessing the system through keyboard along with the

mouse i.e. keyboard shortcuts.

7.2 Software Interfaces –

It has been required that there could be a necessity of using tlhe stored data for some kind

of report that is not supported by proposed system at present. So the proposed system is

required to export its data as text file so that some other application software can import

the data.

7.3 System Future Requirement: –

Other than descriptions provided above, the following features were required by the client.
17

8. What is a data flow diagram?

A data flow diagram (DFD) maps out the flow of information for any process or system. It

uses defined symbols like rectangles, circles and arrows, plus short text labels, to show data

inputs, outputs, storage points and the routes between each destination. Data flowcharts can

range from simple, even hand-drawn process overviews, to in-depth, multi-level DFDs that dig

progressively deeper into how the data is handled. They can be used to analyze an existing

system or model a new one. Like all the best diagrams and charts, a DFD can often visually

“say” things that would be hard to explain in words, and they work for both technical and

nontechnical audiences, from developer to CEO. That‟s why DFDs remain so popular after all

these years. While they work well for data flow software and systems, they are less applicable

nowadays to visualizing interactive, real-time or database-oriented software or systems.

8.1 Symbols : -

Using any convention‟s DFD rules or guidelines, the symbols depict the four components of

data flow diagrams.

8.1.2 External Entity: -

An outside system that sends or receives data, communicating with the system being

diagrammed. They are the sources and destinations of information entering or leaving the

system. They might be an outside organization or person, a computer system or a business

system. They are also known as terminators, sources and sinks or actors. They are typically

drawn on the edges of the diagram.

8.1.3 Process:-

Any process that changes the data, producing an output. It might perform computations, or sort

data based on logic, or direct the data flow based on business rules. A short label is used to
18

describe the process, such as “Submit payment.”

8.1.4 Data store:-

Files or repositories that hold information for later use, such as a database table or a

membership form. Each data store receives a simple label, such as “Orders.”

8.2 Data flow:-

The route that data takes between the external entities, processes and data stores. It portrays

the interface between the other components and is shown with arrows, typically labeled with a

short data name, like “Billing details.”

8.3 DFD rules and tips :-

• Each process should have at least one input and an output.

• Each data store should have at least one data flow in and one data flow out.

• Data stored in a system must go through a process.

• All processes in a DFD go to another process or a data store.

8.3.1 DFD levels :-

A data flow diagram can dive into progressively more detail by using levels and layers,

zeroing in on a particular piece. DFD levels are numbered 0, 1 or 2, and occasionally go to

even Level 3 or beyond. The necessary level of detail depends on the scope of what you are

trying to accomplish.

8.3.2 DFD Level 0 :-

This is also called a Context Diagram. It‟s a basic overview of the whole system or process

being analyzed or modeled. It‟s designed to be an at-a-glance view, showing the system as a

single high-level process, with its relationship to external entities. It should be easily
19

understood by a wide audience, including stakeholders, business analysts, data analysts and

developers.

Level 0 :-

Fig. 1 Level 0 DFD


20

8.3.3 DFD Level 1:-

Provides a more detailed breakout of pieces of the Context Level Diagram. You will highlight

the main functions carried out by the system, as you break down the high-level process of the

Context Diagram into its sub processes.

Fig 2. Level 1 DFD


21

8.3.4 DFD Level 2:-

Then goes one step deeper into parts of Level 1. It may require more text to reach the

necessary level of detail about the system‟s functioning.

Fig 3. Level 2 DFD (Vendor)

Fig 4. Level 2 DFD (Admin)


22

Fig 5. Level 2 DFD (Customer)

9. What is an ER diagram?

An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities”

such as people, objects or concepts relate to each other within a system. ER Diagrams are

most often used to design or debug relational databases in the fields of software

engineering, business information systems, education and research. Also known as ERDs

or ER Models, they use a defined set of symbols such as rectangles, diamonds, ovals and

connecting lines to depict the inter connected of entities, relationships and their attributes.

They mirror grammatical structure, with entities as nouns and relationships as verbs.
23

9.1 The components and features of an ER diagram

ER Diagrams are composed of entities, relationships and attributes. They also depict

cardinality, which defines relationships in terms of numbers. Here‟s a glossary:

9.1.1 Entity:-

A definable thing such as a person, object, concept or event that can have data stored about it.

Think of entities as nouns. Examples: a customer, student, car or product. Typically shown as

a rectangle.

Entity
Fig 6

9.1.2 Entity type:-

A group of definable things, such as students or athletes, whereas the entity would be the

specific student or athlete. Other examples: customers, cars or products.

9.1.3 Entity set:-

Same as an entity type, but defined at a particular point in time, such as students enrolled in a

class on the first day. Other examples: Customers who purchased last month, cars currently

registered in Florida. A related term is instance, in which the specific person or car would be

an instance of the entity set.

9.1.4 Entity categories:-

Entities are categorized as strong, weak or associative. A strong entity can be defined solely by

its own attributes, while a weak entity cannot. An associative entity associates entities (or

elements) within an entity set.


24

Associative Entity
Weak Entity

Fig 7

9.1.5 Entity keys:-

Refers to an attribute that uniquely defines an entity in an entity set. Entity keys can be super,

candidate or primary. Super key: A set of attributes (one or more) that together define an entity

in an entity set.

9.1.6 Candidate key:

A minimal super key, meaning it has the least possible number of attributes to still be a super

key. An entity set may have more than one candidate key.

9.1.7 Primary key:

A candidate key chosen by the database designer to uniquely identify the entity set. Foreign

key: Identifies the relationship between entities.

9.1.8 Relationship :-

How entities act upon each other or are associated with each other. Think of relationships as

verbs. For example, the named student might register for a course. The two entities would be

the student and the course, and the relationship depicted is the act of enrolling, connecting the

two entities in that way. Relationships are typically shown as diamonds or labels directly on

the connecting lines.


25

Relationship Weak
Relationship

Fig 8

9.1.9 Recursive relationship:

The same entity participates more than once in the relationship.

9.1.10 Attribute

A property or characteristic of an entity. Often shown as an oval or circle.

Attribute
Primary Key Attribute

Fig 9

9.1.11 Descriptive attribute:

A property or characteristic of a relationship (versus of an entity.)

9.1.12 Attribute categories:

Attributes are categorized as simple, composite, derived, as well as single-value or multi-

value.
26

Simple:

Means the attribute value is atomic and can‟t be further divided, such as a phone number.

Composite:

Sub-attributes spring from an attribute.

Derived:

Attributed is calculated or otherwise derived from another attribute, such as age from a

birthdate.

Multi-value:

More than one attribute value is denoted, such as multiple phone numbers for a person.

Single-value:

Just one attribute value. The types can be combined, such as: simple single-value attributes or

composite multi-value attributes.

Fig 10
27

E.R Diagram of “Lap_tech”:-

Fig 11. ER Diagram

9.4 What is RDBMS?

RDBMS stands for Relational Database Management System. RDBMS is the basis for

SQL, and for all modern database systems like MS SQL Server, IBM, DB2, Oracle,
28

MySQL, and Microsoft Access. A Relational database management system (RDBMS) is a

database management system (DBMS) that is based on the relational model as introduced

by E. F. Codd.

9.4.1 What is a table?

The data in an RDBMS is stored in database objects which are called as tables. This table

is basically a collection of related data entries and it consists of numerous columns and

rows. Remember, a table is the most common and simplest form of data storage in a

relational database.

9.4.2 What is a field?

Every table is broken up into smaller entities called fields. The fields in the CUSTOMERS

table consist of ID, NAME, AGE, ADDRESS and SALARY. A field is a column in a table

that is designed to maintain specific information about every record in the table.

9.4.3 What is a Record or a Row?

A record is also called as a row of data is each individual entry that exists in a table. For

example, there are 7 records in the above CUSTOMERS table.

9.4.4 What is a column?

A column is a vertical entity in a table that contains all information associated with a

specific field in a table. For example, a column in the CUSTOMERS table is ADDRESS,

9.4.5 What is a NULL value?

A NULL value in a table is a value in a field that appears to be blank, which means a field

with a NULL value is a field with no value. It is very important to understand that a NULL

value is different than a zero value or a field that contains spaces. A field with a NULL
29

value is the one that has been left blank during a record creation.

10. SQL Constraints :-

Constraints are the rules enforced on data columns on a table. These are used to limit the

type of data that can go into a table. This ensures the accuracy and reliability of the data in

the database. Constraints can either be column level or table level. Column level

constraints are applied only to one column where as, table level constraints are applied to

the entire table.

10.1 Data Integrity:-

The following categories of data integrity exist with each RDBMS −

10.2 Entity Integrity:-

There are no duplicate rows in a table.

10.3 Domain Integrity:–

Enforces valid entries for a given column by restricting the type, the format, or the range

of values.

10.4 Referential integrity:–

Rows cannot be deleted, which are used by other records.

10.5 User-Defined Integrity:–

Enforces some specific business rules that do not fall into entity, domain or referential

integrity.

10.6 Database Normalization:-

Database normalization is the process of efficiently organizing data in a database. There

are two reasons of this normalization process − Eliminating redundant data, for example,
30

storing the same data in more than one table. Ensuring data dependencies make sense.

Both these reasons are worthy goals as they reduce the amount of space a database

consumes and ensures that data is logically stored. Normalization consists of a series of

guidelines that help guide you in creating a good database structure.

Normalization guidelines are divided into normal forms; think of a form as the format or

the way a database structure is laid out. The aim of normal forms is to organize the

database structure, so that it complies with the rules of first normal form, then second

normal form and finally the third normal form.

It is your choice to take it further and go to the fourth normal form, fifth normal form and

so on, but in general, the third normal form is more than enough.

 First Normal Form (1NF)

 Second Normal Form (2NF)

 Third Normal Form (3NF).

11. MySQL :-

MySQL is an open source SQL database, which is developed by a Swedish company –

MySQL AB. MySQL is pronounced as "my ess-que-ell," in contrast with SQL,

pronounced "sequel."

MySQL is supporting many different platforms including Microsoft Windows, the major

Linux distributions, UNIX, and Mac OS X.

MySQL has free and paid versions, depending on its usage (non-commercial/commercial)

and features. MySQL comes with a very fast, multi-threaded, multi-user and robust SQL

database server.
31

11.1 History :-

 Development of MySQL by Michael Widenius & David Axmark beginning in

1994. First internal release on 23rd May 1995. Windows Version was released on

the 8th January.

 1998 for Windows 95 and NT.

 Version 3.23: beta from June 2000, production release January 2001.

 Version 4.0: beta from August 2002, production release March 2003 (unions).

 Version 4.01: beta from August 2003, Jyoti adopts MySQL for database tracking.

 Version 4.1: beta from June 2004, production release October 2004.

 Version 5.0: beta from March 2005, production release October 2005.

 Sun Microsystems acquired MySQL AB on the 26th February 2008.

11.2 Features :-

High Performance.

High Availability.

Scalability and Flexibility Run anything.

Robust Transactional Support.

Web and Data Warehouse Strengths.

Strong Data Protection.

Comprehensive Application Development.

Management Ease.

11.3 MS SQL Server

MS SQL Server is a Relational Database Management System developed by Microsoft Inc.


32

Its primary query languages are:−

11.4 History :-

1987 - Sybase releases SQL Server for UNIX.

1988 - Microsoft, Sybase, and Aston-Tate port SQL Server to OS/2.

1989 - Microsoft, Sybase, and Aston-Tate release SQL Server 1.0 for OS/2.

1990 - SQL Server 1.1 is released with support for Windows 3.0 clients.

Aston - Tate drops out of SQL Server development.

2000 - Microsoft releases SQL Server 2000.

2001 - Microsoft releases XML for SQL Server Web Release 1 (download).

2002 - Microsoft releases SQLXML 2.0 (renamed from XML for SQL Server).

2002 - Microsoft releases SQLXML 3.0.

2005 - Microsoft releases SQL Server 2005 on November 7th, 2005.

11.5 Features :-

 High Performance

 High Availability

 Database mirroring

 Database snapshots

 CLR integration

 Service Broker

 DDL triggers

 Ranking functions

 Row version-based isolation levels

 XML integration
33

 TRY CATCH

 Database Mail

Tables For Lap_Tech:-

Usertype :-

Siteuser :-
34

Vendorappliedlist :-

` Brand :-

Product :-

Product-Specifications :-
35

Product-Image :-

Cart :-
36

Contact Us :-

Customer-Detail :-
37

Table Design Screenshots : -

1. UserType

2. Siteuser
38

3. Vendorappliedlist

4. Brand
39

5. Product :-

6. Product-Specifications
40

7. Product-Image Upload

8. Cart
41

9. Contact Us

10. Customer Detail


42

12. Requirement Specification :-

Hardware Requirement:-

Processor : Pentium Processor ISA 32 Family

Secondary Storage : 10 GB HDD (Max.)

Floppy Drive : 1.44 FDD

Memory : 1 GB RAM

Network Adapter : Ethernet Adapter

Modem : 128kbps Voice Fax Data

Software Requirement:-

Platform : Windows, Mac, Linux

Operating System : Windows (XP,7,8,8.1,10)

Framework : ASP.NET Framework 2.0

Front-End Tool : ASP.Net with C#,

End Tool : SQL

Editing Tool : Microsoft FrontPage 2000

Scripting Tool : Java script, XML (style Sheet (.xsl))

Server : Apache Tomcat Server

12.1 HARDWARE REQUIREMENTS :-

12.1.1 Processor (CPU)

The overall speed or clock speed of the computer and how fast it is capable of processing data

is managed by the computer processor (CPU). The computer will be much faster and more
43

powerful when it is capable of executing more instructions every second. For example, the first

computer processor was the Intel 4004, which was only a 740 kHz processor and capable of

processing approximately 92,000 instructions per second. Today's processors are multi-core

GHz processors capable of processing over 100 billion instructions per second.

12.1.2 Cache

Although today's computers can execute billions of instructions every second, the processor is

usually waiting for those instructions from the slower types of memory in the computer.

Because RAM and the hard drive are slower than the CPU, computer processors and

motherboards use cache to transfer data between the processor, memory, and components in

the computer.

Cache is the fastest type of memory and a computer with more L2 cache or L3 cache is

capable of storing more instructions and send those instructions to the processor more

efficiently.

12.1.3 Memory (RAM)

A computer with more memory (RAM) will be capable of storing more programs that are

currently running in memory.

If your computer runs out of memory, the computer must swap unused data stored in memory

to your hard disk drive until it is needed again.

By adding this extra step and because the hard drive is the slowest type of memory your

computer can become much slower if it does not have enough memory.
44

12.1.4 BUS speed

The bus speed of the motherboard can increase or decrease the speed at which data is being

transferred between all the hardware components in the computer.

For example, a Front Side Bus (FSB) of 66 MHz is going to be much slower than a 400 MHz

FSB. If the computer has a slow bus, the processor has to wait longer for the instructions,

which makes the computer run slower.

12.1.5 Random Access Memory

RAM (Random Access Memory) is the internal memory of the CPU for storing data, program,

and program result. It is a read/write memory which stores data until the machine is working.

As soon as the machine is switched off, data is erased.

Access time in RAM is independent of the address, that is, each storage location inside the

memory is as easy to reach as other locations and takes the same amount of time. Data in the

RAM can be accessed randomly but it is very expensive.

RAM is of two types −

• Static RAM (SRAM)

• Dynamic RAM (DRAM)

12.1.6 Static RAM (SRAM)

The word static indicates that the memory retains its contents as long as power is being

supplied. However, data is lost when the power gets down due to volatile nature. SRAM chips

use a matrix of 6-transistors and no capacitors. Transistors do not require power to prevent

leakage, so SRAM need not be refreshed on a regular basis.

There is extra space in the matrix, hence SRAM uses more chips than DRAM for the same

amount of storage space, making the manufacturing costs higher. SRAM is thus used as cache
45

memory and has very fast access.

Characteristic of Static RAM

Long life

No need to refresh

Faster

Used as cache memory

Large size

Expensive

High power consumption

12.1.7 Dynamic RAM (DRAM) :-

DRAM, unlike SRAM, must be continually refreshed in order to maintain the data. This is

done by placing the memory on a refresh circuit that rewrites the data several hundred times

per second. DRAM is used for most system memory as it is cheap and small. All DRAMs are

made up of memory cells, which are composed of one capacitor and one transistor.

Characteristics of Dynamic RAM:-

Short data lifetime

Needs to be refreshed continuously

Slower as compared to SRAM

Used as RAM

Smaller in size

Less expensive

Less power consumption


46

12.1.8 Hard disk drive

A hard disk drive (HDD), hard disk, hard drive or fixed disk is a data storage device that uses

magnetic storage to store and retrieve digital information using one or more rigid rapidly

rotating disks (platters) coated with magnetic material.

The platters are paired with magnetic heads, usually arranged on a moving actuator arm, which

read and write data to the platter surfaces. Data is accessed in a random-access manner,

meaning that individual blocks of data can be stored or retrieved in any order and not only

sequentially. HDDs are a type of non-volatile storage, retaining stored data even when

powered off.

The primary characteristics of an HDD are its capacity and performance. Capacity is specified

in unit prefixes corresponding to powers of 1000: a 1-terabyte (TB) drive has a capacity of

1,000 gigabytes (GB; where 1 gigabyte = 1 billion bytes). Typically, some of an HDD's

capacity is unavailable to the user because it is used by the file system and the computer

operating system, and possibly inbuilt redundancy for error correction and recovery.

Performance is specified by the time required to move the heads to a track or cylinder (average

access time) plus the time it takes for the desired sector to move under the head (average

latency, which is a function of the physical rotational speed in revolutions per minute), and

finally the speed at which the data is transmitted (data rate).

The two most common form factors for modern HDDs are 3.5-inch, for desktop computers,

and 2.5-inch, primarily for laptops. HDDs are connected to systems by standard interface

cables such as PATA (Parallel ATA), SATA (Serial ATA), USB or SAS (Serial Attached

SCSI) cables.
47

13. Software Requirements:-

13.1 Java

13.1.1 Introduction:-

Java is a new and popular language created by sun Microsystems. The best news about java is

that it is object oriented architecture, interpreted, robust, secure, portable, high performance,

multithreaded & dynamic language.

With java, we can develop a single application i.e. immediately usable on multiple platforms.

Imagine the countless hours that will save by being able to develop a single application usable

on windows, UNIX & Macintosh system.

Java produces two program types‟ application & Applet. Applications are standard one & can

be run directly from me command line. Applets requires on external program to provide an

interface to the user.

Java defines data as objects with methods that support the objects. Java is purely objects. Java

is purely object oriented & provides abstraction, encapsulation, inheritance & polymorphism.

Even a very basic program has a class. Any code written in java is inside a class. Java is tuned

to the web, java programs can be built in java, that user‟s resource from any other computer.

Java is the both interpreted & compiled. The code is complied. The code is compiled with a

byte code i.e. binary & platform independent. When a program has to execute the code is

fetched into management & interpreted on the user‟s machines as on interpreted language, java

has simple syntax.

When a piece of code is compiled all errors are listed together. A program is executed only

when all the errors have been rectified. An interpreter, on the other hand, verifies the code &
48

execution reaches the statement with an error is the error report.

Compilation is the process of converting the code into a language that the compiler

understands machines language. When compiling a program using a compiler, the compiler

checks for syntactical (grammatical) errors. In code and lists all the errors on the screen. The

errors are rectified and the program is recompiled to get the machine language code. Java

compilers compile the code to a byte code that is understood by the java environment.

Byte code is result of compiling a java program this code can be executed on any platform. In

other words due to the byte cod compilation processes an interpretation by a browser, java

programs can be executed on a variety of hardware and software. The only requirement is that

the system should have a java enabled internet browser. A java compiler is written in java and

the run time environment, the interpreter is written in c. the java interpreter can execute java

code directly on any machine, on which java a interpreter has been installed.

A java program can run on any machine that has a java interpreter. The byte code supports

connection to multiple databases. Java code is portable. Therefore, other people can use

programs that you write in java even if they have different machines with different operating

system.

Due to strong type checking done by java on the user‟s machine any changes to the program

are tagged as errors and program will not execute, java is there secure.

Java programs are comparable in speed to the programs written in other compiler based

languages like c and c++. Java is faster than other interpreter based languages like basic sense

it is compiled and interpreted.


49

13.1.2 History of Java

Sun Micro Systems began a project for software to run TV and VCR sets -i.e., Interactive TV

& VCR. A team of Software Engineers led by James Gosling others laid specifications for this

project in January 1991. By September 1992 the basic system was drafted. These interactive

sets were called Set-top boxes. The hardware was called *7, O/S was names Green and the

programming language called OAK.

Later the language was renamed Java, as OAK was already registered. Meanwhile in 1993,

the development of MOSAIC (Browser) led to the widespread use of WWW. Gosling realized

by chance that Java was well suited for the Web because it was secure and most importantly

architecture neutral.

In September 1994 a browser called Hot Java was developed entirely in Java on May 23rd

1995 Java was formally released.Seeing the immense potential software companies began to

license the technology to develop their products in Java. The Java Development Kit 1.0 was

released on January 23rd 1996. Sun‟s game plan is to popularize Java. Java is freely

distributed on the Internet.

Java is loosely based on C++ syntax, and is meant to be Object Oriented. It however differs

from C++ in many ways. Structure of Java is midway between an interpreted and a compiled

language. Java programs are compiled by the Java compiler into „Byte codes‟, which are

secure and portable across different platforms. These byte codes are essentially instructions

encapsulated in a single byte, to what is known as a Java Virtual machine (JVM) which resides

in a standard browser.

For that matter any application can have JVM built –in, JVM verifies these byte codes when

down loaded by the browser for integrity. JVMs are available for almost all operating systems
50

now. JVM converts these byte codes into machine specific instructions at runtime.

Java is Object Oriented

Java is truly an Object Oriented language, since technology is best suited for distributed

client/server systems on the Net. It fully incorporates the concept of reusable component

software. With the exception of primitive data types, every thing in Java is an object. Even the

primitive types can be encapsulated within objects of necessary. Four fundamental aspects of

object oriented technology are well supported in JAVA.

Encapsulation – Instance variables and methods for a class are packaged together, thus

providing modularity and information hiding.

Inheritance – Subclasses depicting newer behavior of existing classes is allowed. But multiple

inheritance is not available.

Polymorphism – Same message sent to different object results in a behavior dependent on the

nature of the object receiving that message.

For example, if you send a „move‟ message to an „animal‟ object you would not want to

concerned about the nature of the animal you are referring to. If it is a rabbit it should hop and

a Snake should respond by wriggling.

Dynamic binding – As explained the programmed doesn‟t need to worry about the object type

at coding time, the type of the object is resolved only at runtime and this is especially

important for Java because Java objects can come from any one and may have come from any

where.

Like in C++, Java supports public and protected variables. Java has a constructor method to

initialize when an object instance is created from a class. Java supports most of the concepts of

classes that a standard object oriented language provides. There is no need for an explicit
51

destructor. Java supports the concept of abstract class and abstract methods. Abstract classes

define a generic class. They are at the highest level of class hierarchy.

14. Software Quality Assurance Plan :-

Each development and maintenance project should have a Software Quality Assurance Plan

that specifies its goals.the SQA tasks t0 be performed.the standard against which the

development work is to be measured,and the procedures and organizational structure.

The IEEE Standards for the Software Quality Assurance Plans States that the Plan should

contain the following sections:

I. Purpose

2. Refrence documents

3. Managenment

4. Documentation

5. Standards practices and conventions

6. Reviews and audits

7. Configuration Management

8. Problem reporting and corrective action

9. Tools technique and methodologies

10. Code Control

II. Media Control

12. Supplier Control


52

15. Purpose , Scope and Overview :-

The purpose of this Software Quality Assurance(SQA) Plan is to establish the goals.

Processes ,and r responsibility required to implement effective quality assurance function

for the Laptech.

The Laptech provide the framework necessary to ensure a consistent approach to

software quality assurance thorughoput the project life cycle. This plan establishes the

SQA activities performed throughout the lifecycle of the Laptech.

Specifically. This SQA Plan will show that the SQA function is in place for this

project.It will show that the SQA group has a reporting channel to senior management that

is independent of the project manager, the projects software engineering group and

software related to groups that include software Configuration Management

(SCM).System and Software Test,and Logistics.

The goal of the SQA program is to verify that all software and Documentation to be

deliver meet all technical requirements.

2. Reference documents:

a. Software Quality Assurance, Principles and Practice

3. Management:

An IEEE standard lays down three aspects that should be covered in the Software Quality

Assurance Plan:

Organization:

The organization section includes the roles of the team members. Their hierarchy etc. It is

important that the head of the Software Quality Assurance (SQA)function in the

organization has the adequate authority to be able to perform independent verification that
53

the processes are adhered to.

The following describes the functional groups that influence and control software quality.

a). Program Management/Line Management (Sponsor) is responsible for the following

items:

 Identify an individual or group independent from the Project to audit and report on

the project's SQA function.

 Identifying thequality factors to be implemented in the system and software.

b).Project Management is responsible for:

 Resolving and following-upon any quality issues raised by SQA.

 Identifying,developing and maintaining planning documents Such as the Program

Management Plan.

c). System Engineering is responsible for:

 Implementing the engineering practices. processes. And procedures as defined in

program/project planning documents.

d). Software Design/Development is responsible for::

 Identifying , implementing and evaluating the quality factors to be implemented in

the software.

e). Software Test is responsible for:

 Verifying Implementing the software test practices. processes. And procedures as


54

defined in program/project planning documents.

f). System Test is responsible for:

 Verifying the quality factors are implemented in the system (software and

hardware).

g). Logistics is responsible for:

 Reviewing and commenting on the SQA Plan.

 lmplementing the quality program in accord Laptech assurance with this SQA

Plan.

h). Systems Engineering Process Office (SEPO) is responsible for :

 Maintaining the SQA Process.

 Ensuring SQA training availability.

 Providing assistance in software process engineering and software process

improvement.

Tasks :-

An SQA task is performed in relationship to what software development activities are

taking place. One or more SQA tasks can be performed concurrently until a task is

completed.

The following are the task of the SQA plan :-

 Evaluate System Requirements Analysis Process


55

 Evaluate System Design Process

 Evaluate Software Requirements Analysis Process

 Evaluate Software Design Process

 Evaluate Software Tools

 Evaluate Software Implementation and Unit Testing Process Evaluate End-item

delivery Process

 Evaluate Configuration Management Process

b) Responsiblities :

The project manager and design/development teams have primary responsibility for the

quality controls applied during the development of the software project.

The quality manager will :

 Agree to the quality plan with the project manager.

 Approve the plan of the audits for the project which are to be carried out by quality

personnel.

 Resolve any disagreement between the project manager and quality personnel on

matters relating to quality.

 Review the activities performed by project personnel to ensure that the

requirements of the quality plan and quality procedures are being satisfied.

 Quality personnel will.

 Carry out planned internal audits of the project to assess compliance with quality

objectives.

 Agree on corrective action with the project manager for any.

 Agree on corrective action with the project manager for any discrepancies. non-
56

conformities found and ensure that corrective action is taken.

 Evaluate defect trends and take appropriate action.

Documentation :-

The basic purpose of the documentation section of the Software Quality Assurance Plan is

to describe the documentation to be produced and how it is to be reviewed.

The documentation section normally includes the following:

 Software Requirements Specification (SRS)

 Software Design Description

 Software Verification Plan

 Software Verification report

 Reference to Software Standards (ISO. (MM. IEEE etc) and procedures mentioned

and defined as in the Quality Manual and Quality Management System

 User guides. operators and programmers manual

 Configuration Management Plan

 Software Quality Objectives.

To verify the delivery of a fully conforming, high•quality product, every individual

assigned to the project will participate in quality assurance. This section describes

the procedures used by SQA to verify that the quality assurance provisions of this

SQA Plan and applicable standards, practices, conventions, and metrics are met. The

following measurements will be made and used to determine the cost and schedule

status
57

 SQA milestone dates (completed)

 SQA work scheduled (planned)

 SQA work completed (actual)

 SQA effort expended (actual)

 SQA funds expended (planned)

Reviews and Audits:

The review and audits sections of Software Quality Assurance Plan will state which

technical and managerial reviews will be undertaken and how they will be carried out.

The ANSI standard suggests that the following would be a minimum set of reviews:

 Software Requirements Specification Review: This review is held to

approve the document defining the software requirements specifications and it

aims to check the adequacy of the requirements.

 Primary Design Review: The purpose of this review is to approve formally,

the software top-level design document.

Critical Design Review:

The purpose of this review is to approve the software detailed design document as a basis

for further development work.

Software Verification Review: The purpose of this review is to approve the test plan. It is

the evaluation of the adequacy and completeness of the methods described.

Functional Audit: This is held to verify that all the requirements in the software

requirements specification have been met.


58

Physical Audit: This is held to verify that the software and its documentation are

internally consistent prior to delivery to the user.

In-Process Audit: In-Process audits of a sample design are held to verify the consistency

of the design.

Configuration Management:

Assurance Plan covers configuration identification, configuration control. configuration

status accounting. and configuration auditing.

16. Problem reporting and corrective action:

This section of the Software Quality Assurance plan describes the system, which ensures

that software problems are documented and resolved. It should be a closed-loop system.

All the problems should be promptly reported at appropriate level, acted upon and

resolved. Each problem should be analyzed to determine its significance and causes and

classified by category and each problem must have severity level and a priority number.

For each problem, some corrective action and a target completion date should be

identified. The appropriate level of management should be made aware of the problems

and adverse trends. The corrective action taken will be evaluated to ensure that it solved

the problem without introducing any new evaluated to ensure that it solved the problem

without introducing any new problems. Management should monitor the status of all

unresolved problems.
59

17. Tools, techniques and methodologies:

Tools - SQA software tools include, but are not limited to, operating system utilities,

debugging aids, documentation aids, checklists. structuring preprocessors, file

comparators, structure analyzers. code analyzers. standards auditors, simulators, execution

analyzers. performance monitors. statistical analysis packages, software development

folder/files, software traceability matrices, test drivers, test case generators, static or

dynamic test tools, and information engineering CASE tools.

Technique - techniques include review of the use of standards. software inspections,

requirements tracing. requirements and design verification, reliability measurements and

assessments, and rigorous or formal logic analysis.

Methodologies - methodologies are an integrated set of the above tools and technique&

The methodologies should be well documental for accomplishing the task or activity and

provide a description of the process to be used.

Code Control :-

Code control includes the items listed below:

 Identifying. labeling, and cataloging the software to be controlled

 Identifying the physical location of the software under control

 Identifying the location, maintenance, and use of backup copies

 Distributing copies of the code

 lt Identifying the documentation that is affected by a change Establishing a new

version

 Regulating user access to the code.


60

Media Control:

The Media Control section of the Software Quality Assurance Plan will describe how the

media are to be protected from unauthorized access or

elamatte Security thre tc to a software nroieeks.nmefrom the following environmental

factors:

 Fire Damage

 Water Damage

 Energy Variations

 Structural Damage

 Pollution

 Unauthorized Intrusion

 Viruses and Worms

 Misuse of Software.

 Data and Services.

Supplier Control :-

Prior to any purchase of software to support the development effort. SQA and project

members will define and provide complete requirements to the supplier/vendor. The

Software Tool Evaluation Process will be followed. Part of the evaluation process will

require the supplier or vendor to describe their technical support, handling of user

questions and problems, and software product upgrades.

Records collection, maintenance and retention:

SQA activities are documented by records and reports that provide a history of product

quality throughout the software life cycle. Measurement data collected will be reviewed for
61

trends and process

18. Future Scope :-

The supplementary specification applies to online shopping system. This specification defines

the non-functional requirement of the system such as:

Functionality:

Since it stand alone application, one or more user may use it at a time.

Usability:

Desktop interface

Windows 98/2000/XP/7/8

Technology:

Front End : HTML5,Java Script ,PHP

Back End : xampp

Database : MySql

Reliability:

The system is available during online time only .

Performance:

The performance depends on hardware specification

19. References :-

The list of references contains bibliographic information about every source cited in the

report. Research materials are not included in the list of references, but rather in the parts

of the report dealing with the research implementation, data, and methods (see Research
62

Implementation). All sources cited must be relevant to the work in question. Their use

indicates the extent of study and knowledge associated with the report. An attempt should

be made to use original sources for both domestic and foreign works.

Books: -

 Rajiv Mall (Software Engineering)

 Newathe

 Pankaj Jalote

 Thinking About Java

 Java the Complete Reference

 Learning Web Design.

Search Engine: -

 www . google.com

Browser: -

 UC Browser

 Opera mini

 Mozilla Firefox

 Google Chrome
63

20. System Design

Index :-

Fig 12 .

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


64

Runat="Server">

<br />

<div class="w3-row">

<div class="w3-col">

<div style="height:25%">

<img alt="image1" class="slides" src="lap/s2.jpg" width="100%" />

<img alt="image2" class="slides" src="lap/s3.jpg" width="100%" />

<img alt="image2" class="slides" src="lap/s4.jpg" width="100%" />

<img alt="image2" class="slides" src="lap/s5.jpg" width="100%" />

</div>

<script type="text/javascript">

var index = 0;

startslideshow();

function startslideshow() {

var x = document.getElementsByClassName("slides");

for (var i = 0; i < x.length; i++) {

x[i].style.display = "none";

index++;

if (index > x.length) {

index = 1;

x[index - 1].style.display = "block";


65

setTimeout(startslideshow, 4000);

</script>

</div>

</div>

<!------------------------Brands--------------------------------------------->

<div id="brands" runat="server">

</div>

<!------------------------Brands--------------------------------------------->

<br style="clear:both" />

<!------------------------Filters--------------------------------------------->

<div id="filters" class="">

<div class="w3-row w3-amber">

<div class="w3-col s6 w3-center w3-padding"><div class="w3-col s3">&nbsp;</div>

<label class="w3-col s4">Sort By </label><div class="w3-col s1">&nbsp;</div>

<asp:DropDownList ID="drpDwnSortBy" CssClass="w3-input w3-col s4 w3-input

w3-round-large" runat="server"

onselectedindexchanged="drpDwnSortBy_SelectedIndexChanged" AutoPostBack="true">

<asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>

<asp:ListItem Text="Price Low To High" Value="1"></asp:ListItem>

<asp:ListItem Text="Price High To Low" Value="2"></asp:ListItem>

<asp:ListItem Text="Newest" Value="3"></asp:ListItem>

<asp:ListItem Text="Oldest" Value="4"></asp:ListItem>


66

</asp:DropDownList>

</div>

<div class="w3-col s6 w3-center w3-padding">

<label class="w3-col s3">Filter By </label>

<asp:DropDownList ID="drpFilter" CssClass="w3-input w3-col s3 w3-input w3-round-

large" runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged"

AutoPostBack="true">

<asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>

<asp:ListItem Text="Brand" Value="1"></asp:ListItem>

<asp:ListItem Text="RAM" Value="2"></asp:ListItem>

<asp:ListItem Text="Price" Value="3"></asp:ListItem>

</asp:DropDownList>

<div class="w3-col s1">&nbsp;</div>

<div class="w3-col s3">

<asp:DropDownList ID="brandfilter" CssClass="w3-input w3-input w3-round-

large" runat="server" Visible="False" AutoPostBack="true" DataSourceID="SqlDataSource1"

DataTextField="brandname" DataValueField="sno" AppendDataBoundItems="true"

onselectedindexchanged="brandfilter_SelectedIndexChanged">

<asp:ListItem Selected="True" Text="Select Brand" Value="0"></asp:ListItem>

</asp:DropDownList>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [brand] ORDER BY [brandname]">


67

</asp:SqlDataSource>

<asp:DropDownList ID="ramfilter" runat="server"

CssClass="w3-input w3-input w3-round-large" Visible="false"

onselectedindexchanged="ramfilter_SelectedIndexChanged"

AutoPostBack="true">

<asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>

<asp:ListItem Text="2 GB" Value="2GB"></asp:ListItem>

<asp:ListItem Text="4 GB" Value="4GB"></asp:ListItem>

<asp:ListItem Text="6 GB" Value="6GB"></asp:ListItem>

<asp:ListItem Text="8 GB" Value="8GB"></asp:ListItem>

</asp:DropDownList>

<div class="w3-row" id="pricefilter" runat="server" visible="false">

<asp:TextBox CssClass="w3-col s6 w3-input w3-round-large"

Placeholder="From" ID="txtpricefrom" TextMode="Number"

runat="server"></asp:TextBox>

<asp:TextBox CssClass="w3-col s6 w3-input w3-round-large"

Placeholder="To" ID="txtpriceto" TextMode="Number" runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-col s2" id="godiv" runat="server" visible="false">

<asp:Button CssClass="w3-button w3-round-large w3-hover-black w3-teal"

ID="btgo" runat="server" Text="Filter" onclick="btgo_Click" />

</div>
68

</div>

</div>

</div>

<!------------------------Filters--------------------------------------------->

<br />

<!------------------------Products---------------------------------------------->

<div id="productslist" class="w3-padding" runat="server">

</div>

<!------------------------Products---------------------------------------------->

<a href="login.aspx" id="goto" style="display:none"></a>

<script>

</script>

</asp:Content>

Back End:-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

{
69

protected void Page_Load(object sender, EventArgs e)

bool b = LoginManager.IsUserLoggedIn(Session);

if (b)

Button btlogin = (Button)Master.FindControl("btlogin") as Button;

btlogin.Visible = false;

Button btlogout = (Button)Master.FindControl("btlogout") as Button;

btlogout.Visible = true;

if (!this.IsPostBack)

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.GetData();

for (int i = 0; i < dt.Count; i++)

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

if(dr.status.Equals("active"))

productslist.InnerHtml += ""+productdisplay.productsDiv(dr.sno,Session);

string output = "";

List<List<string>> brandsData = brandUtilities.GetAllBrands();


70

List<string> brandName = brandsData[0];

List<string> brandImage = brandsData[1];

for (int i = 0; i < brandName.Count; i++)

string floatleft = "";

if (i <= brandName.Count - 1)

floatleft = " style='float:left;";

else

floatleft = " style='";

output += "<a href='searchResults.aspx?q=" + brandName[i] + "' style='text-

decoration:none'><div class='w3-padding w3-button w3-center' " + floatleft + " width:100px;

height:110px'><div style='width:100px; height:100px' class='w3-padding w3-center w3-

circle'><img src='" + brandImage[i] + "' class='' width='100%'/><br /><b>" + brandName[i] +

"</b></div></div></a>";

brands.InnerHtml = output+"";

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

int value = Convert.ToInt32(drpFilter.SelectedValue);

if (value == 0)

return;
71

if (value == 1)

brandfilter.Visible = true;

ramfilter.Visible = false;

pricefilter.Visible = false;

godiv.Visible = false;

if (value == 2)

brandfilter.Visible = false;

ramfilter.Visible = true;

pricefilter.Visible = false;

godiv.Visible = false;

if (value == 3)

brandfilter.Visible = false;

ramfilter.Visible = false;

pricefilter.Visible = true;

godiv.Visible = true;

protected void drpDwnSortBy_SelectedIndexChanged(object sender, EventArgs e)


72

int value = Convert.ToInt32(drpDwnSortBy.SelectedValue);

if (value == 0)

return;

if (value == 1)

SortPriceLowToHigh();

return;

if (value == 2)

SortPriceHighToLow();

return;

if (value == 3)

SortNewest();

return;

if (value == 4)

{
73

SortOldest();

return;

public void SortPriceLowToHigh()

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.PriceLowToHigh();

for (int i = 0; i < dt.Count; i++)

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno,Session);

public void SortPriceHighToLow()

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.PriceHighToLow();

for (int i = 0; i < dt.Count; i++)


74

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno, Session);

public void SortNewest()

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.GetData();

for (int i = 0; i < dt.Count; i++)

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

if (dr.status.Equals("active"))

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno, Session);

public void SortOldest()

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();
75

DataSet1.productsDataTable dt = da.GetOldestFirst();

for (int i = 0; i < dt.Count; i++)

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno, Session);

protected void brandfilter_SelectedIndexChanged(object sender, EventArgs e)

int value = Convert.ToInt32(brandfilter.SelectedValue);

if (value == 0)

return;

choosebrand(value);

public void choosebrand(int brandno)

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.GetDataByBrandNo(brandno);

for (int i = 0; i < dt.Count; i++)


76

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno, Session);

protected void ramfilter_SelectedIndexChanged(object sender, EventArgs e)

string value = ""+ramfilter.SelectedValue;

if (value.Equals("0"))

return;

chooseram(value);

public void chooseram(string ram)

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.GetProductByRAM(ram);

for (int i = 0; i < dt.Count; i++)

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno, Session);

}
77

protected void btgo_Click(object sender, EventArgs e)

float from = (float)Convert.ToDouble(txtpricefrom.Text);

float to= (float)Convert.ToDouble(txtpriceto.Text);

if (from.Equals("") || from.Equals(null) || to.Equals("") || to.Equals(null))

return;

priceFilteredDisplay(from, to);

public void priceFilteredDisplay(float from, float to)

productslist.InnerHtml = "";

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

DataSet1.productsDataTable dt = da.GetProductByPriceFilter(from, to);

for (int i = 0; i < dt.Count; i++)

DataSet1.productsRow dr = (DataSet1.productsRow)dt.Rows[i];

productslist.InnerHtml += "" + productdisplay.productsDiv(dr.sno, Session);

}}
78

Customer Registration:-

Fig 13

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="customerregistartion.aspx.cs"

Inherits="vendorregistration" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<div>

<br />

<div class="w3-row">

<div class="w3-col s3">


79

<br />

</div>

<div class="w3-col s6 w3-border">

<div class="w3-col s6 w3-border w3-blue">

<br /><br /><br /><br /><br /><br /><br />

<center><img alt="" src="photo/ico.png" width="20%" /></center>

<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br

/><br /><br /><br /><br /><br /><br />

</div>

<div class="w3-col s6 w3-border">

<br />

<center><h5 style="font-family:Century">Registration</h5></center><br />

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

<br />

<div class="w3-col s1">

<br />

</div>

<div class="w3-col s10">

<asp:Label ID="Label1" runat="server" Text="Full Name :"></asp:Label>

<asp:TextBox CssClass="w3-input w3-border w3-round-large" placeholder="Full

Name" style="width :80%" ID="txtname" runat="server"></asp:TextBox>

<asp:Label ID="Label8" runat="server" Text="Gender :"></asp:Label>

<asp:RadioButtonList ID="rdgender" RepeatDirection="Horizontal"


80

runat="server">

<asp:ListItem Text="Male" Value="Male" Selected="True"></asp:ListItem>

<asp:ListItem Text="Female" Value="Female"></asp:ListItem>

</asp:RadioButtonList>

<asp:Label ID="Label2" runat="server" Text="Email ID :"></asp:Label>

<asp:TextBox CssClass="w3-input w3-border w3-round-large"

placeholder="Email" style="width :80%" ID="txtemail"

runat="server"></asp:TextBox>

<asp:Label ID="Label7" runat="server" Text="Userid/Mobile

No.:"></asp:Label>

<asp:TextBox CssClass="w3-input w3-border w3-round-large"

placeholder="Username" style="width :80%" ID="txtuserid"

runat="server"></asp:TextBox>

<asp:Label ID="Label6" runat="server" Text="Password. :"></asp:Label>

<asp:TextBox CssClass="w3-input w3-border w3-round-large"

TextMode="Password" placeholder="Password" style="width :80%"

ID="txtpassword" runat="server"></asp:TextBox>

<asp:Label ID="Label3" runat="server" Text="Address :"></asp:Label>

<asp:TextBox CssClass="w3-input w3-border w3-round-large"

placeholder="Address" style="width :80%" ID="txtaddress"

runat="server"></asp:TextBox>

<asp:Label ID="Label4" runat="server" Text="Contact No. :"></asp:Label>

<asp:TextBox CssClass="w3-input w3-border w3-round-large"


81

placeholder="Contact" style="width :80%" ID="txtcontact"

runat="server"></asp:TextBox>

<br />

<center>

<asp:Button CssClass="w3-button w3-round-large w3-hover-blue w3-gray"

ID="btnreg" runat="server" Text="Register" onclick="btnreg_Click" />

<asp:Button CssClass="w3-button w3-round-large w3-hover-blue w3gray"

ID="txtreset" runat="server" Text="Reset" onclick="txtreset_Click" />

</center>

<br />

</div>

<div class="w3-col s1">

<br />

</div>

</div>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

</div>

</asp:Content>
82

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

bool b = LoginManager.IsUserLoggedIn(Session);

if (b)

string type = LoginManager.GetUserType(Session);

if (type.Equals("Admin"))

Response.Redirect("adminDashBoard.aspx");

else

if (type.Equals("Vendor"))

Response.Redirect("vendorDashBoard.aspx");

else

Response.Redirect("index.aspx");

}
83

protected void txtreset_Click(object sender, EventArgs e)

Validations.totalResetTextboxs(txtname,txtemail,txtuserid,txtpassword,txtaddress,txtcontact);

protected void btnreg_Click(object sender, EventArgs e)

try

String name, gender, email, userid, password, address;

int usertypeno = UserUtilities.GetUserSno();

if (txtcontact.Text.Equals("") || txtcontact.Text.Equals("null"))

throw new Exception("Please insert Your Contact");

if (Convert.ToInt64(txtcontact.Text) < 5999999999 || Convert.ToInt64(txtcontact.Text) >

9999999999)

throw new Exception("Please insert valid number");

long contact = Convert.ToInt64(txtcontact.Text);

name = txtname.Text;
84

if (name.Equals(""))

throw new Exception("Please Enter Your name");

gender = rdgender.SelectedValue;

if (gender.Equals(""))

throw new Exception("Please Select Your Gender");

email = txtemail.Text;

if (email.Equals(""))

throw new Exception("Please Provide Your Email-ID");

bool b = Validations.IsEMail(email);

if (!b)

throw new Exception("Please enter valid email");

userid = txtuserid.Text;

if (userid.Equals(""))

throw new Exception("Please Give Your User-ID");


85

if (UserUtilities.CheckExistingUser(userid))

throw new Exception("Userid Already Exist");

password = txtpassword.Text;

if (password.Equals(""))

throw new Exception("Please insert Your password");

if (password.Length < 6)

throw new Exception("Password Should be greater than 6 Digits");

address = txtaddress.Text;

if (address.Equals(""))

throw new Exception("Please insert Your Address");

DataSet1TableAdapters.siteuserTableAdapter da = new

DataSet1TableAdapters.siteuserTableAdapter();

da.Insert(name, gender, email, userid, password, "" + contact, usertypeno,"Active",

address);
86

Validations.setSuccess(lblmain, "Successfully Registered");

LoginManager.DoLogin(userid, password, Session, Response);

catch(Exception x)

Validations.setError(lblmain, x.Message);

Vendor Registration :-
87

Fig 14

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="vendorregistration.aspx.cs" Inherits="Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div class="w3-row">

<div class="w3-col s3">

<br />

</div>

<div class="w3-col s6 w3-border w3-round-large w3-card-4">


88

<div class="w3-row">

<div class="w3-col s4">

<br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<img alt="image not found" src="lap/logo.png" width="100%" /><br />

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

</div>

<div class="w3-col s4">

<br />

</div>

</div>

<div class="w3-row w3-margin">

<h3>Personal Details :</h3>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label1" runat="server" Text="Name :"></asp:Label><br />

<asp:TextBox ID="txtvendorname" CssClass="w3-input w3-border w3-

card-4 w3-round-large w3-grayscale-max" Placeholder="Enter Name"

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">


89

<asp:Label ID="Label2" runat="server" Text="DOB :"></asp:Label><br />

<asp:TextBox ID="txtdob" CssClass="w3-input w3-border w3-card-4 w3-round-

large w3-grayscale-max" Placeholder="Enter DOB"

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label3" runat="server" Text="Gender :"></asp:Label>

<center> <asp:RadioButtonList ID="txtgender" RepeatDirection="Horizontal"

runat="server">

<asp:ListItem Text="Male" Value="Male" Selected="True"></asp:ListItem>

<asp:ListItem Text="Female" Value="Female"></asp:ListItem>

</asp:RadioButtonList></center>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label4" runat="server" Text="State :"></asp:Label>

<asp:TextBox ID="txtstate" CssClass="w3-input w3-border w3-card-4 w3-round-

large w3-grayscale-max" Placeholder="Enter State"

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">
90

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label5" runat="server" Text="Contact Number :"></asp:Label>

<asp:TextBox ID="txtcontactno" CssClass="w3-input w3-border w3-

card-4 w3-round-large w3-grayscale-max" Placeholder="Enter Contact Number"

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label6" runat="server" Text="Email :"></asp:Label>

<asp:TextBox ID="txtemail" CssClass="w3-input w3-border w3-card-4 w3-round-

large w3-grayscale-max" Placeholder="Enter Email"

runat="server"></asp:TextBox>

</div>

</div>

<hr />

<div class="w3-row w3-margin">

<h3>Company Details :</h3>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label7" runat="server" Text="Company Name :"></asp:Label>

<asp:TextBox ID="txtcompanyname" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Company Name"

runat="server"></asp:TextBox>
91

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label9" runat="server" Text="Company Email :"></asp:Label>

<asp:TextBox ID="txtcompanyemail" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Company Email"

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label13" runat="server" Text="Address :"></asp:Label>

<asp:TextBox ID="txtcompanyaddress" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Address"

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label11" runat="server" Text="GST No.:"></asp:Label>

<asp:TextBox ID="txtcompanygstno" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter GST NO."

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">
92

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label12" runat="server" Text="Reg No. :"></asp:Label>

<asp:TextBox ID="txtcompanyregno" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Registration NO."

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label10" runat="server" Text="Contact No. :"></asp:Label>

<asp:TextBox ID="txtcompanycontactno" CssClass="w3-input w3-border w3-

card-4 w3-round-large w3-grayscale-max" Placeholder="Contact NO."

runat="server"></asp:TextBox>

</div>

</div>

<br />

<div class="w3-row w3-padding">

<div class="w3-col s6 w3-center w3-padding">

<asp:Button CssClass="w3-button w3-teal w3-round-large" ID="btsubmit"

runat="server" Text="Submit" onclick="btsubmit_Click" />

</div>

<div class="w3-col s6 w3-padding w3-center">

<asp:Button ID="txtreset" CssClass="w3-button w3-teal w3-round-large"

runat="server" Text="Reset" onclick="txtreset_Click" />

</div>
93

</div>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

<br /><br />

<script>

$(function () {

$(function () {

$("#ContentPlaceHolder1_txtdob").datepicker({

changeMonth: true,

changeYear: true,

yearRange: '1990:2050',

dateFormat: 'dd-M-yy',

defaultDate: '20-Jun-1990'

});

});

});

</script>

</asp:Content>
94

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

bool b = LoginManager.IsUserLoggedIn(Session);

if (b)

string type = LoginManager.GetUserType(Session);

if (type.Equals("Admin"))

Response.Redirect("adminDashBoard.aspx");

else

if (type.Equals("Vendor"))

Response.Redirect("vendorDashBoard.aspx");

else

Response.Redirect("index.aspx");
95

protected void btsubmit_Click(object sender, EventArgs e)

try

string vendorname = txtvendorname.Text;

if (vendorname.Equals(""))

throw new Exception("Please Enter Vendor Name");

DateTime dob = Convert.ToDateTime(txtdob.Text);

if (dob.Equals(""))

throw new Exception("Please Enter Vendor DOB");

string gender = txtgender.SelectedValue;

if (gender.Equals(""))

throw new Exception("Please Select Your Gender");

string state = txtstate.Text;

if(state.Equals(""))
96

throw new Exception("Please Insert Your State");

long contact = Convert.ToInt64(txtcontactno.Text);

if (contact.Equals(""))

throw new Exception("Please Enter Vendor Contact");

if (contact == 0 || contact == null)

throw new Exception("Please insert Your Contact");

if (contact < 5999999999 || contact > 9999999999)

throw new Exception("Please insert valid number");

string email = txtemail.Text;

if (email.Equals(""))

throw new Exception("Please Enter Vendor Email");

bool b = Validations.IsEMail(email);

if (!b)
97

throw new Exception("Please enter valid email");

string companyname = txtcompanyname.Text;

if (companyname.Equals(""))

throw new Exception("Please Enter Vendor Company Name");

if(VendorUtilities.CheckExistingVendor(companyname))

throw new Exception("Company Already Exist");

string companyemail = txtcompanyemail.Text;

if (companyemail.Equals(""))

throw new Exception("Please Enter Vendor company Email");

bool br = Validations.IsEMail(companyemail);

if (!br)

throw new Exception("Please enter valid email");

long companycontactno = Convert.ToInt64(txtcompanycontactno.Text);


98

if (companycontactno.Equals(""))

throw new Exception("Please Enter Vendor Company contact no");

if (companycontactno.Equals(""))

throw new Exception("Please Enter Vendor Contact");

if (companycontactno == 0 || companycontactno == null)

throw new Exception("Please insert Your Contact");

if (companycontactno < 5999999999 || companycontactno > 9999999999)

throw new Exception("Please insert valid number");

string companygstno = txtcompanygstno.Text;

if (companygstno.Equals(""))

throw new Exception("Please Enter Vendor GST no");

string companyregno = txtcompanyregno.Text;

if (companyregno.Equals(""))
99

throw new Exception("Please Enter Vendor Registration no");

string companyaddress = txtcompanyaddress.Text;

if (companyaddress.Equals(""))

throw new Exception("Enter Company Address");

int defaultvendorno = VendorUtilities.GetDefaultVendorno();

DataSet1TableAdapters.vendorappliedlistTableAdapter da = new

DataSet1TableAdapters.vendorappliedlistTableAdapter();

da.Insert(vendorname, dob, gender, state, ""+contact, email, companyname,

companyaddress, companyemail,""+ companycontactno, companygstno,

companyregno, "Pending", defaultvendorno);

Validations.setSuccess(lblmain, "Successfully Registered");

Response.Redirect("login.aspx");

catch (Exception x)

Validations.setError(lblmain, x.Message);

protected void txtreset_Click(object sender, EventArgs e)


100

Validations.totalResetTextboxs(txtvendorname,txtdob,txtstate,txtcontactno,txtemail

,txtcompanyname,txtcompanyemail,txtcompanyaddress,txtcompanygstno,txtcompa

nyregno,txtcompanycontactno);

LogIn Page :-

Fig 15

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
101

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<div>

<br />

<div class="w3-row">

<div class="w3-col s4"><br /></div>

<div class="w3-col s4 w3-border w3-round-xlarge w3-animate-opacity">

<div class="w3-row">

<img alt="" src="photo/loginimage.jpg" width="100%" style="height:150px" />

</div>

<br />

<center> <asp:Label ID="lblmessage" style="margin-top:9" runat="server"

Text=""></asp:Label></center>

<div class="w3-row w3-padding w3-center">

<div class="w3-col s4"><p style="color:ButtonShadow">Username :</p><br /><p

style="margin-top:-3px;color:ButtonShadow">Password :</p></div>

<div class="w3-col s8">

<asp:TextBox autocomplete="off" CssClass="w3-card-4 w3-input w3-border w3-

round-xlarge justzoom" style="width:90%;color:blue" placeholder="Username"

ID="Txtusername" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-card-4 w3-input w3-border w3-round-xlarge

justzoom" style="width:90%;color:blue" TextMode="Password"


102

placeholder="Password" ID="Txtpassword" runat="server"></asp:TextBox>

</div>

</div>

<br />

<div class="w3-row w3-center">

<div class="w3-col s3"> <asp:Button CssClass="w3-gray w3-button w3-round-

large" ID="Button1" runat="server" Text="Login" onclick="Button1_Click"

/></div>

<div class="w3-col s4"><a style="text-decoration:none" class=" w3-button w3-

round-large w3-light-blue" href="customerregistartion.aspx">Sign Up</a></div>

<div class="w3-col s5"><a style="text-decoration:none" class=" w3-button w3-

round-large w3-orange" href="vendorregistration.aspx">Merchant Sign

Up</a></div>

</div>

<i class="w3-right w3-padding w3-text-blue"><a

href="forgetpassword.aspx">Forget Password ?</a></i>

<br />

</div>

<div class="w3-col s4"><br /></div>

</div>

</div>

</asp:Content>
103

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

bool b = LoginManager.IsUserLoggedIn(Session);

if (b)

string type = LoginManager.GetUserType(Session);

if (type.Equals("Admin"))

Response.Redirect("adminDashBoard.aspx");

else

if (type.Equals("Vendor"))

Response.Redirect("vendorDashBoard.aspx");

else

Response.Redirect("index.aspx");
104

protected void Button2_Click(object sender, EventArgs e)

Response.Redirect("siteuser.aspx");

protected void Button1_Click(object sender, EventArgs e)

try

string username = Txtusername.Text;

string password = Txtpassword.Text;

if (username.Trim().Equals("") || username.Trim().Equals(null))

throw new Exception("Plese Input Username !!!!");

if (password.Trim().Equals("") || password.Trim().Equals(null))

throw new Exception("Plese Input Password !!!!");

bool b = LoginManager.DoLogin(username, password, Session, Response);

if (!b)

throw new Exception("Invalid Username or Password");


105

catch(Exception x)

Validations.setError(lblmessage, x.Message);

Customer Profile :-

Fig 16

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="customerprofile.aspx.cs" Inherits="profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


106

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br /><br />

<div class="w3-row">

<div class="w3-col s2">

<br />

</div>

<div class="w3-col s8 w3-border w3-card-4 w3-center w3-blue w3-round-xlarge">

<div class="w3-row w3-center w3-black">

<h2><b>Profile :-</b></h2>

</div><br />

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

<div class="w3-row">

<div class="w3-col s6 w3-padding">

<asp:Label ID="Label1" runat="server" Text="Name :-"></asp:Label>

<asp:TextBox ID="txtname" CssClass="w3-input w3-border w3-card-4 w3-round-

large" runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-padding">

<asp:Label ID="Label2" runat="server" Text="Contact :-"></asp:Label>

<asp:TextBox ID="txtmobile" CssClass="w3-input w3-border w3-card-4 w3-

round-large" runat="server"></asp:TextBox>
107

</div>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-padding">

<asp:Label ID="Label4" runat="server" Text="Address :-"></asp:Label>

<asp:TextBox ID="txtaddress" CssClass="w3-input w3-border w3-card-4 w3-

round-large" runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-padding">

<asp:Label ID="Label3" runat="server" Text="Email :-"></asp:Label>

<asp:TextBox ID="txtemail" CssClass="w3-input w3-border w3-card-4 w3-round-

large" runat="server"></asp:TextBox>

</div>

</div>

<br />

<div class="w3-row w3-center">

<asp:Button ID="btsave" Visible="false"

CssClass="w3-round-xxlarge w3-button w3-hover-blue w3-black w3-card-4"

runat="server" Text="Save Changes" onclick="Button1_Click" />

<asp:Button ID="btedit"

CssClass="w3-round-xxlarge w3-button w3-hover-blue w3-black w3-card-4"

runat="server" Text="Edit Profile" onclick="edit" />

</div>
108

<br />

</div>

<div class="w3-col s2">

<br />

</div>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectUserPage(Response, Session);

string type = Request.QueryString["type"];

int userno = UserUtilities.getSiteUserNo(Session["userid"] + "");

DataSet1TableAdapters.siteuserTableAdapter sa = new
109

DataSet1TableAdapters.siteuserTableAdapter();

DataSet1.siteuserDataTable st = sa.GetDataByUserId(Session["userid"] + "");

DataSet1.siteuserRow sr = (DataSet1.siteuserRow)st.Rows[0];

if (!this.IsPostBack)

txtname.Text = sr.name;

txtmobile.Text = sr.contact;

txtaddress.Text = sr.address;

txtemail.Text = sr.email;

txtname.ReadOnly = true;

txtmobile.ReadOnly = true;

txtaddress.ReadOnly = true;

txtemail.ReadOnly = true;

btsave.Visible = false;

btedit.Visible = true;

protected void Button1_Click(object sender, EventArgs e)

string name, address, email;

name = txtname.Text;

if (name.Equals(""))

{
110

throw new Exception("Please Enter Your name");

if (txtmobile.Text.Equals("") || txtmobile.Text.Equals("null"))

throw new Exception("Please insert Your Contact");

if (Convert.ToInt64(txtmobile.Text) < 5999999999 || Convert.ToInt64(txtmobile.Text) >

9999999999)

throw new Exception("Please insert valid number");

long contact = Convert.ToInt64(txtmobile.Text);

address = txtaddress.Text;

if (address.Equals(""))

throw new Exception("Please insert Your Address");

email = txtemail.Text;

if (email.Equals(""))

throw new Exception("Please Provide Your Email-ID");

bool b = Validations.IsEMail(email);
111

if (!b)

throw new Exception("Please enter valid email");

DataSet1TableAdapters.siteuserTableAdapter da = new

DataSet1TableAdapters.siteuserTableAdapter();

da.UpdateProfile(name, email, ""+contact, address,Session["userid"]+"");

txtname.ReadOnly = true;

txtmobile.ReadOnly = true;

txtaddress.ReadOnly = true;

txtemail.ReadOnly = true;

btsave.Visible = false;

btedit.Visible = true;

lblmain.Text = "Profile Updated Successfully";

protected void edit(object sender, EventArgs e)

txtname.ReadOnly = false;

txtmobile.ReadOnly = false;

txtaddress.ReadOnly = false;

txtemail.ReadOnly = false;

btsave.Visible = true;

btedit.Visible = false;
112

}}

Cart Item-List :-

Fig 17

Design:-

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="cartitemslist.aspx.cs" Inherits="cartitemslist" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<div class="w3-row">

<div class="w3-padding w3-col s8" id="items" runat="server">

<asp:GridView ID="CartsList" runat="server" AutoGenerateColumns="False"


113

CellPadding="4" DataKeyNames="sno" DataSourceID="SqlDataSource1"

ForeColor="#333333" GridLines="None" CssClass="w3-table-all">

<AlternatingRowStyle BackColor="White" ForeColor="#284775" />

<Columns>

<asp:TemplateField>

<ItemTemplate>

<div class='w3-padding'>

<div class='w3-row w3-card-4'>

<a href="productdetails.aspx?pno=<%# Eval("productno") %>"

target="_blank">

<div class='w3-col w3-padding s4 w3-center'>

<img width="50%" alt="pIm" src="<%#

products.GetDisplayImage(Convert.ToInt32(Eval("productno"))) %>" />

</div>

</a>

<div class='w3-col s8 w3-center w3-padding w3-row'>

<a href="productdetails.aspx?pno=<%# Eval("productno") %>"

target="_blank">

<div class='w3-col s5'>

<b><%#products.getDisplayName(Convert.ToInt32(Eval("productno")))

%></b><br/>

<%# products.get2Specifications(Convert.ToInt32(Eval("productno"))) %>

</div>
114

</a>

<div class='w3-col s7'>

<asp:Button OnClick="update" CssClass='w3-button w3-col s4' ID="minus" Font-

Bold="true" Text="-" CommandName="less" CommandArgument='<%#

Eval("sno") %>' runat="server"/>

<div ID="cartsDiv" runat="server" class=' w3-button w3-hover-white w3-col

s4'><%#Eval("quantity") %></div>

<asp:Button OnClick="update" CssClass='w3-button w3-col s4' ID="Button1"

Font-Bold="true" Text="+" CommandName="more" CommandArgument='<%#

Eval("sno") %>' runat="server"/>

</div>

<div>

Price : <i class="fa fa-rupee-sign"></i><%#

products.getSinglePrice(Convert.ToInt32(Eval("productno"))) %>/-<br />

Total : <i class="fa fa-rupee-sign"></i><%#

products.getTotalPrice(Convert.ToInt32(Eval("quantity")),Convert.ToInt32(Eval("

productno"))) %>/-

</div>

</div>

<br/>

</div>

</div>

</ItemTemplate>
115

</asp:TemplateField>

</Columns>

<EditRowStyle BackColor="#999999" />

<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />

<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />

<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />

<SortedAscendingCellStyle BackColor="#E9E7E2" />

<SortedAscendingHeaderStyle BackColor="#506C8C" />

<SortedDescendingCellStyle BackColor="#FFFDF8" />

<SortedDescendingHeaderStyle BackColor="#6F8DAE" />

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [cart] WHERE ([userno] = (SELECT sno

from siteuser where userid=@userno)) AND status='InCart'">

<SelectParameters>

<asp:SessionParameter Name="userno" SessionField="userid" Type="String" />

</SelectParameters>

</asp:SqlDataSource>

</div>

<div class="w3-padding w3-center w3-col s4 w3-gray" id="totals" runat="server">


116

<div>

<asp:Label ID="totalAmount" runat="server"></asp:Label>

<asp:Label ID="totalQuantity" runat="server"></asp:Label>

</div>

<div class="w3-center w3-padding w3-row">

<div class="w3-col s2">&nbsp;</div>

<a href="buynow.aspx?type=cart">

<div class="w3-col s8 w3-round-large w3-padding w3-xlarge w3-hover-border-

white w3-hover-text-white w3-hover-light-green w3-border w3-pale-green w3-text-

green w3-border-green">

<b>Proceed To Pay</b>

</div>

</a>

<div class="w3-col s2">&nbsp;</div>

</div>

</div>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;
117

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectUserPage(Response, Session);

int userno = UserUtilities.getSiteUserNo(Session["userid"] + "");

DataSet1TableAdapters.cartTableAdapter da = new

DataSet1TableAdapters.cartTableAdapter();

DataSet1.cartDataTable dt = da.GetDataUserNoAndStatus(userno, "InCart");

float ttlAmount=0, ttlquantity=0;

if (dt.Rows.Count <= 0)

Response.Redirect("index.aspx");

for (int i = 0; i < dt.Rows.Count; i++)

DataSet1.cartRow dr = (DataSet1.cartRow)dt.Rows[i];

ttlquantity+=dr.quantity;

products p = new products(dr.productno);

ttlAmount+= (p.price-p.discount)*dr.quantity;

}
118

totalQuantity.Text = "Total Quantity : " + ttlquantity;

totalAmount.Text = "Total Amount : " + ttlAmount;

public void update(object sender, EventArgs e)

Button b = (Button)sender;

int sno=Convert.ToInt32(b.CommandArgument);

DataSet1TableAdapters.cartTableAdapter da = new

DataSet1TableAdapters.cartTableAdapter();

DataSet1.cartDataTable dt = da.GetDataBySno(sno);

DataSet1.cartRow dr = (DataSet1.cartRow)dt.Rows[0];

int q=Convert.ToInt32(dr.quantity);

if (b.CommandName.Equals("less"))

if (q > 1)

da.UpdateQuantity(q - 1, sno);

else

da.DeleteItemWithSno(sno);

else

da.UpdateQuantity(q + 1, sno);

CartsList.DataBind();

}}
119

Buy Now :-

Fig 18

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="buynow.aspx.cs" Inherits="buynow" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div id="divPaytm" runat="server" style="z-index:100; position:absolute;

width:100%; background:rgba(150,150,150,0.8)" class="w3-row" visible="false" >

<div class="w3-col s4">&nbsp;</div>

<div class="w3-col s4" id="goImgHere">


120

<br /><br />

<img src="lap/qrcode.jpg" alt="img" width="50%" /><br /><br />

<i>Please Send the Screenshot of payment with Order Id/Bill No. on +91

7800357511</i><br />

<asp:Button ID="Button2" runat="server" Text="Done" onclick="Done_Click" />

<br /><br /><br />

</div>

<div class="w3-col s4">

<asp:Button CssClass="w3-button w3-xxlarge" Id="Hide" style="text-align:left"

runat="server" OnClick="showHide" Font-Bold="true" Text="X" />

</div>

</div>

<div class="w3-row">

<div class="w3-col s2">

<br />

</div>

<div class="w3-col s4 w3-center w3-border">

<h3>Product Name</h3>

</div>

<div class="w3-col s2 w3-center w3-border">

<h3>Quantity</h3>

</div>

<div class="w3-col s2 w3-center w3-border">


121

<h3>Price</h3>

</div>

<div class="w3-col s2">

<br />

</div>

</div>

<div class="w3-row">

<div class="w3-col s2">

<br />

</div>

<div class="w3-col s4 w3-border">

<asp:Label ID="lblproductname" runat="server" Text="Laptop"></asp:Label>

</div>

<div class="w3-col s2 w3-border">

<asp:Label ID="lblquantity" runat="server" Text="quantity"></asp:Label>

</div>

<div class="w3-col s2 w3-border">

<asp:Label ID="lblprice" runat="server" Text="price"></asp:Label>

</div>

<div class="w3-col s2">

<br />

</div>

</div>
122

<div class="w3-row">

<div class="w3-col s2">

<br />

</div>

<div class="w3-col s4 w3-border">

<br />

</div>

<div class="w3-col s2 w3-border">

Total

</div>

<div class="w3-col s2 w3-border">

<asp:Label ID="lbltotal" runat="server" Text="total"></asp:Label>

</div>

<div class="w3-col s2">

<br />

</div>

</div>

<br />

<div>

<div class="w3-row">

<div class="w3-col s2">

<br />

</div>
123

<div class="w3-col s8">

<div class="w3-row">

<div class="w3-col s1">

<br />

</div>

<div class="w3-col s10 w3-border">

<div class="w3-row w3-padding">

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

<div class="w3-col s2">

<asp:Label ID="Label1" runat="server" Text="Name :"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label3" runat="server" Text="Address :"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label5" runat="server" Text="Pincode :"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label7" runat="server" Text="Landmark :"></asp:Label>

</div>

<div class="w3-col s4 w3-padding">

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Name" ID="txtname" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Address" ID="txtaddress" runat="server"></asp:TextBox>


124

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Pincode" ID="txtpincode" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Landmark" ID="txtlandmark" runat="server"></asp:TextBox>

</div>

<div class="w3-col s2 w3-padding">

<asp:Label ID="Label2" runat="server" Text="Mobile No :"></asp:Label>

<br /><br /><br />

asp:Label ID="Label4" runat="server" Text="City/Dist.:"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label6" runat="server" Text="State :"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label8" runat="server" Text="PayThrough:"></asp:Label>

</div>

<div class="w3-col s4 w3-padding">

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Mobile no." ID="txtmobile" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="City/District" ID="txtcity" runat="server"></asp:TextBox>

<br />
125

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="State" ID="txtstate" runat="server"></asp:TextBox>

<br />

<asp:RadioButtonList ID="rdpay" runat="server">

<asp:ListItem Text="COD" Selected="True" Value="COD"></asp:ListItem>

<asp:ListItem Text="Paytm" Value="Paytm"></asp:ListItem>

</asp:RadioButtonList>

</div>

</div>

<br />

<center>

<asp:Button CssClass="w3-button w3-card-4 w3-round-large w3-black w3-

hover-black" ID="Button1" runat="server" Text="Place Order"

onclick="Button1_Click"/>

<asp:Button CssClass="w3-button w3-card-4 w3-round-large w3-black w3-hover-

black" ID="btreset" runat="server" Text="Reset" onclick="btreset_Click" />

</center>

<br />

</div>

<div class="w3-col s1">

<br />

</div>

</div>
126

</div>

<div class="w3-col s2">

<br />

</div>

</div>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

string type="";

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectUserPage(Response, Session);

type=Request.QueryString["type"];
127

int userno = UserUtilities.getSiteUserNo(Session["userid"] + "");

DataSet1TableAdapters.siteuserTableAdapter sa = new

DataSet1TableAdapters.siteuserTableAdapter();

DataSet1.siteuserDataTable st = sa.GetDataByUserId(Session["userid"] + "");

DataSet1.siteuserRow sr = (DataSet1.siteuserRow)st.Rows[0];

txtname.Text = sr.name;

txtmobile.Text = sr.contact;

txtaddress.Text = sr.address;

if (type.Equals("cart"))

DataSet1TableAdapters.cartTableAdapter da = new

DataSet1TableAdapters.cartTableAdapter();

DataSet1.cartDataTable dt = da.GetDataUserNoAndStatus(userno, "InCart");

string quantity="";

string price = ""; float total = 0;

string name="";

for (int i = 0; i < dt.Rows.Count; i++)

DataSet1.cartRow dr = (DataSet1.cartRow)dt.Rows[i];

products p = new products(dr.productno);

name += "" + products.getDisplayName(dr.productno)+"<br />";

quantity += "" + dr.quantity + "<br />";

price += "Rs." + ((p.price - p.discount)*dr.quantity)+"/-<br />";


128

total += (p.price - p.discount)*dr.quantity;

lblproductname.Text = "" + name;

lblquantity.Text = "" + quantity;

lblprice.Text = "" + price;

lbltotal.Text = "Rs." + total+"/-";

//cart calculations;

else

int pno = Convert.ToInt32(Request.QueryString["pno"]);

//product details;

products p = new products(pno);

lblproductname.Text= products.getDisplayName(pno);

lblquantity.Text = "1";

lblprice.Text="Rs. "+(p.price-p.discount)+"/-";

lbltotal.Text = "" + lblprice.Text;

protected void Button1_Click(object sender, EventArgs e)

try

{
129

DataSet1TableAdapters.customerdetailTableAdapter da = new

DataSet1TableAdapters.customerdetailTableAdapter();

string name, mobile, address, city, pincode, state, landmark, mode;

name = txtname.Text;

mobile = txtmobile.Text;

address = txtaddress.Text;

city = txtcity.Text;

pincode = txtpincode.Text;

state = txtstate.Text;

landmark = txtlandmark.Text;

mode = rdpay.SelectedValue;

if (mode.Equals("Paytm"))

divPaytm.Visible = true;

return;

da.Insert(name, mobile, address, city, pincode, state, landmark,

mode,System.DateTime.Now);

/************GET NEW SERIALNO**********************/

DataSet1.customerdetailDataTable dt = da.GetNewSno();

DataSet1.customerdetailRow dr = (DataSet1.customerdetailRow)dt.Rows[0];

int newsno = dr.sno;

int userno = UserUtilities.getSiteUserNo(Session["userid"] + "");


130

DataSet1TableAdapters.cartTableAdapter ca = new

DataSet1TableAdapters.cartTableAdapter();

if (type.Equals("product"))

int pno = Convert.ToInt32(Request.QueryString["pno"]);

ca.Insert(pno, userno, 1, newsno + "");

else

DataSet1.cartDataTable ct = ca.GetDataUserNoAndStatus(userno, "InCart");

for (int i = 0; i < ct.Rows.Count; i++)

DataSet1.cartRow cr = (DataSet1.cartRow)ct.Rows[i];

ca.UpdateStatusToOrderNo(newsno + "", userno, cr.productno);

Response.Redirect("receipt.aspx?id="+newsno);

catch (Exception ex)

Validations.setError(lblmain,"please check the input information");

}
131

protected void Done_Click(object sender, EventArgs e)

DataSet1TableAdapters.customerdetailTableAdapter da = new

DataSet1TableAdapters.customerdetailTableAdapter();

string name, address, city, pincode, state, landmark, mode;

name = txtname.Text;

if (name.Equals(""))

throw new Exception("please insert your name");

long contact = Convert.ToInt64(txtmobile.Text);

if (contact.Equals(""))

throw new Exception("Please Enter Vendor Contact");

if (contact == 0 || contact == null)

throw new Exception("Please insert Your Contact");

if (contact < 5999999999 || contact > 9999999999)

throw new Exception("Please insert valid number");

}
132

address = txtaddress.Text;

if (address.Equals(""))

throw new Exception("Please insert Your address");

city = txtcity.Text;

if (city.Equals(""))

throw new Exception("Please Insert Your city");

pincode = txtpincode.Text;

if (pincode.Equals(""))

throw new Exception("Please insert Your pincide");

state = txtstate.Text;

if (state.Equals(""))

throw new Exception("Please insert Your State");

landmark = txtlandmark.Text;

if (landmark.Equals(""))

{
133

throw new Exception("Please insert Your landmark");

mode = rdpay.SelectedValue;

da.Insert(name, ""+contact, address, city, pincode, state, landmark,

mode,System.DateTime.Now);

/************GET NEW SERIALNO**********************/

DataSet1.customerdetailDataTable dt = da.GetNewSno();

DataSet1.customerdetailRow dr = (DataSet1.customerdetailRow)dt.Rows[0];

int newsno = dr.sno;

int userno = UserUtilities.getSiteUserNo(Session["userid"] + "");

DataSet1TableAdapters.cartTableAdapter ca = new

DataSet1TableAdapters.cartTableAdapter();

if (type.Equals("product"))

int pno = Convert.ToInt32(Request.QueryString["pno"]);

ca.Insert(pno, userno, 1, newsno+"");

else

DataSet1.cartDataTable ct = ca.GetDataUserNoAndStatus(userno, "InCart");

for (int i = 0; i < ct.Rows.Count; i++)

DataSet1.cartRow cr = (DataSet1.cartRow)ct.Rows[i];
134

ca.UpdateStatusToOrderNo(newsno + "", userno, cr.productno);

Response.Redirect("receipt.aspx?id=" + newsno);

public void showHide(object sender, EventArgs e)

divPaytm.Visible = false;

protected void btreset_Click(object sender, EventArgs e)

Validations.totalResetTextboxs(txtname,txtmobile,txtstate,txtpincode,txtlandmark,txtcity,txtad

dress);

}
135

Reciept :-

Fig 19

Design :-

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="receipt.aspx.cs"

Inherits="receipt" %>

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

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

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

<head runat="server">

<title></title>

<link rel="Stylesheet" href="css/invoice.css" />

<link rel="Stylesheet" href="css/StyleSheet.css" />

</head>

<body>
136

<form id="form1" runat="server">

<br />

<div class="invoice-box w3-center">

<table width="100%">

<tr >

<td width="70%">

<h1><b>Lap_Tech</b></h1>

<h3>Varanasi,221008<br />8318989714</h3>

</td>

<td width="30%" style='text-align:left' align="left">

<img src="lap/logo.png" width="100%" alt="image" /><br />

<b>Bil No. : </b><asp:Label ID="lblbillno" runat="server" Text="Bill

No."></asp:Label><br /><b>Date : </b><asp:Label ID="lbldate" runat="server"

Text="Your Date"></asp:Label>

</td>

</tr>

</table>

<div class='w3-black w3-circle' style="height:1px"></div>

<br />

<table width="100%" border="0" class="w3-card w3-padding" style="border-

spacing:0">

<tr>

<td colspan="4">
137

<center><b class='w3-large'>Customer Details</b></center>

<div style='height:3px' width='100%' class="w3-circle w3-black"></div>

</td>

</tr>

<tr>

<td width="15%" style="text-align:right">

<b>

Name:<br />

Address:<br />

Distt:<br />

State:<br />

</b>

</td>

<td width="35%" style="text-align:left">

<asp:Label ID="lblname" runat="server" Text="Name :"></asp:Label><br />

<asp:Label ID="lblAddress" runat="server" Text="Address

:"></asp:Label><br />

<asp:Label ID="lblDistrict" runat="server" Text="Dist :"></asp:Label><br

/>

<asp:Label ID="lblState" runat="server" Text="State :"></asp:Label>

</td>

<td width="15%" style="text-align:right">

<b>
138

Customer ID:<br />

Mobile No.:<br />

Landmark:<br />

PIN:<br />

</b>

</td>

<td width="35%" style="text-align:left">

<asp:Label ID="lblCustId" runat="server" Text="Customer

ID"></asp:Label><br />

<asp:Label ID="lblmobileno" runat="server" Text="Mobile

:"></asp:Label><br />

<asp:Label ID="lblLandMark" runat="server" Text="Landmark

:"></asp:Label><br />

<asp:Label ID="lblPincode" runat="server" Text="Pincode :"></asp:Label>

</td>

</tr>

</table>

<br />

<div>

<center><b class='w3-large'>Product Details</b></center>

<div style='height:3px' width='100%' class="w3-circle w3-black"></div>

<table width="100%" border="0" class='w3-padding' style="border-spacing:0">

<tr>
139

<td width="5%" style="border-bottom:1px; border-bottom-style:solid; border-

right:1px; border-right-style:solid"><b>Sno.</b></td>

<td width="60%" style="border-bottom:1px; border bottom-style:solid; border-

right:1px; border-right-style:solid"><b><center>Product</center></b></td>

<td width="10%" style="border-bottom:1px; border-bottom-style:solid;

border-right:1px; border-right-style:solid"><b>Quantity(Pcs.)</b></td>

<td width="10%" style="border-bottom:1px; border-bottom-style:solid;

border-right:1px; border-right-style:solid"><b>Rate</b></td>

<td width="15%" style="border-bottom:1px; border-bottom-

style:solid"><b>Total</b></td>

</tr>

<tr>

<td style="border-bottom:1px; border-bottom-style:solid; border-right:1px; border-

right-style:solid"><asp:Label ID="lblSno" runat="server"

Text="Label"></asp:Label></td>

<td style="border-bottom:1px; border-bottom-style:solid; border-right:1px;

border-right-style:solid"><center><asp:Label ID="lblProduct" runat="server"

Text="Label"></asp:Label></center></td>

<td style="border-bottom:1px; border-bottom-style:solid; border-right:1px;

border-right-style:solid"><center><asp:Label ID="lblQuantity" runat="server"

Text="Label"></asp:Label></center></td>

<td style="border-bottom:1px; border-bottom-style:solid; border-right:1px;

border-right-style:solid"><asp:Label ID="lblRate" runat="server"


140

Text="Label"></asp:Label></td>

<td style="border-bottom:1px; border-bottom-style:solid;"><asp:Label ID="lblTotal"

runat="server" Text="Label"></asp:Label></td>

</tr>

<tr>

<td colspan="4" style="text-align:right;border-bottom:1px; border-bottom-style:solid; border-

right:1px; border-right-style:solid">

<b>Grand Total<br />

CGST(9%)<br />

SGST(9%)<br />

</b><b class='w3-large'>Net Total</b>

</td>

<td style='text-align:left; border-bottom:1px; border-bottom-style:solid;'>

<asp:Label ID="lblGrand" runat="server" Text="Label"></asp:Label><br />

<asp:Label ID="lblCGST" runat="server" Text="Label"></asp:Label><br />

<asp:Label ID="lblSGST" runat="server" Text="Label"></asp:Label><br />

<asp:Label ID="lblNet" runat="server" class='w3-large' Text="Label"></asp:Label><br />

</td>

</tr>

</table>

</div>

<p>If You Find Any issue in this invoice Contact at - 9415908165 ,

[email protected]<br />Thank You for Visit.</p>


141

</div><br />

<center><div id='printbtn' onclick="doPrint()" class='w3-button w3-

gray'>Print</div></center>

</form>

<script type="text/javascript">

function doPrint() {

printbtn.style.visibility = "hidden";

window.print();

printbtn.style.visibility = "visible";

</script>

</body>

</html>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

{
142

protected void Page_Load(object sender, EventArgs e)

try

int orderNO = Convert.ToInt32(Request.QueryString["id"]);

DataSet1TableAdapters.customerdetailTableAdapter da = new

DataSet1TableAdapters.customerdetailTableAdapter();

DataSet1.customerdetailDataTable dt = da.GetDataBySno(orderNO);

if (dt.Rows.Count <= 0)

throw new Exception();

DataSet1.customerdetailRow dr = (DataSet1.customerdetailRow)dt.Rows[0];

lblbillno.Text = "LAP" + orderNO;

DateTime d = (dr.date);

lbldate.Text = "" +d.Day+"/"+d.Month+"/"+d.Year;

lblname.Text = "" + dr.name;

lblCustId.Text=""+Session["userid"];

lblmobileno.Text = "" + dr.mobile;

lblAddress.Text = "" + dr.adr;

lblDistrict.Text = "" + dr.dist;

lblPincode.Text = "" + dr.pincode;

lblState.Text = "" + dr.state;

lblLandMark.Text = "" + dr.landmark;

displayItems(orderNO);
143

catch(Exception ex)

Response.Write(""+ex.Message);

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

public void displayItems(int orderno)

string sno="", product="", quantity="", price="", total="";

float grandTotal = 0, cgst=0, sgst=0, netTotal;

DataSet1TableAdapters.cartTableAdapter da = new

DataSet1TableAdapters.cartTableAdapter();

DataSet1.cartDataTable dt = da.GetDataByOrderNo("" + orderno);

for (int i = 0; i < dt.Rows.Count; i++)

DataSet1.cartRow dr = (DataSet1.cartRow)dt.Rows[i];

sno += i + 1+".<br />";

products p = new products(dr.productno);

product += products.getDisplayName(dr.productno)+"<br />";

quantity += dr.quantity + "<br />";

float rate = p.price - p.discount;

price += "Rs."+rate+"/-<br />";


144

float ttl = rate * dr.quantity;

total += "Rs."+ttl+"/-<br />";

grandTotal += ttl;

lblSno.Text = "" + sno;

lblProduct.Text = "" + product;

lblQuantity.Text = "" + quantity;

lblRate.Text = "" + price;

lblTotal.Text = "" + total;

cgst = (grandTotal / 100) * 9;

sgst = (grandTotal / 100) * 9;

netTotal = grandTotal + cgst + sgst;

lblGrand.Text = "Rs." + grandTotal+"/-";

lblCGST.Text = "Rs." + cgst+"/-";

lblSGST.Text = "Rs." + sgst + "/-";

lblNet.Text = "Rs." + netTotal + "/-";

}
145

Vendor Table List :-

Fig 20

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="vendorlisttable.aspx.cs" Inherits="vendorlisttable" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div class="w3-row w3-center">

<div class="w3-col s2">

<br />

</div>
146

<div class="w3-col s8"><asp:GridView ID="GridView1" CssClass="w3-table-all"

runat="server" AutoGenerateColumns="False"

DataKeyNames="sno" DataSourceID="SqlDataSource1" BackColor="White"

BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"

ForeColor="Black" GridLines="Vertical">

<AlternatingRowStyle BackColor="#CCCCCC" />

<Columns>

<asp:BoundField DataField="name" HeaderText="Name" SortExpression="name" />

<asp:BoundField DataField="companyname" HeaderText="Company Name"

SortExpression="companyname" />

<asp:BoundField DataField="gstin" HeaderText="GSTNo." SortExpression="gstin" />

<asp:BoundField DataField="registrationno" HeaderText="Registration No."

SortExpression="registrationno" />

<asp:TemplateField HeaderText="Details">

<ItemTemplate>

<a href="vendorfulldetails.aspx?sno=<%# Eval("sno") %>">View Full Details</a>

</ItemTemplate>

</asp:TemplateField>

</Columns>

<FooterStyle BackColor="#CCCCCC" />

<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />

<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />

<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />


147

<SortedAscendingCellStyle BackColor="#F1F1F1" />

<SortedAscendingHeaderStyle BackColor="#808080" />

<SortedDescendingCellStyle BackColor="#CAC9C9" />

<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [vendorappliedlist] WHERE status='Pending'

ORDER BY [sno] DESC">

</asp:SqlDataSource>

</div>

<div class="w3-col s2">

<br />

</div>

</div>

</asp:Content>
148

Vendor Full details :-

Fig 21

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="vendorfulldetails.aspx.cs" Inherits="vendorfulldetails"

%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div class="w3-row">

<div class="w3-col s2">

<br />
149

</div>

<div class="w3-col s8 w3-border w3-card-4 rainbowText">

<br />

<div class="w3-row rainbowText w3-center">

<h1><b>Details of Vendor</b></h1>

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

</div>

<div class="w3-row w3-margin w3-border w3-card-4">

<h2 class="w3-margin">Personal Details :-</h2>

<div class="w3-row">

<div class="w3-col s4 w3-center w3-padding">

<h3>Name :-</h3>

<asp:Label ID="txtname" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>DOB :-</h3>

<asp:Label ID="txtdob" CssClass="w3-text-black" runat="server"

Text=""></asp:Label>

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>Gender :-</h3>

<asp:Label ID="txtgender" CssClass="w3-text-black" runat="server"


150

Text=""></asp:Label>

</div>

</div>

<div class="w3-row">

<div class="w3-col s4 w3-center">

<h3>State :-</h3>

<asp:Label ID="txtstate" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>Contact NO. :-</h3>

<asp:Label ID="txtcontactno" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>Email :-</h3>

<asp:Label ID="txtemail" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

</div>

</div>

<div class="w3-row w3-margin w3-border w3-card-4">

<h2 class="w3-margin">Company Details :-</h2>


151

<div class="w3-row">

<div class="w3-col s4 w3-center w3-padding">

<h3>Company Name :-</h3>

<asp:Label ID="txtcompanyname" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>Company Address :-</h3>

<asp:Label ID="txtcompanyaddress" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>Company Email :-</h3>

<asp:Label ID="txtcompanyemail" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

</div>

<div class="w3-row">

<div class="w3-col s4 w3-center w3-padding">

<h3>GST No. :-</h3>

<asp:Label ID="txtgstno" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>
152

<div class="w3-col s4 w3-center w3-padding">

<h3>Company Contact No. :-</h3>

<asp:Label ID="txtcompanycontactno" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

<div class="w3-col s4 w3-center w3-padding">

<h3>Registration No. :-</h3>

<asp:Label ID="txtregno" CssClass="w3-text-black" runat="server"

Text=""></asp:Label><br />

</div>

</div>

</div>

<div class="w3-row w3-center">

<br />

<div class="w3-col s6">

<asp:Button CssClass="w3-button w3-black w3-hover-aqua" ID="Button1"

runat="server" Text="Accept" onclick="Button1_Click" />

</div>

<div class="w3-col s6">

<asp:Button CssClass="w3-button w3-black w3-hover-aqua" ID="Button2"

runat="server" Text="Reject" onclick="Button2_Click" />

</div>

</div>
153

<div class="w3-row w3-center" id="passworddiv" runat="server" visible="false">

<hr />

<div class="w3 col s2"><br /></div>

<div class="w3 col s8">

<div class="w3-col s2">

<br />

</div>

<div class="w3-col s4">

<asp:Label ID="Label9" runat="server" Text="UserId"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label12" runat="server" Text="Password"></asp:Label>

<br /><br />

<asp:Button CssClass="w3-button w3-black w3-round-large w3-hover-aqua"

ID="Button3" runat="server" Text="Submit" onclick="Button3_Click" />

</div>

<div class="w3-col s4">

<asp:TextBox CssClass="w3-input w3-round w3-card-4" ID="txtuser"

Placeholder="Enter Your UserID" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-round w3-card-4" TextMode="Password"

Placeholder="Enter Your Password" ID="txtpassword"

runat="server"></asp:TextBox>

<br />
154

<asp:Button CssClass="w3-button w3-black w3-round-large w3-hover-aqua"

ID="Button4" runat="server" Text="Reset" onclick="Button4_Click" />

</div>

<div class="w3-col s2">

<br />

</div>

</div>

<div class="w3 col s2"><br /></div>

</div>

<div class="w3-col s1">

<br />

</div>

</div>

</div>

<div class="w3-col s2">

<br />

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;
155

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

int sno;

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectAdminPage(Response, Session);

sno = Convert.ToInt32(Request.QueryString["sno"]);

DataSet1TableAdapters.vendorappliedlistTableAdapter da = new

DataSet1TableAdapters.vendorappliedlistTableAdapter();

DataSet1.vendorappliedlistDataTable dr = da.GetDataBySerialNo(sno);

DataSet1.vendorappliedlistRow dt = (DataSet1.vendorappliedlistRow)dr.Rows[0];

txtname.Text = dt.name;

txtdob.Text =""+ dt.dob;

txtgender.Text = dt.gender;

txtstate.Text = dt.state;

txtcontactno.Text = dt.contactno;

txtemail.Text = dt.email;

txtcompanyname.Text = dt.companyname;

txtcompanyemail.Text = dt.companyemail;
156

txtcompanyaddress.Text = dt.companyaddress;

txtgstno.Text = dt.gstin;

txtregno.Text = dt.registrationno;

txtcompanycontactno.Text = dt.companycontactno;

protected void Button1_Click(object sender, EventArgs e)

passworddiv.Visible = true;

protected void Button3_Click(object sender, EventArgs e)

int vendorsno=VendorUtilities.GetVendorsno();

String name, gender, email, userid, password, contact, address;

name = txtname.Text;

gender = txtgender.Text;

email = txtemail.Text;

userid = txtuser.Text;

if (UserUtilities.CheckExistingUser(userid))

throw new Exception("Userid Already Exist");

password = txtpassword.Text;

if(password.Equals(""))
157

throw new Exception("Please insert Password");

if (password.Length < 6)

throw new Exception("Password Should be greater than 6 Digits");

contact = txtcontactno.Text;

address = txtcompanyaddress.Text;

DataSet1TableAdapters.siteuserTableAdapter da = new

DataSet1TableAdapters.siteuserTableAdapter();

da.Insert(name, gender, email, userid, password, "" + contact, vendorsno, "Active",

address);

VendorUtilities.MakeVendorActive(sno);

lblmain.Text = "Verified";

Response.Redirect("adminDashBoard.aspx");

protected void Button4_Click(object sender, EventArgs e)

Validations.totalResetTextboxs(txtuser,txtpassword);

protected void Button2_Click(object sender, EventArgs e)

{
158

VendorUtilities.RejectVendor(sno);

Vendor Dashbord :-

Fig 22

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="VendorDashBoard.aspx.cs"

Inherits="VendorDashBoard" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


159

Runat="Server">

<div><br /><br />

<div class="w3-col s2"><br /></div>

<div class="w3-col s8 w3-card-4">

<div class="w3-row">

<div class="w3-row rainbowText w3-padding w3-xxlarge">

<center><h2 class="w3-padding w3-card-2"><b>Vendor's

Dashboard</b></h2></center>

</div>

<div class="w3-padding">

<div id="incompleteProducts" visible="false" class="w3-border-green w3-round-large

w3-border w3-center w3-center w3-padding w3-text-green w3-pale-green" runat="server">

</div>

</div>

<br />

<div class="w3-row">

<div class="w3-col s1"><br /></div>

<a href="newproductentry.aspx" target="_blank">

<div class="w3-col s2 w3-padding w3-round-large w3-center justzoom w3-card-4">

<img alt="" src="photo/Upload.png" width="45%" />

<p>Add Product</p>

</div>

</a>
160

<div class="w3-col s1"><br /></div>

<a href="updateproduct.aspx">

<div class="w3-col s2 w3-padding w3-round-large w3-center justzoom w3-card-4">

<img alt="" src="photo/return.png" width="30%" />

<p>Update Product</p>

</div>

</a>

<div class="w3-col s1"><br /></div>

<a href="vendorprofile.aspx">

<div class="w3-col s2 w3-padding w3-round-large w3-center justzoom w3-card-4">

<img alt="" src="photo/approval.png" width="30%" />

<p>View Profile</p>

</div></a>

</div>

<div class="w3-col s3"><br /></div>

</div>

<br /><br />

<div class="w3-row">

<div class="w3-col s1"><br /></div>

<a href="removeproduct.aspx">

<div class="w3-col s2 w3-padding w3-round-large w3-center justzoom w3-card-4">

<img alt="" src="photo/manage.png" width="30%" />

<p>Remove Product</p>
161

</div>

</a>

<div class="w3-col s1"><br /></div>

<div class="w3-col s2 w3-padding w3-round-large w3-center justzoom w3-card-4">

<img alt="" src="photo/delivery.png" width="30%" />

<p>Order List</p>

</div>

<div class="w3-col s1"><br /></div>

<a href="productslist.aspx">

<div class="w3-col s2 w3-padding w3-round-large w3-center justzoom w3-card-4">

<img alt="" src="photo/delivery.png" width="30%" />

<p>Product List</p>

</div>

</a>

</div>

<br /><br />

</div>

<div class="w3-col s2"><br /></div>

</div>

</asp:Content>
162

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

try

LoginManager.protectVendorPage(Response, Session);

DataSet1TableAdapters.vendorappliedlistTableAdapter val = new

DataSet1TableAdapters.vendorappliedlistTableAdapter();

int vendorno = (int)val.GetVendorNoBySiteUserNo(UserUtilities.getSiteUserNo("" +

Session["userid"]));

List<int> incomplete = VendorUtilities.getIncompleteProducts(vendorno);

if (incomplete.Count > 0)

string type = VendorUtilities.incompleteType;


163

string redirect = "";

if (incomplete.Count == 1)

if (type.Equals("specification"))

redirect = "productspecificationsentry.aspx?pno="+incomplete[0];

else

redirect = "productimageupload.aspx?pno=" + incomplete[0];

else

redirect = "incompleteProducts.aspx?vno="+vendorno;

incompleteProducts.Visible = true;

incompleteProducts.InnerHtml = "Some Of Your Products Upload Is Incomplete

<a href='"+redirect+"'>Click Here</a> to complete Product Uploading";

catch (Exception ex)

Response.Write(""+ex.Message);

\
164

New Product Entry :-

Fig 23

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="newproductentry.aspx.cs" Inherits="newproductentry"

%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<div>

<br />

<div class="w3-row">
165

<div class="w3-col s3">

<br />

</div>

<div class="w3-col s6 w3-card-4 w3-round-xlarge">

<div class="w3-row">

<div class="w3-col s4 w3-border w3-yellow">

<h1>Step 1 >>></h1>

</div>

<div class="w3-col s4 w3-border">

<h1>Step 2 >>></h1>

</div>

<div class="w3-col s4 w3-border">

<h1>Step 3 >>></h1>

</div>

</div>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

<br />

<div class="w3-row">

<div class="w3-col s3"><br /></div>


166

<div class="w3-col s6 w3-card-4">

<div class="w3-row w3-round-xlarge w3-card-4">

<div class="w3-row rainbowText w3-center w3-padding w3-xxxlarge">

<b>Product's Details</b>

</div>

<div class="w3-row w3-center w3-padding">

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

</div>

<br />

<div class="w3-col s1"><br /></div>

<div class="w3-col s5 w3-center rainbowText">

<b>Brand Name</b>

<br />

<asp:DropDownList CssClass="w3-input w3-round-large w3-card-4"

style="width:80%" ID="ddbrand" runat="server"

DataSourceID="SqlDataSource1" DataTextField="brandname"

DataValueField="sno" AppendDataBoundItems="true">

<asp:ListItem Text="Select Brand" Value="0"

Selected="true"></asp:ListItem>

</asp:DropDownList>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [brand] ORDER BY [brandname]">


167

</asp:SqlDataSource>

<br />

<b>Price</b>

<br />

<asp:TextBox CssClass="w3-input w3-round-large w3-card-4" placeholder="Enter

Price" style="width:80%" ID="txtprice" runat="server"></asp:TextBox>

</div>

<div class="w3-col s5 w3-center rainbowText">

<b>Model No</b>

<br />

<asp:TextBox CssClass="w3-input w3-round-large w3-card-4" placeholder="Enter

Model no." style="width:80%" ID="txtmodelno" runat="server"></asp:TextBox>

<br />

<b>Discounts</b>

<asp:TextBox CssClass="w3-input w3-round-large w3-card-4" placeholder="Enter

Discounts" style="width:80%" ID="txtdiscounts" runat="server"></asp:TextBox>

<br />

</div>

<div class="w3-col s1"><br /></div>

<div class="w3-row w3-center">

<div class="w3-col s4">

<asp:Button CssClass="w3-button w3-black w3-round-large w3-hover-black"

ID="btsubmit"
168

runat="server" Text="Submit" onclick="btsubmit_Click" />

</div>

<div class="w3-col s4">

<asp:Button CssClass="w3-button w3-black w3-round-large w3-hover-black"

Enabled="false" ID="btnext"

runat="server" Text="Next" onclick="btnext_Click" />

</div>

<div class="w3-col s4">

<asp:Button CssClass="w3-button w3-black w3-round-large" ID="btreset"

runat="server" Text="Reset" onclick="btreset_Click" />

</div>

</div>

<br />

</div>

</div>

<div class="w3-col s3"><br /></div>

</div>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;
169

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectVendorPage(Response, Session);

protected void btsubmit_Click(object sender, EventArgs e)

try

String modelno;

int vendorno, brandno;

float price, discount;

if (Convert.ToInt32(ddbrand.SelectedValue) == 0)

throw new Exception("Please Select A Brand");

brandno = Convert.ToInt32(ddbrand.SelectedValue);

modelno = txtmodelno.Text;

if (modelno.Equals("") || modelno.Equals("null"))
170

throw new Exception("Please insert Model Number");

if (txtprice.Text.Equals(null) || txtprice.Text.Equals(""))

throw new Exception("Please insert Price");

price = (float)Convert.ToDouble(txtprice.Text);

if (txtdiscounts.Text.Equals("")|| txtdiscounts.Text.Equals(null))

throw new Exception("Please insert Discounts");

discount = (float)Convert.ToDouble(txtdiscounts.Text);

vendorno =

VendorUtilities.GetVendornobyname(LoginManager.currentuser(Session));

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

da.Insert(brandno, modelno, vendorno, price, discount,"active");

Validations.setSuccess(lblmain, "Successfully Inserted");

btnext.Enabled = true;

btsubmit.Enabled = false;

//Response.Redirect("productspecificationsentry.aspx?pno="+productUtilities.getLastProduct

No());
171

catch (Exception x)

Validations.setError(lblmain, x.Message);

protected void btreset_Click(object sender, EventArgs e)

Validations.totalResetTextboxs(txtprice, txtmodelno, txtdiscounts);

protected void btnext_Click(object sender, EventArgs e)

Response.Redirect("productspecificationsentry.aspx?pno=" +

productUtilities.getLastProductNo());

}
172

Product Specification :-

Fig 24

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="productspecificationsentry.aspx.cs"

Inherits="newproducts" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div class="w3-row">

<div class="w3-col s3">

<br />
173

</div>

<div class="w3-col s6 w3-card-4 w3-round-xlarge">

<div class="w3-row">

<div class="w3-col s4 w3-border w3-green">

<h1>Step 1 >>></h1>

</div>

<div class="w3-col s4 w3-border w3-yellow">

<h1>Step 2 >>></h1>

</div>

<div class="w3-col s4 w3-border">

<h1>Step 3 >>></h1>

</div>

</div>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

<div class="w3-row">

<div class="w3-col s3">

<br />

</div>

<div class="w3-col s6 w3-border w3-card-4 w3-margin w3-center w3-padding w3-


174

round-xlarge">

<div class="w3-center w3-xxxlarge rainbowText">

<b> Product Details</b>

</div>

<div class="w3-row rainbowTextInverse">

<h3 class="w3-col s6">Specification Name :-</h3>

<h3 class="w3-col s6">Specification Details :-</h3>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:TextBox ID="txtattributename" CssClass="w3-input w3-round-large w3-

card-4" runat="server" Placeholder="Enter Specifications"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:TextBox ID="txtattributevlaue" CssClass="w3-input w3-round-large w3-

card-4" runat="server" Placeholder="Enter Details"></asp:TextBox>

</div>

</div>

<br />

<div class="w3-row">

<div class="w3-col s6">

<asp:Button ID="btsubmit" CssClass="w3-button w3-card-4 w3-round-large

glossButton w3-hover-black w3-black"


175

runat="server" Text="Add" onclick="btsubmit_Click" />

</div>

<div class="w3-col s6">

<asp:Button ID="btreset" CssClass="w3-button w3-card-4 w3-round-large

glossButton w3-black w3-hover-black" runat="server" Text="Reset" />

</div>

</div>

<br /><br />

<div class="w3-row">

<asp:GridView ID="GridView1" CssClass="w3-table-all" runat="server"

BackColor="White"

BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"

CellPadding="3"

DataSourceID="SqlDataSource1" ForeColor="Black" GridLines="Vertical"

AutoGenerateColumns="False" DataKeyNames="sno">

<AlternatingRowStyle BackColor="#CCCCCC" />

<Columns>

<asp:CommandField ShowDeleteButton="True" />

<asp:BoundField DataField="attributename" HeaderText="Specification Name"

SortExpression="attributename" />

<asp:BoundField DataField="attributevalue" HeaderText="Specification Details"

SortExpression="attributevalue" />

</Columns>
176

<FooterStyle BackColor="#CCCCCC" />

<HeaderStyle BackColor="Black" CssClass="w3-text-lime" Font-Bold="True"

ForeColor="White" />

<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />

<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />

<SortedAscendingCellStyle BackColor="#F1F1F1" />

<SortedAscendingHeaderStyle BackColor="#808080" />

<SortedDescendingCellStyle BackColor="#CAC9C9" />

<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [specifictaions] WHERE ([productno] =

@productno)"

DeleteCommand="Delete from specifictaions where sno=@sno">

<SelectParameters>

<asp:QueryStringParameter Name="productno"

QueryStringField="pno" Type="Int32" />

</SelectParameters>

</asp:SqlDataSource>

</div>

<br />

<div class="w3-row">
177

<div class="w3-col">

<asp:Button ID="btnext" Enabled="false"

CssClass="w3-button w3-card-4 w3-round-large glossButton w3-black w3-hover-

black"

runat="server" Text="Next" onclick="btnext_Click" />

</div>

</div>

</div>

<div class="w3-row s3">

<br />

</div>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

{
178

int productno;

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectVendorPage(Response, Session);

productno = Convert.ToInt32(Request.QueryString["pno"]);

protected void btsubmit_Click(object sender, EventArgs e)

String attributename, attributevalue;

attributename = txtattributename.Text;

attributevalue = txtattributevlaue.Text;

DataSet1TableAdapters.specifictaionsTableAdapter da = new

DataSet1TableAdapters.specifictaionsTableAdapter();

da.Insert(productno, attributename, attributevalue);

btnext.Enabled = true;

GridView1.DataBind();

protected void btnext_Click(object sender, EventArgs e)

Response.Redirect("productimageupload.aspx?pno="+productno);

}
179

Product Image Upload :-

Fig 25

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="productimageupload.aspx.cs"

Inherits="productimageupload" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br /><br />

<div class="w3-row">

<div class="w3-col s3">

<br />
180

</div>

<div class="w3-col s6 w3-card-4 w3-round-xlarge">

<div class="w3-row">

<div class="w3-col s4 w3-border w3-green">

<h1>Step 1 >>></h1>

</div>

<div class="w3-col s4 w3-border w3-green">

<h1>Step 2 >>></h1>

</div>

<div class="w3-col s4 w3-border w3-yellow">

<h1>Step 3 >>></h1>

</div>

</div>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

<br />

<div class="w3-row">

<div class="w3-col s3">

<br />

</div>
181

<div class="w3-col s6 w3-center w3-padding w3-border w3-card-4">

<asp:FileUpload ID="imageupload" accept="image/*" multiple="true"

runat="server" onchange="showimage()" style="display:none"/>

<img src="photo/choose.png" style="cursor:pointer" alt="choose" width="20%"

id="btChoose" onclick="trigger()"/>

<div id="images" style="float:none"></div>

<br /><br />

<div class="w3-row">

<asp:Button ID="btupload" CssClass="w3-button w3-hover-black w3-round-xlarge

w3-red" runat="server" Text="Upload"

onclick="btupload_Click" />

</div>

</div>

<script>

function trigger() {

document.getElementById("ContentPlaceHolder1_imageupload").click();

function showimage() {

var f = document.getElementById("ContentPlaceHolder1_imageupload");

var totalfiles = f.files;

var numberoffiles = totalfiles.length;

var div = document.getElementById("images");

for (i = 0; i < numberoffiles; i++) {


182

var imagearr = totalfiles[i];

var src = URL.createObjectURL(imagearr);

div.innerHTML += "<div class='w3-padding w3-quarter'><img

src='"+src+"' width='100%' class='w3-card-4' /></div>";

</script>

<div class="w3-col s3">

<br />

</div>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.IO;

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


183

int productno;

protected void Page_Load(object sender, EventArgs e)

LoginManager.protectVendorPage(Response, Session);

productno = Convert.ToInt32(Request.QueryString["pno"]);

protected void btupload_Click(object sender, EventArgs e)

try

string folder = Server.MapPath("productImages\\" + productno);

DataSet1TableAdapters.productimageTableAdapter da = new

DataSet1TableAdapters.productimageTableAdapter();

if (!Directory.Exists(folder))

Directory.CreateDirectory(folder);

HttpFileCollection files = Request.Files;

for (int i = 0; i < files.Count; i++)

HttpPostedFile posted = files[i];

string filesname = posted.FileName;


184

if (!File.Exists(folder + "\\" + filesname))

posted.SaveAs(folder + "\\" + filesname);

string src="productImages/"+productno+"/" + filesname;

da.Insert(productno, src);

else

//lblMessage.Text += filesname + " already exists.<br/>";

Response.Redirect("VendorDashBoard.aspx");

//lblMessage.Text += "Saved " + counter + "file(s)";

catch (Exception ex)

//lblMessage.Text = "" + ex.Message;

}
185

Vendor Profile :-

Fig 26

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="vendorprofile.aspx.cs" Inherits="vendorprofile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div class="w3-row">

<div class="w3-col s3">

<br />

</div>
186

<div class="w3-col s6 w3-border w3-round-large w3-card-4">

<div class="w3-row">

<div class="w3-col s3">

<br />

</div>

<div class="w3-col s6 w3-center w3-padding rainbowText">

<h2><b>Vendor Profile</b></h2>

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

<div class="w3-row w3-margin">

<h3>Personal Details :</h3>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label1" runat="server" Text="Name :"></asp:Label><br />

<asp:TextBox ID="txtvendorname" CssClass="w3-input w3-border w3-card-4 w3-

round-large w3-grayscale-max" Placeholder="Enter Name"

runat="server"></asp:TextBox>

</div>
187

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label4" runat="server" Text="Address :"></asp:Label>

<asp:TextBox ID="txtstate" CssClass="w3-input w3-border w3-card-4 w3-round-

large w3-grayscale-max" Placeholder="Enter State"

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label5" runat="server" Text="Contact Number :"></asp:Label>

<asp:TextBox ID="txtcontactno" CssClass="w3-input w3-border w3-card-4 w3-

round-large w3-grayscale-max" Placeholder="Enter Contact Number"

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label6" runat="server" Text="Email :"></asp:Label>

<asp:TextBox ID="txtemail" CssClass="w3-input w3-border w3-card-4 w3-round-

large w3-grayscale-max" Placeholder="Enter Email"

runat="server"></asp:TextBox>

</div>

</div>

<hr />

<div class="w3-row w3-margin">


188

<h3>Company Details :</h3>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label7" runat="server" Text="Company Name :"></asp:Label>

<asp:TextBox ID="txtcompanyname" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Company Name"

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label9" runat="server" Text="Company Email :"></asp:Label>

<asp:TextBox ID="txtcompanyemail" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Company Email"

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label13" runat="server" Text="Address :"></asp:Label>

<asp:TextBox ID="txtcompanyaddress" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Address"

runat="server"></asp:TextBox>

</div>
189

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label11" runat="server" Text="GST No.:"></asp:Label>

<asp:TextBox ID="txtcompanygstno" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter GST NO."

runat="server"></asp:TextBox>

</div>

</div>

<div class="w3-row">

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label12" runat="server" Text="Reg No. :"></asp:Label>

<asp:TextBox ID="txtcompanyregno" CssClass="w3-input w3-border w3-card-4

w3-round-large w3-grayscale-max" Placeholder="Enter Registration NO."

runat="server"></asp:TextBox>

</div>

<div class="w3-col s6 w3-center w3-padding">

<asp:Label ID="Label10" runat="server" Text="Contact No. :"></asp:Label>

<asp:TextBox ID="txtcompanycontactno" CssClass="w3-input w3-border w3-

card-4 w3-round-large w3-grayscale-max" Placeholder="Contact NO."

runat="server"></asp:TextBox>

</div>

</div>

<br />

<div class="w3-row w3-padding">


190

<div class="w3-col w3-center w3-padding">

<asp:Button CssClass="w3-button w3-black w3-round-large" ID="btsave"

Visible="false" runat="server" Text="Save Changes" onclick="btsave_Click" />

<asp:Button CssClass="w3-button w3-black w3-round-large" ID="btedit"

runat="server" Text="Edit Profile" onclick="Button1_Click" />

</div>

</div>

</div>

<div class="w3-col s3">

<br />

</div>

</div>

<br /><br />

<script>

$(function () {

$(function () {

$("#ContentPlaceHolder1_txtdob").datepicker({

changeMonth: true,

changeYear: true,

yearRange: '1990:2050',

dateFormat: 'dd-M-yy',

defaultDate: '20-Jun-1990'

});
191

});

});

</script>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)

try

LoginManager.protectVendorPage(Response, Session);

DataSet1TableAdapters.vendorappliedlistTableAdapter da = new

DataSet1TableAdapters.vendorappliedlistTableAdapter();

DataSet1.vendorappliedlistDataTable dt = da.GetDataByUserId("" +
192

Session["userid"]);

DataSet1.vendorappliedlistRow dr = (DataSet1.vendorappliedlistRow)dt.Rows[0];

if (!this.IsPostBack)

txtvendorname.Text = dr.name;

txtcontactno.Text = dr.contactno;

txtemail.Text = dr.email;

txtstate.Text = dr.state;

txtcompanyname.Text = dr.companyname;

txtcompanyemail.Text = dr.companyemail;

txtcompanyaddress.Text = dr.companyaddress;

txtcompanygstno.Text = dr.gstin;

txtcompanyregno.Text = dr.registrationno;

txtcompanycontactno.Text = dr.contactno;

txtvendorname.ReadOnly = true;

txtcontactno.ReadOnly = true;

txtemail.ReadOnly = true;

txtstate.ReadOnly = true;

txtcompanyname.ReadOnly = true;

txtcompanyemail.ReadOnly = true;

txtcompanyaddress.ReadOnly = true;

txtcompanygstno.ReadOnly = true;
193

txtcompanyregno.ReadOnly = true;

txtcompanycontactno.ReadOnly = true;

catch (Exception ex)

lblmain.Text = "" + ex.Message;

protected void Button1_Click(object sender, EventArgs e)

txtvendorname.ReadOnly = false;

txtcontactno.ReadOnly = false;

txtemail.ReadOnly = false;

txtstate.ReadOnly = false;

txtcompanyname.ReadOnly = false;

txtcompanyemail.ReadOnly = false;

txtcompanyaddress.ReadOnly = false;

txtcompanygstno.ReadOnly = false;

txtcompanyregno.ReadOnly = false;

txtcompanycontactno.ReadOnly = false;

btsave.Visible = true;

btedit.Visible = false;

}
194

protected void btsave_Click(object sender, EventArgs e)

try

string name, contact, address, email;

name = txtvendorname.Text;

contact = txtcontactno.Text;

address = txtstate.Text;

email = txtemail.Text;

DataSet1TableAdapters.siteuserTableAdapter da = new

DataSet1TableAdapters.siteuserTableAdapter();

da.UpdateProfile(name, contact, email, address, Session["userid"] + "");

DataSet1TableAdapters.vendorappliedlistTableAdapter ds = new

DataSet1TableAdapters.vendorappliedlistTableAdapter();

ds.UpdateVendorProfileByUserid(name, address, contact, email, Session["userid"] +

"");

txtvendorname.ReadOnly = true;

txtcontactno.ReadOnly = true;

txtstate.ReadOnly = true;

txtemail.ReadOnly = true;

btsave.Visible = false;

btedit.Visible = true;

lblmain.Text = "Profile Updated Successfully";


195

catch (Exception ex)

lblmain.Text = "" + ex.Message;

Remove Product :-

Fig 27

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="removeproduct.aspx.cs" Inherits="removeproduct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


196

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<asp:GridView ID="GridView1" CssClass="w3-table-all" runat="server"

AutoGenerateColumns="False"

DataKeyNames="sno" DataSourceID="SqlDataSource1" CellPadding="4"

ForeColor="#333333" GridLines="None">

<AlternatingRowStyle BackColor="White" ForeColor="#284775" />

<Columns>

<asp:TemplateField>

<ItemTemplate>

<div class='w3-padding'>

<div class='w3-row w3-card-4'>

<a href="productdetails.aspx?pno=<%# Eval("sno") %>" target="_blank">

div class='w3-col w3-padding s4 w3-center'><img width="50%" alt="pIm"

src="<%# products.GetDisplayImage(Convert.ToInt32(Eval("sno"))) %>"

/></div>

</a>

<div class='w3-col s8 w3-center w3-padding w3-row'>

<a href="productdetails.aspx?pno=<%# Eval("sno") %>" target="_blank">

<div class='w3-col s6'><b><%#

products.getDisplayName(Convert.ToInt32(Eval("sno"))) %></b></div>

</a>
197

<div class="w3-col s3">

Price : <i class="fa fa-rupee-sign"></i><%#

products.getSinglePrice(Convert.ToInt32(Eval("sno"))) %>/-<br />

</div>

<div class="w3-col s3">

<asp:Button OnClick="remove" CssClass='w3-button' ID="minus" Font-

Bold="true" Text="Remove Product" CommandName="less"

CommandArgument='<%# Eval("sno") %>' runat="server"/>

</div>

</div>

<br/>

</div>

</div>

</ItemTemplate>

</asp:TemplateField>

</Columns>

<EditRowStyle BackColor="#999999" />

<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />

<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />

<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />

<SortedAscendingCellStyle BackColor="#E9E7E2" />


198

<SortedAscendingHeaderStyle BackColor="#506C8C" />

<SortedDescendingCellStyle BackColor="#FFFDF8" />

<SortedDescendingHeaderStyle BackColor="#6F8DAE" />

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [products] WHERE (status='Active') AND

([vendorno] = (select sno from vendorappliedlist where siteuserno=(select sno from siteuser

where userid=@vendorno))) ORDER BY [sno] DESC">

<SelectParameters>

<asp:SessionParameter Name="vendorno" SessionField="userid" Type="String" />

</SelectParameters>

</asp:SqlDataSource>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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


199

protected void Page_Load(object sender, EventArgs e)

public void remove(object sender, EventArgs e)

Button b = (Button)sender;

int sno = Convert.ToInt32(b.CommandArgument);

DataSet1TableAdapters.productsTableAdapter da = new

DataSet1TableAdapters.productsTableAdapter();

da.UpdateProductStatus("Inactive", sno);

GridView1.DataBind();

}
200

Product List :-

Fig 28

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="productslist.aspx.cs" Inherits="productslist" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<asp:GridView ID="GridView1" CssClass="w3-table-all" runat="server"

AutoGenerateColumns="False"

DataKeyNames="sno" DataSourceID="SqlDataSource1" CellPadding="4"

ForeColor="#333333" GridLines="None">
201

<AlternatingRowStyle BackColor="White" ForeColor="#284775" />

<Columns>

<asp:TemplateField>

<ItemTemplate>

<div class='w3-padding'>

<div class='w3-row w3-card-4'>

<a href="productdetails.aspx?pno=<%# Eval("sno") %>" target="_blank">

<div class='w3-col w3-padding s4 w3-center'>

<img width="50%" alt="pIm" src="<%#

products.GetDisplayImage(Convert.ToInt32(Eval("sno"))) %>" />

</div>

</a>

<div class='w3-col s8 w3-center w3-padding w3-row'>

<a href="productdetails.aspx?pno=<%# Eval("sno") %>" target="_blank">

<div class='w3-col s8'>

<b><%# products.getDisplayName(Convert.ToInt32(Eval("sno")))

%></b><br/>

</div>

</a>

<div class="w3-col s4">

Price : <i class="fa fa-rupee-sign"></i><%#

products.getSinglePrice(Convert.ToInt32(Eval("sno"))) %>/-<br />

</div>
202

</div>

<br/>

</div>

</div>

</ItemTemplate>

</asp:TemplateField>

</Columns>

<EditRowStyle BackColor="#999999" />

<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />

<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />

<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />

<SortedAscendingCellStyle BackColor="#E9E7E2" />

<SortedAscendingHeaderStyle BackColor="#506C8C" />

<SortedDescendingCellStyle BackColor="#FFFDF8" />

<SortedDescendingHeaderStyle BackColor="#6F8DAE" />

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [products] WHERE(status='active') AND

([vendorno] = (select sno from vendorappliedlist where siteuserno=(select sno from siteuser

where userid=@vendorno))) ORDER BY [sno] DESC">


203

<SelectParameters>

<asp:SessionParameter Name="vendorno" SessionField="userid" Type="String" />

</SelectParameters>

</asp:SqlDataSource>

</asp:Content>

Update Product :-

Fig 29

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="updateproduct.aspx.cs" Inherits="updateproduct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


204

Runat="Server">

<asp:GridView ID="GridView1" CssClass="w3-table-all" runat="server"

AutoGenerateColumns="False"

DataKeyNames="sno" DataSourceID="SqlDataSource1" CellPadding="4"

ForeColor="#333333" GridLines="None">

<AlternatingRowStyle BackColor="White" ForeColor="#284775" />

<Columns>

<asp:TemplateField>

<ItemTemplate>

<div class='w3-padding'>

<div class='w3-row w3-card-4'>

<a href="productdetails.aspx?pno=<%# Eval("sno") %>" target="_blank">

<div class='w3-col w3-padding s4 w3-center'><img width="50%"

alt="pIm" src="<%#

products.GetDisplayImage(Convert.ToInt32(Eval("sno"))) %>" /></div>

</a>

<div class='w3-col s8 w3-center w3-padding w3-row'>

<a href="productdetails.aspx?pno=<%# Eval("sno") %>" target="_blank">

<div class='w3-col s6'><b><%#

products.getDisplayName(Convert.ToInt32(Eval("sno"))) %></b></div>

</a>

<div class="w3-col s3">

Price : <i class="fa fa-rupee-sign"></i><%#


205

products.getSinglePrice(Convert.ToInt32(Eval("sno"))) %>/-<br />

</div>

<div class="w3-col s3">

<a href="updatingPage.aspx?pid=<%# Eval("sno")%>"><div

class="w3-button w3-teal w3-large w3-round-xlarge"><b>Update

Product</b> </div></a>

</div>

</div>

<br/>

</div>

</div>

</ItemTemplate>

</asp:TemplateField>

</Columns>

<EditRowStyle BackColor="#999999" />

<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />

<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />

<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />

<SortedAscendingCellStyle BackColor="#E9E7E2" />

<SortedAscendingHeaderStyle BackColor="#506C8C" />

<SortedDescendingCellStyle BackColor="#FFFDF8" />


206

<SortedDescendingHeaderStyle BackColor="#6F8DAE" />

</asp:GridView>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:localdatabaseConnectionString %>"

SelectCommand="SELECT * FROM [products] WHERE (status='active') AND

([vendorno] = (select sno from vendorappliedlist where siteuserno=(select sno from siteuser

where userid=@vendorno))) ORDER BY [sno] DESC">

<SelectParameters>

<asp:SessionParameter Name="vendorno" SessionField="userid" Type="String" />

</SelectParameters>

</asp:SqlDataSource>

</asp:Content>

Admin Dashbord :-

Fig 30
207

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="adminDashBoard.aspx.cs"

Inherits="adminDashBoard"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<div>

<br />

<div class="w3-col s2">

<br />

</div>

<div class="w3-col s8 w3-card-4 w3-animate-top">

<div class="w3-row">

<div class="w3-row rainbowText">

<center><h3><b>Admin's Dashboard</b></h3></center>

<br /><br />

</div>

<div class="w3-row">

<div class="w3-col s1">

<br />

</div>
208

<a href="Brandsentry.aspx">

<div class="w3-col s2 w3-padding w3-border w3-round-large w3-center justzoom

w3-card-4">

<img alt="" src="" width="40%" />

<p>Add New Brand</p>

</div></a>

<div class="w3-col s1">

<br />

</div>

<a href="vendorlisttable.aspx">

<div class="w3-col s2 w3-padding w3-border w3-round-large w3-center justzoom

w3-card-4">

<img alt="" src="" width="40%" />

<p>Vendor Approvals</p>

</div></a>

<div class="w3-col s1">

<br />

</div>

<div class="w3-col s2 w3-padding w3-border w3-round-large w3-center justzoom

w3-card-4">

<img alt="" src="" width="40%" />

<p>Total Order</p>

</div>
209

<div class="w3-col s3"><br /></div>

</div>

<br /><br />

<div class="w3-row">

<div class="w3-col s1">

<br />

</div>

<div class="w3-col s2 w3-padding w3-border w3-round-large w3-center justzoom

w3-card-4">

<img alt="" src="" width="40%" />

<p>Manage Product</p>

</div>

<div class="w3-col s1">

<br />

</div>

<div class="w3-col s2 w3-padding w3-border w3-round-large w3-center justzoom

w3-card-4">

<img alt="" src="" width="40%" />

<p>Product List</p>

</div>

<div class="w3-col s1">

<br />

</div>
210

<div class="w3-col s2 w3-padding w3-border w3-round-large w3-center justzoom

w3-card-4">

<p>Ordered List</p>

</div>

</div>

<br /><br />

</div>

</div>

<div class="w3-col s2">

<br />

</div>

</div>

</asp:Content>
211

Contact Us :-

Fig 31

Design :-

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"

AutoEventWireup="true" CodeFile="contactus.aspx.cs" Inherits="contactus" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<br />

<div class="w3-row">

<div class="w3-col s2"><br /></div>

<div class="w3-col s8 w3-card-4 w3-padding">

<div class="w3-row">

<div class="w3-col s6 w3-padding-16 w3-text-deep-purple">


212

<asp:Label ID="Label1" runat="server" Text="HELP CENTER

NO.:"></asp:Label>

<br /><br />

<asp:Label ID="Label2" runat="server" Text="Contact :"></asp:Label>

9415908165

<br />

<asp:Label ID="Label3" runat="server" Text="Email :"></asp:Label>

[email protected]

<br />

<asp:Label ID="Label4" runat="server" Text="Address :"></asp:Label> NIBIA

BACHACHAV VARANASI

<br /><br />

<img alt="Image Not found" src="photo/map2.png" width="100%"/>

</div>

<div class="w3-col s6 w3-padding-16">

<asp:Label ID="lblmain" runat="server" Text=""></asp:Label>

<div class="w3-row">

<br /><br /><br />

<div class="w3-col s5 w3-center w3-text-red">

<asp:Label ID="Label5" runat="server" Text="Name :"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label6" runat="server" Text="Mobile No. :"></asp:Label>

<br /><br /><br />


213

<asp:Label ID="Label7" runat="server" Text="Email :"></asp:Label>

<br /><br /><br />

<asp:Label ID="Label8" runat="server" Text="Message :"></asp:Label>

</div>

<div class="w3-col s7">

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Name" ID="txtname" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Mobile No" ID="txtmobile" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Email" ID="txtemail" runat="server"></asp:TextBox>

<br />

<asp:TextBox CssClass="w3-input w3-card-4 w3-round-large"

Placeholder="Message" ID="txtmessage" runat="server"></asp:TextBox>

<br />

<asp:Button CssClass="w3-input w3-card-4 w3-round-large w3-black w3-

hover-white"

ID="txtbttn" runat="server" Text="Submit" onclick="txtbttn_Click" />

</div>

</div>

</div>
214

<div class="w3-row">

</div>

</div>

</div>

<div class="w3-col s2"><br /></div>

</div>

<div class="w3-hide">

<iframe

src="https://www.google.com/maps?q=SHEPA+campus+varanasi&output=embed&hl=en&z=

15" width="100%"></iframe>

</div>

</asp:Content>

Back-End :-

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

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

protected void Page_Load(object sender, EventArgs e)


215

protected void txtbttn_Click(object sender, EventArgs e)

try

string name, email, message;

name = txtname.Text;

if (name.Equals(""))

throw new Exception("Please Insert a Valid name");

if (txtmobile.Text.Equals("") || txtmobile.Text.Equals("null"))

throw new Exception("Please insert Your Contact");

if (Convert.ToInt64(txtmobile.Text) < 5999999999 ||

Convert.ToInt64(txtmobile.Text) > 9999999999)

throw new Exception("Please insert valid number");

long contact = Convert.ToInt64(txtmobile.Text);

email = txtemail.Text;
216

if (email.Equals(""))

throw new Exception("Please insert Email Id");

bool b = Validations.IsEMail(email);

if(!b)

throw new Exception("Please insert a valid email");

message = txtmessage.Text;

if(message.Equals(""))

throw new Exception("Please Insert Your Feedback");

DataSet1TableAdapters.contactusTableAdapter da = new

DataSet1TableAdapters.contactusTableAdapter();

da.Insert(name, ""+contact, email, message, "new");

Validations.setSuccess(lblmain,"Thank you . Your Feedback is Precious For Us");

catch(Exception ex)

lblmain.Text=ex.Message;

}}}

You might also like