You are on page 1of 100

A Project Report On

ONLINE SHOPPING
(Submitted in partial fulfillment of the requirement for the Award of Degree ) Bachelor of Technology (Computer Sc. & Engg.)

2008-2012

Under the Guidance of: Dr.Archana kumar(H.O.D) Ms. Bhawna Malik Ms. Geeta

Submitted by : Amit Verma(1109) Ashish Dagar(1114) Bhanu Vaid(1119)

Delhi Institute Of Management And technology, Gannaur-Sonipat Haryana


National Highway, NH-1, NCR Delhi
1

Certificate
________________________________________________________________________

This is to certify that the Project entitled ONLINE SHOPPING which is being submitted by Amit Verma(1109), Ashish Dagar(1114), Bhanu Vaid(1119) to the Deptt. Of Computer Science & Engg, DITM for the award of Bachelor of Tech. degree in Computer Sc. & Engg., is a record of bonafide project work, they have carried out under our supervision and guidance. The result contained in this project has not been submitted to any other university or institute for the award of a degree or diploma.

Project Incharge Miss Geeta

Under The Guidence of:Dr. Archana Kumar(H.O.D)

Declaration
I/We, Name(s) hereby declare that the work presented in the project report titled ONLINE SHOPPING submitted to the Deptt. Of Computer Sc. & Engg., DITM for the partial fulfillment of the requirement for the award of Degree of Bachelor of Tech in Computer Sc. & Engg. is our authentic record of my work carried out during the 5 th semester, 2006 at College/company name under the supervision of Dr.Archana Kumar and Miss Bhwana Malik, Miss Geeta Lecturer, Deptt. Of Computer Sc. & Engg(or company designation)., DITM

The matter embodied in this project report has not been submitted elsewhere by anybody for the award of any degree or diploma.

Names:Amit Verma(1109) Ashish Dagar(1114) Bhanu Vaid(1119)

ACKNOWLEDGEMENT
It is a pleasure to acknowledge many people who knowingly and unwittingly helped us, to complete our project. First of all let us thank God for all the blessings, which carried us through all these years. We express our gratitude to Dr.Archna kumar for his cooperation and encouragement during the completion of this course. We extend our utmost gratitude to Miss bhawna malik our project guide who has always stood by our side and guided, appreciated and encouraged us to get into more and more ventures. Continuing the same, she enlightened us in the various stages during the development of this project and provided us with many insights and useful examples, which proved to be of immense help in successful completion of this project. We extend our sincere gratitude to our teachers and guide who made unforgettable contribution. We thank all the non-teaching staff of our institution that was always ready to help in whatever way they could.

NamesAmit Verma(1109) Ashish Dagar(1114) Bhanu Vaid(1119)

CONTENTS
1. Introduction 2. System Study 2.1 Existing System 2.2 Drawbacks in the Existing System 3. System Analysis 3.1 Proposed System 3.2 Scope 3.3 Need for the Proposed System 3.4 Feasibility Study 3.4.1 Technical Feasibility 3.4.2 Financial Feasibility 3.4.3 Operational Feasibility 4. Requirement Analysis 4.1 User Class and Characteristics 4.2 Functional Requirements 4.3 Performance Requirements 4.4 Non Functional Requirements 4.5 External Interfaces Requirements 4.6 General Constraints, Assumptions, Dependencies, Guidelines 5.System Design Specifiation 5.1 Architectural design 5.1.1 Data Flow Diagrams 6. Testing

7. Coding
5

8. Screen shots 9.Bibliography

1.INTRODUCTION
Online shopping is the process whereby consumers directly buy goods, services etc. from a seller interactively in real-time without an intermediary service over the internet. Online shopping is the process of buying goods and services from merchants who sell on the Internet. Since the emergence of the World Wide Web, merchants have sought to sell their products to people who surf the Internet. Shoppers can visit web stores from the comfort of their homes and shop as they sit in front of the computer.Consumers buy a variety of items from online stores. In fact, people can purchase just about anything from companies that provide their products online. Books, clothing, household appliances, toys, hardware, software, and health insurance are just some of the hundreds of products consumers can buy from an online store. Many people choose to conduct shopping online because of the convenience. For example, when a person shops at a brick-and-mortar store, she has to drive to the store, find a parking place, and walk throughout the store until she locates the products she needs. After finding the items she wants to purchase, she may often need to stand in long lines at the cash register. Despite the convenience of online shopping, not everyone chooses to purchase items and services online. Some people like the idea of physically going to a store and experiencing the shopping process. They like to touch the merchandise, try on clothing, and be around other people. Online shopping doesn't permit shoppers to touch products or 8 have any social interaction. It also doesn't allow them to take the merchandise home the same day they buy it. Online shopping allows you to browse through endless possibilities, and even offers merchandise that's unavailable in stores. If you're searching for a niche product that may not be distributed locally, you're sure to find what you're looking for on the internet. What's even more useful is the ability to compare items, similar or not, online. You can search through multiple stores at the same time, comparing material quality, sizes and pricing simultaneously. Shopping via the internet eliminates the need to sift through a store's products with potential buys like pants, shirts, belts and shoes all slung over one arm. Online shopping also eliminates the catchy, yet irritating music, as well as the hundreds, if not thousands, of other like-minded individuals who seem to have decided to shop on the same day. Say 'goodbye' to the days when you stood in line waiting, and waiting, and waiting some more for a store clerk to finally check out your items. Online shopping transactions occur instantlysaving you time to get your other errands done! Additionally, unlike a store, online shopping has friendly customer service representatives available 24 hours a day, 7 days a week to assist you with locating, purchasing and shipping your merchandise.

2.SYSTEM STUDY
Information systems projects originate from many reasons: to achieve greater speed in processing data, better accuracy and improved consistency, faster information retrieval, integration of business areas, reduced cost and better security. The sources also vary project proposals originate with department managers, senior executives and systems analysis. Sometimes the real origin is an outside source, such as a government agency which stipulates a systems requiremetns the organisattion must meet. When the request is made, the first systems activity, the preliminary investigation, begins. The activity has three parts: request clarification, feasibility study and request approval

2.1 Existing System:


The existing system was an automated system. But It was found to be inefficient in meeting the growing demands of population .

2.1.1 Drawbacks in the existing systems:


Disadvantage of the existing system: Time Consuming Expensive Needed an agent We have to out for that.

3.SYSTEM ANALYSIS
.
This system is all about the converting the shopping system from manual to online. Customer can buy products online after login to the site. Administrator is adding product to database. Administrator can edit or delete the products from the database. After buying and making payment the products are send to customers address that he has given. Customer can write feedback for the product or services. Admin can see daily sell and feedback given by customer. Administrator is adding the delivery report to the database. Both admin and customer can see the delivery report.

3.1 Purpose:
Online shopping tries to enhance access to care and improve the continuity and efficiency of services. Depending on the specific setting and locale, case managers are responsible for a variety of tasks, ranging from linking clients to services to actually providing intensive shopping and delivery services themselves

Main objective
To shop wile in the comfort of your own home ,without having to step out of the door. sell at lower rate due to less over head. provide home delivery free of cost. No wait to see the products if someone else is taking that.

3.2 Scope:
This product has great future scope. Online shopping Internet software developed on and for the Windows and later versions environments and Linux OS. This project also provides security with the use of Login-id and Password, so that any unauthorized users can not use your account. The only Authorized that will have proper access authority can access the software.

3.3 Need for the proposed system:


The online shopping (HOME SHOP) is an easy to maintain, ready to run, scalable, affordable and reliable cost saving tool from Software Associates suited for small, medium, and large shopping complex and shopping malls.
9

Features and Benefits: Providing security Low cost Basic computer knowledge required Configurable and extensible application UI design he proposed system can be used even by the nave users and it does not require any educational level, experience, and technical expertise in computer field but it will be of good use if the user has the good knowledge of how to operate a computer.

3.4 Feasibility study:


A feasibility study is a short, focused study, which aims to answer a number of questions: Does the system contribute to the overall objectives of the organizations? Can the system be implemented using current technology and within given cost and schedule constrains? Can the system be integrated with systems which are already in place?

3.4.1 Technical Feasibility:


Is the project feasibility within the limits of current technology? Does the technology exist at all? Is it available within given resource constraints (i.e., budget, schedule)?

3.4.2 Financial Feasibility:


Is the project possible, given resource constraints? Are the benefits that will accrue from the new system worth the costs? What are the savings that will result from the system, including tangible and intangible ones? What are the development and operational costs?

3.4.3 Operational Feasibility:


Define the urgency of the problem and the acceptability of any solution; if the system is developed, will it be used? Includes people-oriented and social issues: internal issues, such as manpower problems, labour objections, manager resistance,organizational conflicts and policies; also external issues, including social acceptability, legal aspects and government regulations.

10

In preliminary investigation feasibility study has three aspects.. Technical Feasibilty Operational Feasibilty Economical Feasibility

Technical Feasibility Technical issues involved are the necessary technology existence, technical guarantees of accuracy, reliability, ease of access, data security, aspects of future expansion. Technology exists to develop a system. The proposed system is capable of holding data to be used. The proposed system is capable of providing adequate response and regardless of the number of users. The proposed system being modular to the administrator, if he/she wants can add more features in the future and as well as be able to expand the system. As far as the hardware and software is concerned, the proposed system is completely liable with proper backup and security.

Hence, we can say that the proposed system is technically feasible. Operational Feasibility If the system meets the requirements of the customers and the administrator we can say that the system is operationally feasible. The proposed system will be beneficial only if it can be turned into a system which will meet the requirements of the store when it is developed and installed, and there is sufficient support from the users The proposed system will improve the total performance. Customers here are the most important part of the system and the proposed system will provide them with a convenient mode of operation for them. The proposed system will be available to the customers throughout the globe. The proposed system will provide a better market for different dealers.

Hence, the proposed system is operationally feasible.

11

Economical Feasibility Economic Feasibility is the most frequently used method for evaluating the effectiveness of the proposed system if the benefits of the proposed system outweighs the cost then the decision is made to design and implement the system. The cost of hardware and software is affordable. High increase in the amount of profit earned by going global. Easy and cheap maintenance of the system possible. Very cheap price for going global.

Hence, the proposed system is economically feasible.

FEATURES OF THE PROPOSED SYSTEM The proposed system is flexible both for the administrators and the customers visiting the website. The proposed system provides a unique platform for different silk vendors to interact using the same platform. The proposed system allows easy promotion of the site through emails and newsletters. The proposed system gives information about the delivery and present status of their orders. Management of data is easy. Security is provided wherever necessary.

PROPOSED SYSTEM In the proposed website there are different parts or modules which are summarized as follows CUSTOMER REGISTRATION: Customers are required to register on the website before they can do the shopping. The website also provides several features for the non-registered user. Here they can choose their id and all the details regarding them are collected and a mail is sent to the email address for confirmation. SHOPPING CART: Shopping cart module tries to simulate the working of a store where user can view each design, color, size and price of the product available. The items they like can be added to the logical cart and can be removed if not required later. Billing and other payment related matters are handled here.
12

ADMINISTRATION: This is the part of the website where the administrators can add delete or update the product information. Administrators are also responsible for adding and deleting the customers from the website. In addition, newsletter and promotions are also handled by the site administrator via email. SEARCH : This facility is provided to both registered and unregistered user. User can search for the availability and type of products available on the website. EMAILING: Emailing module is concerned about promotions and newsletter and is handled by the administrator. This module is also concerned about sending activation and warning mails.

13

4. SYSTEM REQUIREMENTS SPECIFICATIONS


System requirements are expressed in a software requirement document. The Software requirement specification (SRS) is the official statement of what is required of the system developers. This requirement document includes the requirements definition and the requirement specification. The software requirement document is not a design document. It should set out what the system should do without specifying how it should be done. The requirement set out in this document is complete and consistent. The software specification document satisfies the following: It specifies the external system behaviors. It specifies constraints on the implementation. It is easy to change. It serves as reference tool for system maintainers. It record forethought about the life cycle of the system. It characterizes acceptable response to undesired events.

4.1 User Class and Characteristics:


General public Customers Administrator General public can use the system to see the product,their prices and quantity available. General user can not buy the products. Customers are using for viewing and buying the products. Customer can also write feedbacks for products and services Administrators can add,edit & delete products.and provide services to the customer. Administrator can see the daily sell. Can also see the the feedback given by the customer. Administrator maintaining the deliveries.

4.2 Functional Requirements:


The System must provide following functionalities Keeping records of admission of customers. keeping the records of products. keeping the daily sell . Storing the feedback given by the customer. keeping details about the product it is delivered or not. etc. Storing the items selected by the customer in the temporary storage.
14

4.3 Performance Requirements:


In order to maintain an acceptable speed at maximum number of uploads allowed from a particular customer will be any number of users can access the system at any time. Also connections to the servers will be based on the criteria of attributes of the user like his location, and server will be working whole 24X 7 times.

4.4 Non Functional Requirements:


Following Non-functional requirements will be there in the Insurance on internet: Secure access of confidential data (customers details). 24 X 7 availability. Better component design to get better performance at peak time.

Flexible service based architecture will be highly desirable for future extension Non functional requirements define system properties and constraints It arise through user needs, because of budget constraints or organizational policies, or due to the external factors such as safety regulations, privacy registration and so on. Various other Non-functional requirements are: 1. Security 2. Reliability 3. Maintainability 4. Portability 5. Extensibility 6. Reusability 7. Application Affinity/Compatibility 8. Resource Utilization

4.5 External Interface Requirements: 4.5.1 User Interface:


User of the system will be provided with the Graphical user interface, there is no command line interface for any functions of the product. The user will get 2 pages 1. Login page followed by Password

15

4.5.2 Hardware Interface: Hardware requirements for Insurance on internet will be same for both the parties which are follows: Processor: - Pentium I or above. RAM: - 128 MB or above. HD: - 20 GB or above. NIC: - For each party

4.5.3 Software Interface:Software required to make working of product is:Front end- visual studio 2010 Back end- sql server 2008

4.5.4 Communication Interfaces


The two parties should be connected through either by LAN or WAN for the communication. Communication channels

4.6 General Constraints, Assumptions, Dependencies, Guidelines: 4.6.1 General Constraints


The interface will be in English only. The system is working for single server. Sender Receiver There is no maintainability or backup so availability will get affected. The system is a single user system. GUI features available.

4.6.2 Assumptions and Dependencies


The product does require back-end database server MySQL for storing the username and password for different types of user of the system as well as various databases regarding various insurance information.

16

Assumptions:
User must be trained for basic computer functionalities. User must have the basic knowledge of English The system must be able to respond to database software within reasonable time.

17

5. SYSTEM DESIGN SPECIFICATION


5.1 ARCHITECTURAL DESIGN 5.1.1 DATA FLOW DIAGRAMS:
Data flow diagrams (DFD) was first developed by LARRY CONSTANTINE as way representing system requirements in a graphical form; this lead to modular design. A DFD describes what data flow (logical) rather than how they are processed, so it does not depend on hardware, software, data structure or file organization. It is also known as bubble chart. A Data Flow Diagrams is a structured analysis and design tool that can be used for flowcharting in place of, or in association with, information-oriented and process-oriented systems flowcharts. A DFD is a network that describes the flow of data and the processes that change, or transform, data throughout a system. This network is constructed by using a set of symbols that do not imply a physical implementation. It has the purpose of clarifying system requirements and identifying major transformations that will become programs in system design. So it is the starting point of the design phase that functionality decomposes the requirement specifications down to the lowest level of detail. 20 The symbols used to prepare DFD do not imply a physical implementation, a DFD can be considered to an abstract of the logic of an information-oriented or a process-oriented system flow-chart. For these reasons DFDs are often referred to as logical data flow diagrams. The four basic symbols used to construct data flow diagrams are shown below:

These are symbols that represent data flows, data sources, data transformations and data storage. The points at which data are transformed are represented by enclosed figures, usually circles, which are called nodes. The principle processes that take place at nodes are:

18

1. combining data streams 2. splitting data streams 3. modifying data streams

CAD(CONTEXT ANALYSIS DIAGRAM)

19

20

21

6. TESTING
Software Testing is an empirical investigation conducted to provide stakeholders with information about the quality of the product or service under test, with respect to the context in which it is intended to operate. Software Testing also provides an objective, independent view of the software to allow the business to appreciate and understand the risks at implementation of the software. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs. It can also be stated as the process of validating and verifying that a software program/application/product meets the business and technical requirements that guided its design and development, so that it works as expected and can be implemented with the same characteristics. Software Testing, depending on the testing method employed, can be implemented at any time in the development process, however the most test effort is employed after the requirements have been defined and coding process has been completed.

22

6.1 Unit Testing:


The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect. Each unit is tested separately before integrating them into modules to test the interfaces between modules. Unit testing has proven its value in that a large percentage of defects are identified during its use. Unit testing is a software verification and validation method where the programmer gains confidence that individual units of source code are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure, etc., while in object-oriented programming, the smallest unit is a class, which may belong to a base/super class, abstract class or derived/child class. Ideally, each test case is independent from the others: substitutes like method stubs, mock objects, fakes and test harnesses can be used to assist testing a module in isolation. Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended. Its implementation can vary from being very manual (pencil and paper) to being formalized as part of build automation.

23

6.2 Integration Testing


Integration testing, also known as integration and testing (I&T), is a software development process which program units are combined and tested as groups in multiple ways. In this context, a unit is defined as the smallest testable part of an application. Integration testing can expose problems with the interfaces among program components before trouble occurs in real-world program execution. Integration testing is a component of Extreme Programming (XP), a pragmatic method of software development that takes a meticulous approach to building a product by means of continual testing and revision. There are two major ways of carrying out an integration test, called the bottom-up method and the top-down method. Bottom-up integration testing begins with unit testing, followed by tests of progressively higher-level combinations of units called modules or builds. In top-down integration testing, the highest-level modules are tested first and progressively lower-level modules are tested after that. In a comprehensive software development environment, bottom-up testing is usually done first, followed by top-down testing.

24

6.3 Validation testing


At the validation level, testing focuses on user visible actions and user recognizable output from the system. Validations testing is said to be successful when software functions in a manner that can be reasonably expected by the customer. Two types of validation testing Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Alpha testing is often employed for offthe-shelf software as a form of internal acceptance testing, before the software goes to beta testing. Beta testing comes after alpha testing. Versions of the software, known as beta version, are released to a limited audience outside of the programming team. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Sometimes, beta versions are made available to the open public to increase the feedback field to a maximal number of future users

Gray box testing Grey box testing is the combination of black box and white box
testing. Intention of this testing is to find out defects related to bad design or bad implementation of the system.it is used for web application

25

7.Coding

Add category
<%@ Page Language="C#" MasterPageFile="~/admin/admin_master.master" AutoEventWireup="true" CodeFile="add_cat.aspx.cs" Inherits="admin_add_cat" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><br /><br /> <table> <tr> <td height="468" width="991"> <div style="height:468px; width:991px"> <center> <table class="shadow" cellpadding="10" cellspacing="10"> <tr> <td colspan="2" align="center" style="height: 32px"> <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="Add Category" Font-Bold="True" Font-Underline="True"></asp:Label> </td> </tr> <tr> <td style="width: 159px; height: 18px"> <asp:Label ID="Label2" runat="server" Text="Enter Category : " Font-Bold="True" Font-Size="Medium"></asp:Label> </td> <td style="height: 18px"> <asp:TextBox ID="txtCat" runat="server" Height="27px" Width="136px" ValidationGroup="er" Font-Size="Large"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="txtCat" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 159px"> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Medium" Text="Status : "></asp:Label> </td> <td> <asp:RadioButton ID="optTrue" runat="server" Font-Bold="True" GroupName="status" Text="True" /> <asp:RadioButton ID="optFalse" runat="server" Checked="True" Font-Bold="True" GroupName="status" Text="False" /> </td> </tr> <tr> <td style="width: 159px"> <asp:Button ID="cmdSubmit" runat="server" Text="Submit" onclick="cmdSubmit_Click" Height="28px" Width="75px" ValidationGroup="er" Font-Size="Medium" /> </td> <td> <asp:Button ID="cmdClear" runat="server" Text="Clear" Height="28px" Width="75px" onclick="cmdClear_Click" Font-Size="Medium" /> </td>

26

</tr> </table> <br /><asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Red"></asp:Label> </center> </div> </td> </tr> </table> </asp:Content>

27

Add product
<%@ Page Language="C#" MasterPageFile="~/admin/admin_master.master" AutoEventWireup="true" CodeFile="add_prod.aspx.cs" Inherits="admin_Default" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table> <tr> <td height="660" width="991"> <div style="height:660px; width:991px;"> <center> <asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Red"></asp:Label><br /> </center> <table style="width: 67%; height: 436px;" class="shadow" cellspacing="8" frame="border"> <tr> <td colspan="3" style="height: 31px" align="center"> <asp:Label ID="Label7" runat="server" Text="Add Product" Font-Bold="True" Font-Size="XX-Large" Font-Underline="True" ForeColor="#003399"></asp:Label></td> </tr> <tr> <td style="height: 37px; width: 152px;"> <asp:Label ID="Label1" runat="server" Text="Select Category : "></asp:Label> </td> <td style="height: 37px; width: 157px;"> <asp:DropDownList ID="ddlCategories" runat="server" Height="30px" Width="180px" Font-Size="Medium" CausesValidation="True" AutoPostBack="True" onselectedindexchanged="ddlCategories_SelectedIndexChanged"> </asp:DropDownList>

</td> <td style="height: 37px; width: 5px;"> <asp:Label ID="lblCatError" runat="server"></asp:Label> </td> </tr> <tr> <td style="height: 37px; width: 152px;"> <asp:Label ID="Label8" runat="server" Text="Select SubCategory : "></asp:Label> </td> <td style="height: 37px; width: 157px;"> <asp:DropDownList ID="ddlSubCat" runat="server" Height="30px" Width="180px" Font-Size="Medium" CausesValidation="True" AutoPostBack="True" onselectedindexchanged="ddlSubCat_SelectedIndexChanged"> </asp:DropDownList> </td> <td style="height: 37px; width: 5px;"> <asp:Label ID="lblSubCatError" runat="server"></asp:Label> </td> </tr> <tr> <td style="width: 152px; height: 31px;">

28

<asp:Label ID="Label2" runat="server" Text="Product Name : "></asp:Label> </td> <td style="width: 157px; height: 31px;"> <asp:TextBox ID="txtPname" runat="server" Height="30px" Width="180px" ValidationGroup="er"></asp:TextBox> </td> <td style="width: 5px; height: 31px;"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPname" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 152px; height: 100px"> <asp:Label ID="Label3" runat="server" Text="Select Image : "></asp:Label> </td> <td style="height: 110px; width: 157px;" align="center"> <asp:Image ID="imgImage" runat="server" Height="80px" Width="80px" AlternateText="Product Image" /><br /> <asp:RequiredFieldValidator ID="rfvImage" runat="server" ControlToValidate="fupImage" ErrorMessage="File Not Selected" ValidationGroup="er" Display="Dynamic"></asp:RequiredFieldValidator> <asp:Label ID="lblImageError" runat="server" ForeColor="Red"></asp:Label> </td> <td style="width: 5px; height: 100px"> <asp:FileUpload ID="fupImage" runat="server" Height="29px" Width="212px" /> <asp:Button ID="cmdUpload" runat="server" onclick="cmdUpload_Click" Text="Upload" Height="29px" Width="76px" /> </td> </tr> <tr> <td style="width: 152px; height: 100px"> <asp:Label ID="Label9" runat="server" Text="Select Big Image : "></asp:Label> </td> <td style="height: 110px; width: 157px;" align="center"> <asp:Image ID="imgBImage" runat="server" Height="80px" Width="80px" AlternateText="Product Image" /><br /> <asp:RequiredFieldValidator ID="rfvBImage" runat="server" ControlToValidate="fupBImage" ErrorMessage="File Not Selected" ValidationGroup="er" Display="Dynamic"></asp:RequiredFieldValidator> <asp:Label ID="lblBImageError" runat="server" ForeColor="Red"></asp:Label> </td> <td style="width: 5px; height: 100px"> <asp:FileUpload ID="fupBImage" runat="server" Height="29px" Width="212px" /> <asp:Button ID="cmdBUpload" runat="server" onclick="cmdBUpload_Click" Text="Upload" Height="29px" Width="76px" /> </td> </tr> <tr> <td style="width: 152px; height: 31px;"> <asp:Label ID="Label4" runat="server" Text="Price (in Rupees) : "></asp:Label> </td> <td style="width: 157px; height: 31px;"> <asp:TextBox ID="txtPrice" runat="server" Height="30px" Width="180px" ValidationGroup="er"></asp:TextBox> </td> <td style="width: 5px; height: 31px;"> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtPrice" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> <asp:RangeValidator ID="RangeValidator1" runat="server"

29

ControlToValidate="txtPrice" Display="Dynamic" ErrorMessage="should be integer" MaximumValue="1000000000" MinimumValue="0" Type="Integer" ValidationGroup="er" Width="150px"></asp:RangeValidator> </td> </tr> <tr> <td style="width: 152px"> <asp:Label ID="Label5" runat="server" Text="Features : "></asp:Label> </td> <td style="width: 157px"> <asp:TextBox ID="txtFeatures" runat="server" TextMode="MultiLine" Width="180px" ValidationGroup="er" Height="52px" Wrap="False"></asp:TextBox> </td> <td style="width: 5px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtFeatures" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 152px"> <asp:Label ID="Label6" runat="server" Text="Status : "></asp:Label> </td> <td style="width: 157px" colspan="2"> <asp:RadioButton ID="optTrue" runat="server" GroupName="status" Text="True" ValidationGroup="er" /> <asp:RadioButton ID="optFalse" runat="server" Checked="True" GroupName="status" Text="False" ValidationGroup="er" /> </td> </tr> <tr> <td style="width: 152px; height: 40px;"> <asp:Button ID="cmdSubmit" runat="server" Text="Submit" onclick="cmdSubmit_Click" ValidationGroup="er" /> </td> <td style="width: 157px; height: 40px;" colspan="2"> <asp:Button ID="cmdClear" runat="server" Text="Clear" onclick="cmdClear_Click" /> </td> </tr> </table> </div> </td> </tr> </table> </asp:Content>

30

Add subcategory <%@ Page Language="C#" MasterPageFile="~/admin/admin_master.master" AutoEventWireup="true"


CodeFile="add_subcat.aspx.cs" Inherits="admin_add_subcat" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><br /><br /> <table> <tr> <td height="468" width="991"> <div style="height:468px;"> <center> <table class="shadow" cellpadding="10" cellspacing="10"> <tr> <td colspan="2" align="center" style="height: 32px"> <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="Add SubCategory" Font-Bold="True" Font-Underline="True"></asp:Label> </td> </tr> <tr> <td style="height: 38px"> <asp:Label ID="Label4" runat="server" Text="Select Category : " Font-Bold="True" Font-Size="Medium"></asp:Label> </td> <td style="width: 162px; height: 40px;"> <asp:DropDownList ID="ddlCategories" runat="server" Height="29px" Width="145px" onselectedindexchanged="ddlCategories_SelectedIndexChanged" AutoPostBack="True"> </asp:DropDownList> </td>

</tr> <tr> <td style="width: 159px; height: 18px"> <asp:Label ID="Label2" runat="server" Text="Enter SubCategory : " Font-Bold="True" Font-Size="Medium"></asp:Label> </td> <td style="height: 20px; width: 162px;"> <asp:TextBox ID="txtSubCat" runat="server" Height="27px" Width="136px" ValidationGroup="er" Font-Size="Large"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="txtSubCat" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 159px"> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Medium" Text="Status : "></asp:Label> </td> <td style="width: 162px"> <asp:RadioButton ID="optTrue" runat="server" Font-Bold="True" GroupName="status" Text="True" /> <asp:RadioButton ID="optFalse" runat="server" Checked="True" Font-Bold="True" GroupName="status" Text="False" /> </td>

31

</tr> <tr> <td style="width: 159px"> <asp:Button ID="cmdSubmit" runat="server" Text="Submit" Height="28px" Width="75px" ValidationGroup="er" Font-Size="Medium" onclick="cmdSubmit_Click" /> </td> <td style="width: 162px"> <asp:Button ID="cmdClear" runat="server" Text="Clear" Height="28px" Width="75px" onclick="cmdClear_Click" Font-Size="Medium" /> </td> </tr> </table> <br /><asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Red"></asp:Label> </center> </div> </td> </tr> </table> </asp:Content>

32

Admin login page


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_login.aspx.cs" Inherits="admin_admin_login" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <center> <div><br /><br /<br /><br /><br /><br /><hr /><br /> <asp:Login ID="Admin_Login" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderPadding="10" BorderStyle="Double" BorderWidth="5px" DisplayRememberMe="False" Font-Bold="False" Font-Italic="False" Font-Names="Verdana" Font-Size="Medium" Font-Strikeout="False" Font-Underline="False" ForeColor="#333333" onauthenticate="Admin_Login_Authenticate" TitleText="Administrator Login" UserNameLabelText="Admin ID : " Height="112px" PasswordLabelText="Password : "> <TextBoxStyle Font-Size="0.8em" /> <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" /> <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /> </asp:Login> <br /><hr /> </div> <br /><br /><br /><br /> <asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Size="XX-Large" ForeColor="Red"></asp:Label> </center> </form> </body> </html>

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web;

33

using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class admin_admin_login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString.HasKeys()) { string msg = Request.QueryString.Get(0).ToString(); if (msg == "logout") lblMessage.Text = "You are Logged out Successfully!"; else if (msg == "timeout") lblMessage.Text = "Session TIME OUT!<br>Please Login again."; } Admin_Login.Focus(); } protected void Admin_Login_Authenticate(object sender, AuthenticateEventArgs e) { admin_login ob = new admin_login(); bool success = ob.validate(Admin_Login.UserName.ToString(), Admin_Login.Password.ToString()); if (success) { Session["admin_id"] = Admin_Login.UserName.ToString(); Session.Timeout = 5; Response.Redirect("~/admin/admin_home.aspx"); } else { lblMessage.Text = ""; } } }

34

Change password
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class admin_Default : System.Web.UI.Page { protected void cmdChangePwd_Click(object sender, EventArgs e) { string admin_id = Session["admin_id"].ToString(); admin_login admin_login = new admin_login(); bool success = admin_login.validate(admin_id, txtCPwd.Text); if (success) { success = admin_login.change_pwd(admin_id, txtNPwd.Text); if(success) lblMessage.Text = "Password Changed Successfully"; else lblMessage.Text = "Failed to Change Password."; } else lblMessage.Text = "Current Password is Incorrect"; } protected void cmdClear_Click(object sender, EventArgs e) { lblMessage.Text = ""; txtCPwd.Text = ""; txtNPwd.Text = ""; txtCNPwd.Text = ""; } }

<%@ Page Language="C#" MasterPageFile="~/admin/admin_master.master" AutoEventWireup="true" CodeFile="change_pwd.aspx.cs" Inherits="admin_Default" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table> <tr> <td height="468" width="991"> <div style="height:468px;"> <center> <asp:Label ID="lblMessage" runat="server" Font-Bold="True"

35

Font-Size="Medium" ForeColor="Red"></asp:Label><br /></center> <table class="shadow" cellspacing="9"> <tr> <td colspan="3" align="center"><asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#000066" Text="Change Password" Font-Underline="True"></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="Label2" runat="server" Text="Current Password"></asp:Label> </td> <td> <asp:TextBox ID="txtCPwd" runat="server" TextMode="Password" Height="23px"></asp:TextBox> </td> <td> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCPwd" ErrorMessage="*" Display="Dynamic" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="height: 35px"> <asp:Label ID="Label3" runat="server" Text="New Password"></asp:Label> </td> <td style="height: 35px"> <asp:TextBox ID="txtNPwd" runat="server" TextMode="Password" Height="23px"></asp:TextBox> </td> <td style="height: 35px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtNPwd" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToCompare="txtCPwd" ControlToValidate="txtNPwd" ErrorMessage="New &amp; Current can't be same" Operator="NotEqual" Font-Size="10pt" ValidationGroup="er"></asp:CompareValidator> </td> </tr> <tr> <td style="height: 35px"> <asp:Label ID="Label4" runat="server" Text="Confirm New Password"></asp:Label> </td> <td style="height: 35px"> <asp:TextBox ID="txtCNPwd" runat="server" TextMode="Password" Height="23px"></asp:TextBox> </td> <td style="height: 35px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtCNPwd" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtNPwd" ControlToValidate="txtCNPwd" ErrorMessage="Do not match" Font-Size="11pt" ValidationGroup="er"></asp:CompareValidator> </td> </tr> <tr> <td>

36

<asp:Button ID="cmdChangePwd" runat="server" Text="Change Password" onclick="cmdChangePwd_Click" ValidationGroup="er" Font-Size="Medium" Height="29px" Width="196px" /> </td> <td> <asp:Button ID="cmdClear" runat="server" onclick="cmdClear_Click" Text="Clear" Font-Size="Medium" Height="30px" /> </td> </tr> </table> </div> </td> </tr> </table> </asp:Content>

37

Edit delete
<%@ Page Language="C#" MasterPageFile="~/admin/admin_master.master" AutoEventWireup="true" CodeFile="edit_delete.aspx.cs" Inherits="admin_edit_delete" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script type="text/javascript" language="javascript"> function del_confirm() { return confirm("Do you really want to delete the Item?"); } </script> <table> <tr> <td height="740" width="991"> <div style="height:740px;"> <table style="margin-left:400px;"> <tr> <td><asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Red"></asp:Label></td> </tr> </table> <table class="shadow" cellspacing="8" frame="border"> <tr> <td colspan="3" style="height: 31px" align="center"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label7" runat="server" Text="Edit/Delete Items" Font-Bold="True" Font-Size="XX-Large" Font-Underline="True" ForeColor="#003399"></asp:Label> </td> </tr> <tr> <td style="height: 37px; width: 152px;"> <asp:Label ID="Label1" runat="server" Text="Select Category : "></asp:Label> </td> <td style="height: 37px; width: 157px;"> <asp:DropDownList ID="ddlCategories" runat="server" Height="30px" Width="180px" Font-Size="Medium" CausesValidation="True" AutoPostBack="True" onselectedindexchanged="ddlCategories_SelectedIndexChanged"> </asp:DropDownList>

</td> <td style="height: 37px; width: 14px;"> <asp:Label ID="lblCatError" runat="server" Font-Size="10pt"></asp:Label> </td> <td style="height: 37px; width: 100px;"> <asp:LinkButton ID="lbtnCEdit" runat="server" onclick="lbtnCEdit_Click">Edit</asp:LinkButton>&nbsp;|

38

<asp:LinkButton ID="lbtnCDel" runat="server" onclick="lbtnCDel_Click" OnClientClick='return(del_confirm())'>Delete</asp:LinkButton> </td> </tr> <tr> <td style="height: 37px; width: 152px;"> <asp:Label ID="Label8" runat="server" Text="Select SubCategory : "></asp:Label> </td> <td style="height: 37px; width: 157px;"> <asp:DropDownList ID="ddlSubCat" runat="server" Height="30px" Width="180px" Font-Size="Medium" CausesValidation="True" AutoPostBack="True" onselectedindexchanged="ddlSubCat_SelectedIndexChanged"> </asp:DropDownList>

</td> <td style="height: 37px; width: 14px;"> <asp:Label ID="lblSubCatError" runat="server" Font-Size="10pt"></asp:Label> </td> <td> <asp:LinkButton ID="lbtnSCEdit" runat="server" onclick="lbtnSCEdit_Click">Edit</asp:LinkButton>&nbsp;| <asp:LinkButton ID="lbtnSCDel" runat="server" onclick="lbtnSCDel_Click" OnClientClick='return(del_confirm())'>Delete</asp:LinkButton> </td> </tr> <tr> <td style="height: 37px"> <asp:Label ID="Label9" runat="server" Text="Select Product : "></asp:Label> </td> <td style="height: 37px"> <asp:DropDownList ID="ddlProducts" runat="server" Height="30px" Width="180px" Font-Size="Medium" CausesValidation="True" AutoPostBack="True" onselectedindexchanged="ddlProducts_SelectedIndexChanged"> </asp:DropDownList>

</td> <td style="height: 37px; width: 14px;"> <asp:Label ID="lblProductError" runat="server" Font-Size="10pt"></asp:Label> </td> <td> <asp:LinkButton ID="lbtnPEdit" runat="server" onclick="lbtnPEdit_Click">Edit</asp:LinkButton>&nbsp;| <asp:LinkButton ID="lbtnPDel" runat="server" onclick="lbtnPDel_Click" OnClientClick='return(del_confirm())'>Delete</asp:LinkButton> </td> </tr> </table>

<asp:MultiView ID="MultiView1" runat="server"> <asp:View ID="View1" runat="server"> <table cellpadding="10" cellspacing="10" class="shadow"> <tr> <td align="center" colspan="2" style="height: 32px">

39

<asp:Label ID="Label10" runat="server" Font-Bold="True" Font-Size="X-Large" Font-Underline="True" Text="Edit Category"></asp:Label> </td> </tr> <tr> <td style="width: 159px; height: 18px"> <asp:Label ID="Label11" runat="server" Font-Bold="True" Font-Size="Medium" Text="Enter Category : "></asp:Label> </td> <td style="height: 18px"> <asp:TextBox ID="txtCat" runat="server" Font-Size="Large" Height="27px" ValidationGroup="er" Width="136px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCat" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 159px"> <asp:Label ID="Label12" runat="server" Font-Bold="True" Font-Size="Medium" Text="Status : "></asp:Label> </td> <td> <asp:RadioButton ID="optCTrue" runat="server" Font-Bold="True" GroupName="status" Text="True" /> <asp:RadioButton ID="optCFalse" runat="server" Font-Bold="True" GroupName="status" Text="False" /> </td> </tr> <tr> <td style="width: 159px"> <asp:Button ID="cmdCSubmit" runat="server" Font-Size="Medium" Height="28px" onclick="cmdCSubmit_Click" Text="Submit" ValidationGroup="er" Width="75px" /> </td> <td> <asp:Button ID="cmdCClear" runat="server" Font-Size="Medium" Height="28px" onclick="cmdCClear_Click" Text="Clear" Width="75px" /> </td> </tr> </table> </asp:View> <asp:View ID="View2" runat="server"> <table cellpadding="10" cellspacing="10" class="shadow"> <tr> <td align="center" colspan="2" style="height: 32px"> <asp:Label ID="Label13" runat="server" Font-Bold="True" Font-Size="X-Large" Font-Underline="True" Text="Edit SubCategory"></asp:Label> </td> </tr> <tr> <td style="width: 159px; height: 18px"> <asp:Label ID="Label15" runat="server" Font-Bold="True" Font-Size="Medium" Text="Enter SubCategory : "></asp:Label> </td> <td style="height: 18px; width: 162px;"> <asp:TextBox ID="txtSubCat" runat="server" Font-Size="Large" Height="27px" ValidationGroup="er" Width="136px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"

40

ControlToValidate="txtSubCat" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 159px"> <asp:Label ID="Label16" runat="server" Font-Bold="True" Font-Size="Medium" Text="Status : "></asp:Label> </td> <td style="width: 162px"> <asp:RadioButton ID="optSCTrue" runat="server" Font-Bold="True" GroupName="status" Text="True" /> <asp:RadioButton ID="optSCFalse" runat="server" Font-Bold="True" GroupName="status" Text="False" /> </td> </tr> <tr> <td style="width: 159px"> <asp:Button ID="cmdSCSubmit" runat="server" Font-Size="Medium" Height="28px" onclick="cmdSCSubmit_Click" Text="Submit" ValidationGroup="er" Width="75px" /> </td> <td style="width: 162px"> <asp:Button ID="cmdSCClear" runat="server" Font-Size="Medium" Height="28px" Text="Clear" Width="75px" onclick="cmdSCClear_Click" /> </td> </tr> </table> </asp:View>

<asp:View ID="View3" runat="server"> <table style="width: 65%; height: 366px; " class="shadow" cellspacing="8" frame="border"> <tr> <td style="width: 152px; height: 31px;"> <asp:Label ID="Label2" runat="server" Text="Product Name : "></asp:Label> </td> <td style="width: 154px; height: 31px;"> <asp:TextBox ID="txtPname" runat="server" Height="30px" Width="180px" ValidationGroup="er"></asp:TextBox> </td> <td style="width: 8px; height: 31px;"> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPname" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 152px; height: 100px"> <asp:Label ID="Label3" runat="server" Text="Select Image : "></asp:Label> </td> <td style="height: 110px; width: 154px;" align="center"> <asp:Image ID="imgImage" runat="server" Height="80px" Width="80px" AlternateText="Product Image" /><br /> <asp:RequiredFieldValidator ID="rfvImage" runat="server" ControlToValidate="fupImage" Display="Dynamic" ErrorMessage="File Not Selected" ValidationGroup="er"></asp:RequiredFieldValidator> <br /> <asp:Label ID="lblImageError" runat="server" ForeColor="Red"></asp:Label>

41

</td> <td style="width: 8px; height: 100px"> <asp:FileUpload ID="fupImage" runat="server" Height="29px" Width="212px" /> <asp:Button ID="cmdUpload" runat="server" onclick="cmdUpload_Click" Text="Upload" Height="29px" Width="76px" /> </td> </tr> <tr> <td style="width: 152px; height: 100px"> <asp:Label ID="Label14" runat="server" Text="Select Big Image : "></asp:Label> </td> <td style="height: 110px; width: 154px;" align="center"> <asp:Image ID="imgBImage" runat="server" Height="80px" Width="80px" AlternateText="Product Image" /><br /> <asp:RequiredFieldValidator ID="rfvBImage" runat="server" ControlToValidate="fupBImage" ErrorMessage="File Not Selected" ValidationGroup="er" Display="Dynamic"></asp:RequiredFieldValidator> <asp:Label ID="lblBImageError" runat="server" ForeColor="Red"></asp:Label> </td> <td style="width: 8px; height: 100px"> <asp:FileUpload ID="fupBImage" runat="server" Height="29px" Width="212px" /> <asp:Button ID="cmdBUpload" runat="server" onclick="cmdBUpload_Click" Text="Upload" Height="29px" Width="76px" /> </td> </tr> <tr> <td style="width: 152px; height: 31px;"> <asp:Label ID="Label4" runat="server" Text="Price (in Rupees) : "></asp:Label> </td> <td style="width: 154px; height: 31px;"> <asp:TextBox ID="txtPrice" runat="server" Height="30px" Width="180px" ValidationGroup="er"></asp:TextBox> </td> <td style="width: 8px; height: 31px;"> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtPrice" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtPrice" Display="Dynamic" ErrorMessage="should be integer" MaximumValue="1000000000" MinimumValue="0" Type="Integer" ValidationGroup="er" Width="150px"></asp:RangeValidator> </td> </tr> <tr> <td style="width: 152px"> <asp:Label ID="Label5" runat="server" Text="Features : "></asp:Label> </td> <td style="width: 154px"> <asp:TextBox ID="txtFeatures" runat="server" TextMode="MultiLine" Width="180px" ValidationGroup="er" Height="52px" Wrap="False"></asp:TextBox> </td> <td style="width: 8px"> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtFeatures" ErrorMessage="*" ValidationGroup="er"></asp:RequiredFieldValidator> </td> </tr> <tr> <td style="width: 152px; height: 31px;"> <asp:Label ID="Label6" runat="server" Text="Status : "></asp:Label> </td>

42

<td style="height: 31px;" colspan="2"> <asp:RadioButton ID="optTrue" runat="server" GroupName="status" Text="True" ValidationGroup="er" /> <asp:RadioButton ID="optFalse" runat="server" GroupName="status" Text="False" ValidationGroup="er" /> </td> </tr> <tr> <td style="width: 152px; height: 40px;"> <asp:Button ID="cmdSubmit" runat="server" Text="Submit" onclick="cmdSubmit_Click" ValidationGroup="er" /> </td> <td style="height: 40px;" colspan="2"> <asp:Button ID="cmdClear" runat="server" Text="Clear" onclick="cmdClear_Click" /> </td> </tr> </table> </asp:View> </asp:MultiView> </div> </td> </tr> </table> </asp:Content>

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; using System.IO; public partial class admin_edit_delete : System.Web.UI.Page { admin_functions ob; DataSet ds; static string filename; static string image_url; static string Bfilename; static string Bimage_url; static int c_id, sc_id,p_id;

43

protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ob = new admin_functions(); ds = ob.ddl_cat_fill(); if (ds != null) { ddlCategories.DataTextField = "c_name"; ddlCategories.DataSource = ds; ddlCategories.DataBind(); ddlCategories.Items.Insert(0, "Select a Category"); cat_invisible(); } else lblMessage.Text = "Failed to load Categories!"; } } protected void ddlCategories_SelectedIndexChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = -1; if (ddlCategories.SelectedIndex == 0) { lblCatError.Text = "Select a Category"; cat_invisible(); } else { ob = new admin_functions(); c_id = ob.get_cid(ddlCategories.SelectedItem.Text); ds = ob.ddl_sub_cat_fill(c_id); if (ds != null) { lblCatError.Text = ""; ddlSubCat.Enabled = true; ddlSubCat.DataTextField = "sc_name"; ddlSubCat.DataSource = ds; ddlSubCat.DataBind(); ddlSubCat.Items.Insert(0, "Select a SubCategory"); lbtnCEdit.Visible = true; lbtnCDel.Visible = true; sub_cat_invisible(); } else lblMessage.Text = "Failed to load Sub-Categories!"; } } protected void ddlSubCat_SelectedIndexChanged(object sender, EventArgs e) {

44

MultiView1.ActiveViewIndex = -1; if (ddlSubCat.SelectedIndex == 0) { lblSubCatError.Text = "Select a Sub-Category"; sub_cat_invisible(); } else { ob = new admin_functions(); sc_id = ob.get_scid(c_id,ddlSubCat.SelectedItem.Text); ds = ob.ddl_product_fill(c_id,sc_id); if (ds != null) { lblSubCatError.Text = ""; ddlProducts.Enabled = true; ddlProducts.DataTextField = "p_name"; ddlProducts.DataSource = ds; ddlProducts.DataBind(); ddlProducts.Items.Insert(0, "Select a Product"); lbtnSCEdit.Visible = true; lbtnSCDel.Visible = true; products_invisible(); } else lblMessage.Text = "Failed to load Products!"; } } protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = -1; if (ddlProducts.SelectedIndex == 0) { lblProductError.Text = "Select a Product"; products_invisible(); } else { ob = new admin_functions(); p_id = ob.get_pid(c_id, sc_id,ddlProducts.SelectedItem.Text); lblProductError.Text = ""; lbtnPEdit.Visible = true; lbtnPDel.Visible = true; } } protected void cmdCSubmit_Click(object sender, EventArgs e) { string status = "false"; if (optCTrue.Checked == true) status = "true";

45

ob = new admin_functions(); bool success = ob.update_cat(c_id, txtCat.Text, status); if (success == true) { ds = ob.ddl_cat_fill(); ddlCategories.DataTextField = "c_name"; ddlCategories.DataSource = ds; ddlCategories.DataBind(); ddlCategories.Items.Insert(0, "Select a Category"); cat_invisible(); lblMessage.Text = "Category Updated Successfully."; MultiView1.ActiveViewIndex = -1; } else lblMessage.Text = "Failed to Update Category."; } protected void cmdSCSubmit_Click(object sender, EventArgs e) { string status = "false"; if (optSCTrue.Checked == true) status = "true"; ob = new admin_functions(); bool success = ob.update_sub_cat(c_id, sc_id, txtSubCat.Text, status); if (success == true) { ds=ob.ddl_sub_cat_fill(c_id); ddlSubCat.DataTextField = "sc_name"; ddlSubCat.DataSource = ds; ddlSubCat.DataBind(); ddlSubCat.Items.Insert(0, "Select a SubCategory"); sub_cat_invisible(); lblMessage.Text = "Category Updated Successfully."; MultiView1.ActiveViewIndex = -1; } else lblMessage.Text = "Failed to Update Category."; } protected void cmdSubmit_Click(object sender, EventArgs e) { string status = "false"; if (optTrue.Checked == true) status = "true"; ob = new admin_functions(); bool success = ob.update_prod(c_id, sc_id, p_id, txtPname.Text, image_url,Bimage_url, txtPrice.Text, txtFeatures.Text, status); if (success == true) { ds = ob.ddl_product_fill(c_id, sc_id); ddlProducts.DataTextField = "p_name"; ddlProducts.DataSource = ds; ddlProducts.DataBind(); ddlProducts.Items.Insert(0, "Select a Product");

46

products_invisible(); lblMessage.Text = "Product Updated Successfully"; MultiView1.ActiveViewIndex = -1; } else lblMessage.Text = "Failed to Update Product!"; } protected void cmdUpload_Click(object sender, EventArgs e) { if (fupImage.HasFile) { if (fupImage.PostedFile.ContentType == "image/pjpeg" || fupImage.PostedFile.ContentType == "image/jpeg" || fupImage.PostedFile.ContentType == "image/gif" || fupImage.PostedFile.ContentType == "image/x-png" || fupImage.PostedFile.ContentType == "image/bmp") { string str = fupImage.PostedFile.FileName.ToString(); filename = Path.GetFileName(str); string path = Server.MapPath("~/images/"); fupImage.PostedFile.SaveAs(path + filename); image_url = "~/images/" + filename; imgImage.ImageUrl = image_url; lblImageError.Text = ""; fupImage.Enabled = false; cmdUpload.Enabled = false; rfvImage.Enabled = false; } else lblImageError.Text = "Incorrect File Type"; } else lblImageError.Text = "File Not Selected"; } protected void cmdBUpload_Click(object sender, EventArgs e) { if (fupBImage.HasFile) { if (fupBImage.PostedFile.ContentType == "image/pjpeg" || fupBImage.PostedFile.ContentType == "image/jpeg" || fupBImage.PostedFile.ContentType == "image/gif" || fupBImage.PostedFile.ContentType == "image/x-png" || fupBImage.PostedFile.ContentType == "image/bmp") { string str = fupBImage.PostedFile.FileName.ToString(); Bfilename = Path.GetFileName(str); string path = Server.MapPath("~/images/"); fupBImage.PostedFile.SaveAs(path + Bfilename);

imgBImage.ImageUrl = "~/images/" + Bfilename; lblBImageError.Text = ""; fupBImage.Enabled = false; cmdBUpload.Enabled = false; rfvBImage.Enabled = false; } else

47

lblBImageError.Text = "Incorrect File Type"; } else lblBImageError.Text = "File Not Selected"; } protected void lbtnCEdit_Click(object sender, EventArgs e) { sub_cat_invisible(); MultiView1.ActiveViewIndex = 0; ob = new admin_functions(); ds = ob.cat_fill(c_id); if (ds != null) { txtCat.Text = ds.Tables[0].Rows[0]["c_name"].ToString(); if (ds.Tables[0].Rows[0]["status"].ToString() == "true") optCTrue.Checked = true; else optCFalse.Checked = true; } else lblMessage.Text = "Failed to edit Category!"; } protected void lbtnSCEdit_Click(object sender, EventArgs e) { products_invisible(); MultiView1.ActiveViewIndex = 1; ob = new admin_functions(); ds = ob.sub_cat_fill(c_id,sc_id); if (ds != null) { txtSubCat.Text = ds.Tables[0].Rows[0]["sc_name"].ToString(); if (ds.Tables[0].Rows[0]["status"].ToString() == "true") optSCTrue.Checked = true; else optSCFalse.Checked = true; } else lblMessage.Text = "Failed to edit Sub-Category!"; } protected void lbtnPEdit_Click(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 2; rfvImage.Enabled = false; rfvBImage.Enabled = false; ob = new admin_functions(); ds = ob.prod_fill(c_id, sc_id, p_id); if (ds != null) { txtPname.Text = ds.Tables[0].Rows[0]["p_name"].ToString(); txtPrice.Text = ds.Tables[0].Rows[0]["price"].ToString(); txtFeatures.Text = ds.Tables[0].Rows[0]["features"].ToString(); image_url = ds.Tables[0].Rows[0]["image_url"].ToString(); imgImage.ImageUrl = image_url; Bimage_url = ds.Tables[0].Rows[0]["Bimage_url"].ToString();

48

imgBImage.ImageUrl = Bimage_url; if (ds.Tables[0].Rows[0]["status"].ToString() == "true") optTrue.Checked = true; else optFalse.Checked = true; lblMessage.Text = ""; } else lblMessage.Text = "Failed to edit Product!"; } protected void lbtnCDel_Click(object sender, EventArgs e) { ob = new admin_functions(); bool success = ob.del_cat(c_id); if (success) { ddlCategories.Items.RemoveAt(ddlCategories.SelectedIndex); cat_invisible(); MultiView1.ActiveViewIndex = -1; lblMessage.Text = "Product Deleted Successfully"; } else { lblMessage.Text = "Failed to Delete Category!<br><font size=2pt><u>Note</u> : <i>You can delete a Category only if all it's Sub-Categories are deleted."; } } protected void lbtnSCDel_Click(object sender, EventArgs e) { ob = new admin_functions(); bool success = ob.del_sub_cat(c_id, sc_id); if (success) { ddlSubCat.Items.RemoveAt(ddlSubCat.SelectedIndex); sub_cat_invisible(); MultiView1.ActiveViewIndex = -1; lblMessage.Text = "Product Deleted Successfully"; } else { lblMessage.Text = "Failed to Delete Sub-Category!<font size=2pt><br><u>Note</u> : <i>You can delete a SubCategory only if all it's Products are deleted."; } } protected void lbtnPDel_Click(object sender, EventArgs e) { ob = new admin_functions(); bool success = ob.del_prod(c_id, sc_id, p_id); if (success) { ddlProducts.Items.RemoveAt(ddlProducts.SelectedIndex); products_invisible(); MultiView1.ActiveViewIndex = -1; lblMessage.Text = "Product Deleted Successfully"; } else

49

lblMessage.Text = "Failed to Delete Product!"; } protected void cmdCClear_Click(object sender, EventArgs e) { txtCat.Text = ""; optCFalse.Checked = false; optCTrue.Checked = false; } protected void cmdSCClear_Click(object sender, EventArgs e) { txtSubCat.Text = ""; optSCFalse.Checked = false; optSCTrue.Checked = false; } protected void cmdClear_Click(object sender, EventArgs e) { txtPname.Text = ""; txtPrice.Text = ""; txtFeatures.Text = ""; optFalse.Checked = true; imgImage.ImageUrl = ""; fupImage.Enabled = true; cmdUpload.Enabled = true; lblImageError.Text = ""; lblMessage.Text = ""; rfvImage.Enabled = true; imgBImage.ImageUrl = ""; fupBImage.Enabled = true; cmdBUpload.Enabled = true; rfvBImage.Enabled = true; lblBImageError.Text = ""; } void cat_invisible() { ddlSubCat.Enabled = false; ddlProducts.Enabled = false; lbtnCEdit.Visible = false; lbtnCDel.Visible = false; lbtnSCEdit.Visible = false; lbtnSCDel.Visible = false; lbtnPEdit.Visible = false; lbtnPDel.Visible = false; lblMessage.Text = ""; } void sub_cat_invisible() { ddlSubCat.SelectedIndex = 0; ddlProducts.Enabled = false; lbtnSCEdit.Visible = false; lbtnSCDel.Visible = false;

50

lbtnPEdit.Visible = false; lbtnPDel.Visible = false; lblMessage.Text = ""; } void products_invisible() { ddlProducts.SelectedIndex = 0; lbtnPEdit.Visible = false; lbtnPDel.Visible = false; lblMessage.Text = ""; } }

51

About us page
<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="aboutus.aspx.cs" Inherits="aboutus" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height: 650px; width: 785px;"> <tr valign="top"> <td bgcolor="#3c77c0" style="padding: 5px; font-size: large; font-weight: bold; height: 31px;">About Us</td> </tr> <tr valign="top"> <td class="text11" style="padding: 8px;"> <p><strong>Company </strong></p> <p>PresentBazaar.com aims to be one of the largest Internet retailers of branded computer technology and digital lifestyle products with more than 5000 products from top international and domestic brands.</p> <p>Our business philosophy is simple: offer consumers and businesses what they want, when they want it.</p> <p><strong>Products </strong></p> <p>We offer our customers over 5000 quality products, and our list of product categories and product offerings is growing every day.PresentBazaar customers know they&rsquo;re getting the best prices and exclusive offers on a huge range of computer technology products like desktops, notebooks, printers, mobile phones, networking, digital cameras, software, storage and more. Plus, we offer other interesting products such as LCD TVs, MP3 players, gaming and home electronics.</p> <p>Our direct association with all the major brands means our customers will always find special deals on great products from the biggest names in the industry. And to help our customers choose the right products, we make it easy to find availability, pricing, reviews and ratings.</p> <p><strong>Service </strong></p> <p>At PresentBazaar.com, our focus has always been on helping customers save time and money. This is why we&rsquo;ve invested in building a website that allows them to securely manage their accounts without intervention. It&rsquo;s the empowering, 24/7 self service approach that ensures we keep our customers satisfied, and our prices competitive.</p> </td> </tr> </table>

</asp:Content>

52

Checkout page
<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="check_out.aspx.cs" Inherits="check_out" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="width: 785px; height:650px;"> <tr> <td align="center" style="height:22px; font-weight:bold; text-decoration:underline; color:#5CAC0D; font-size:25px;"> Confirm Order </td> </tr> <tr style="height:15px;"> <td align="left"><img src="web_images/gray-line.gif" alt="" width="780" height="4" /></td> </tr><br /><br /> <tr valign="top"> <td style="height:220px; font-size: large; border-style: outset; font-family: 'Times New Roman', Times, serif;"> Please send your payment in the form of Demand Draft, in favour of &quot;Present Bazaar Inc.&quot; payable at &quot;Samalkha&quot;, to the following address:<br /> <br /> Present Bazaar Inc.<br /> Samalkha, District Panipat<br /> Haryana, INDIA<br /> Pin Code : 132101<br /> <br /> Your order will reach you within 15 days of realization of payment.</td> </tr> <tr> <td align="center" style="height:22px; font-weight:bold; text-decoration:underline; color:#0033CC; font-size:25px;"> Enter Demand Draft Details : </td> </tr> <tr align="center" valign="top"> <td style="height: 130px"> <table class="shadow"> <tr> <td class="tablecells"> <asp:Label ID="Label1" runat="server" Text="Bank Name :" Font-Names="Verdana"></asp:Label> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtBankName" ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator> <br /> </td> <td class="tablecells"> <asp:TextBox ID="txtBankName" runat="server" Width="183px" FontNames="Verdana"></asp:TextBox> </td>

53

</tr> <tr> <td class="tablecells" style="height: 37px"> <asp:Label ID="Label2" runat="server" Text="Demand Draft No." Font-Names="Verdana"></asp:Label> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtDDNo" ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator> <br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtDDNo" Display="Dynamic" ErrorMessage="Should be 6 digits" ValidationExpression="\d\d\d\d\d\d"></asp:RegularExpressionValidator> </td> <td class="tablecells" style="height: 37px"> <asp:TextBox ID="txtDDNo" runat="server" Width="183px" FontNames="Verdana"></asp:TextBox> </td> </tr> <tr> <td class="tablecells"> <asp:Label ID="Label3" runat="server" Text="DD Date (dd/mm/yyyy) :" Font-Names="Verdana"></asp:Label> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtDDDate" ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator> <br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtDDDate" Display="Dynamic" EnableTheming="True" ErrorMessage="Invalid Date" ValidationExpression="\d\d/\d\d/\d\d\d\d" ValidationGroup="er"></asp:RegularExpressionValidator> <br /> </td> <td class="tablecells"> <asp:TextBox ID="txtDDDate" runat="server" Width="183px" FontNames="Verdana"></asp:TextBox> </td> </tr>

</table> </td> </tr> <tr valign="top" > <td align="center"><br /> <asp:ImageButton ID="imgConfirm_Order" runat="server" ImageUrl="~/web_images/confirm_order.gif" onclick="imgConfirm_Order_Click" ValidationGroup="a" /> </td> </tr> </table>

54

Contact us page

<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="contactus.aspx.cs" Inherits="contactus" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height: 650px; width: 785px;" > <tr valign="top"> <td style="color: #000000; font-size: medium; font-weight: bold; background-color: #808080; height: 20px;"> Contact Us </td> </tr> <tr valign="top"> <td> <pre style="font-size: small"> Providing you with the best customer service and an amazing online shopping experience has always been our goal. You can Contact Us for complaints, feedback or queries via telephone, email or postal mail. <u><b>Contact by phone:</b></u> Call at +91-9466423350 to reach our Customer Care team, manned by dedicated personnel, who are empowered to take decisions and resolve your problems. If you are calling from outside Mumbai, call us and ask us to call you back.

<u><b>Contact by email:</b></u> Send your emails at vkgupta1111@gmail.com. We will respond within 2 working days. Do mention your Order Number in the subject line of your email, if you are contacting us about an order you have placed. This helps us respond to your query faster. Not receiving our replies? <u><b>If you are not receiving any replies to your emails:</b></u> * It's possible our email replies are being blocked by your email program or by your internet service provider (ISP). Many email programs provide protection against spam or bulk mails, but sometimes even legitimate commercial emails, like an email from our customer support department or automatic order statusr /> notification emails, can get blocked by mistake. * Check your 'Spam' or 'Bulk' folders for mails from us or contact your network administrator or internet service provider for advice. * If you are still not receiving our emails, do call us. * Please mention your contact numbers in your email so that we could also call you up. <u><b>Contact by postal mail:</b></u> Present Bazaar Inc. Samalkha, District Panipat Haryana, INDIA Pin Code : 132101 </pre> </td>

55

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

56

Forgot password page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="forgot_pwd.aspx.cs" Inherits="forgot_pwd" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="width: 785px; height:650px;"> <tr> <td colspan="3" align="center"

style="height:20px; font-weight:bold; text-decoration:underline; color:Gray; font-size:25px;"> Forgot your Password? </td> </tr> <tr> <td align="left" style="height: 15px"><img src="web_images/gray-line.gif" alt="" width="780" height="4" /></td> </tr> <tr> <td style="color: red; font-size: large; height: 5px; padding-left: 200px;" valign="top"> <asp:Label ID="lblMessage" runat="server" Visible="False"></asp:Label> </td> </tr> <tr valign="top"> <td style="width:367px; padding-left:200px; height:200px;"> <table class="shadow"> <tr> <td class="tablecells"> <asp:Label ID="Label1" runat="server" Text="Enter your E-mail ID: " Font-Names="Verdana"></asp:Label> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmailID" ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator> <br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmailID" ErrorMessage="Invalid Email-ID" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="a"></asp:RegularExpressionValidator> </td> <td class="tablecells"> <asp:TextBox ID="txtEmailID" runat="server" Width="183px" Font-Names="Verdana" ValidationGroup="aa"></asp:TextBox> </td> </tr> <tr> <td colspan="2" align="center"> <asp:ImageButton ID="imgSubmit" runat="server" ImageUrl="web_images/submit_brown.png" ValidationGroup="a" onclick="imgSubmit_Click" Height="27px" Width="88px" /> </td>

57

</tr> </table><br /><br /> <asp:MultiView ID="MultiView1" runat="server"> <asp:View ID="View1" runat="server"> <table class="shadow"> <tr> <td class="tablecells"> <asp:Label ID="Label4" runat="server" Text="Security Question : " Font-Names="Verdana"></asp:Label> </td> <td class="tablecells"> <asp:Label ID="lblSQ" runat="server" Font-Names="Verdana"></asp:Label> </td> </tr> <tr> <td class="tablecells"> <asp:Label ID="Label5" runat="server" Text="Enter Security Answer : " Font-Names="Verdana"></asp:Label> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtSA" ErrorMessage="*" ValidationGroup="b"></asp:RequiredFieldValidator> </td> <td class="tablecells"> <asp:TextBox ID="txtSA" runat="server" Width="183px" Font-Names="Verdana" TextMode="Password" ValidationGroup="nu"></asp:TextBox> </td> </tr> <tr> <td colspan="2" align="center"> <asp:ImageButton ID="imgProceed" runat="server" ImageUrl="web_images/proceed.gif" ValidationGroup="b" onclick="imgProceed_Click" Height="22px" Width="90px" /> </td> </tr> </table> </asp:View> <asp:View ID="View2" runat="server"> <table class="shadow"> <tr> <td class="tablecells"> <asp:Label ID="Label2" runat="server" Text="Enter new Password: " Font-Names="Verdana"></asp:Label> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtNewPwd" ErrorMessage="*" ValidationGroup="c"></asp:RequiredFieldValidator> <br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtNewPwd" ErrorMessage="should be 6 digits" ValidationExpression="(\d{6})(\d)*" ValidationGroup="c"></asp:RegularExpressionValidator> </td> <td class="tablecells"> <asp:TextBox ID="txtNewPwd" runat="server" Width="183px" Font-Names="Verdana"

58

TextMode="Password"></asp:TextBox> </td> </tr> <tr> <td class="tablecells"> <asp:Label ID="Label3" runat="server" Text="Confirm new Password: " Font-Names="Verdana"></asp:Label> <br /> <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtNewPwd" ControlToValidate="txtCNewPwd" ErrorMessage="Both fields should be same" ValidationGroup="c"></asp:CompareValidator> </td> <td class="tablecells"> <asp:TextBox ID="txtCNewPwd" runat="server" Width="183px" Font-Names="Verdana" TextMode="Password"></asp:TextBox> </td> </tr> <tr> <td colspan="2" align="center"> <asp:ImageButton ID="imgUpdate" runat="server" ImageUrl="web_images/update.gif" ValidationGroup="c" onclick="imgUpdate_Click" Height="22px" Width="90px" style="margin-bottom: 0px" /> </td> </tr> </table> </asp:View> </asp:MultiView> </td>

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

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

59

public partial class forgot_pwd : System.Web.UI.Page { eshop_functions eshopf = new eshop_functions(); static DataSet ds; protected void Page_Load(object sender, EventArgs e) { MultiView1.ActiveViewIndex = -1; txtEmailID.Focus(); } protected void imgSubmit_Click(object sender, ImageClickEventArgs e) { ds = eshopf.forgot_password(txtEmailID.Text); if (ds.Tables[0].Rows.Count > 0) { MultiView1.ActiveViewIndex = 0; lblSQ.Text = ds.Tables[0].Rows[0]["sq"].ToString(); txtSA.Focus(); lblMessage.Visible = false; } else { lblMessage.Text = "Email-ID doesn't exist. Please Try again!"; lblMessage.Visible = true; txtEmailID.Focus(); } } protected void imgProceed_Click(object sender, ImageClickEventArgs e) { if (ds.Tables[0].Rows[0]["sa"].ToString() == txtSA.Text) { MultiView1.ActiveViewIndex = 1; txtNewPwd.Focus(); lblMessage.Visible = false; } else { lblMessage.Text = "Wrong Security Answer. Please try again!"; lblMessage.Visible = true; txtSA.Focus(); MultiView1.ActiveViewIndex = 0; } } protected void imgUpdate_Click(object sender, ImageClickEventArgs e) { if (eshopf.change_password(ds.Tables[0].Rows[0]["uid"].ToString(), txtNewPwd.Text)) { lblMessage.Text = "Password changes Successfully."; lblMessage.Visible = true; } else { lblMessage.Text = "Unable to change password. Please try after some time."; lblMessage.Visible = true; txtNewPwd.Focus(); MultiView1.ActiveViewIndex = 1; }

60

Free delivery page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="free_delivery.aspx.cs" Inherits="free_delivery" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height: 650px; width: 785px;"> <tr valign="top"> <td style="height: 79px"> <div id="body-container-details" style="background-color: #808080; height: 37px;"> <h2>Free Home Delivery</h2> </td> </tr> <tr valign="top"> <td style="font-size: medium"> <a name="FreeShipping" id="FreeShipping"></a> <ul> <li>We offer <strong>FREE Home Delivery on all products.</strong></li> <li>It is our endeavour to deliver all items in your Order together; however this may not always be possible due to product characteristics, or availability.</li> <li>Each order will be shipped only to a single shipping address.</li> </ul> <p><strong>Please e-mail us at vkgupta1111@gmail.com, if you have any questions.</strong></p> </div> </td> </tr>

</table> </asp:Content>

61

My account page
<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="my_acc.aspx.cs" Inherits="my_acc" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="width: 785px; height:650px;"> <tr> <td align="center" style="height:22px; font-weight:bold; text-decoration:underline; color:#5EAD00; font-size:25px; fontfamily: 'Times New Roman', Times, serif;"> My Account </td> </tr> <tr style="height:15px;"> <td align="left"><img src="web_images/gray-line.gif" alt="" width="780" height="4" /><br /><br /></td> </tr> <tr valign="top"> <td style="width:367px; padding-left:25px;"> <table class="shadow" rules="rows" width="700"> <tr class="tablecells" style="background-color: #808080; font-size: large; color: #FFFFFF; font-weight: bold; font-style: normal;"> <td style="height: 23px"> Order History </td> </tr> <tr class="tablecells" style="font-size: large"> <td style="height: 37px"> <asp:LinkButton ID="lbtnOrder_History" runat="server" onclick="lbtnOrder_History_Click">View Order History</asp:LinkButton> </td> </tr> </table> <br /> <br /> <table class="shadow" rules="rows" width="700"> <tr class="tablecells" style="background-color: #808080; font-size: large; color: #FFFFFF; font-weight: bold; font-style: normal;"> <td style="height: 23px"> Change Password </td> </tr> <tr class="tablecells" style="font-size: large"> <td style="height: 37px"> <asp:LinkButton ID="lbtnChange_Password" runat="server" onclick="lbtnChange_Password_Click">Change Password</asp:LinkButton> </td> </tr> </table> <br /> <br /> <table class="shadow" rules="rows" width="700">

62

<tr class="tablecells" style="background-color: #808080; font-size: large; color: #FFFFFF; font-weight: bold; font-style: normal;"> <td style="height: 23px"> Edit Profile </td> </tr> <tr class="tablecells" style="font-size: large"> <td style="height: 37px"> <asp:LinkButton ID="lbtnEdit_Profile" runat="server" onclick="lbtnEdit_Profile_Click">Edit Profile</asp:LinkButton> </td> </tr> </table> </td> </tr> </table> </asp:Content>

63

Order complete page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="order_complete.aspx.cs" Inherits="order_complete" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height: 650px; width: 785px;"> <tr> <td align="center" style="height: 46px; font-size: x-large; font-weight: bold; color: #5EAD00;"> Order Complete Successfully!<hr /> </td> </tr> <tr valign="top" style="font-family: 'Times New Roman', Times, serif; font-size: large"> <td> <br /> <br /> Your order will reach you within 15 days of realization of payment.<br /><br /> If you have any problems regarding the products delivery then please contact us as given details in the Contact Us Section. <br /> <br /> <br /> <br /> Click the &quot;Shop More&quot; button to continue shopping,&nbsp; <asp:ImageButton ID="imgShopMore1" runat="server" Height="22px" ImageUrl="~/web_images/shop_more.gif" Width="106px" PostBackUrl="~/Home.aspx" /> </td> </tr> </table> </asp:Content>

64

Order details
<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="order_details.aspx.cs" Inherits="order_details" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height:820px; width: 785px;"> <tr> <td height="37" align="center"><hr /> <asp:Image ID="imgMessage" runat="server" Height="28px" ImageUrl="~/web_images/cart.jpg" /> &nbsp;<asp:Label ID="lblOD" runat="server" Font-Size="X-Large" ForeColor="#5EAD00" Font-Bold="True" Font-Underline="False" Font-Names="Times New Roman">Order Details</asp:Label> <hr /></td> </tr> <tr> <td height="750"> <div style="height:750px;"><center> <asp:Panel ID="Panel4" runat="server" Height="93px" HorizontalAlign="Justify" Width="785px" Font-Size="Small" style="font-size: small; color: #175FB5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label6" runat="server" Font-Bold="True" Font-Size="Medium" style="font-family: 'Times New Roman', Times, serif; font-size: large; color: #3A6DCB" Text="Order ID : "></asp:Label> <asp:Label ID="lblOrder_id" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="#5EAD00" style="font-family: 'Times New Roman', Times, serif; font-size: x-large"></asp:Label> <br /> <br /> Demand Draft Bank Name : <asp:Label ID="lblDD_Bank_Name" runat="server" ForeColor="#5EAD00"></asp:Label> <br /> Demand Draft Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <asp:Label ID="lblDD_No" runat="server" ForeColor="#5EAD00"></asp:Label> <br /> Demand Draft Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <asp:Label ID="lblDD_Date" runat="server" ForeColor="#4D8A00"></asp:Label> </asp:Panel> <asp:Panel ID="Panel1" runat="server" Font-Size="Large" Height="36px" HorizontalAlign="Right" Width="785px"> <asp:Label ID="lblta1" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">Total Amount : </asp:Label> <asp:Image ID="Image3" runat="server" ImageAlign="AbsMiddle" AlternateText="INR" ImageUrl="~/web_images/Indian-Currency-Symbol.png" /> <asp:Label ID="lbltotal1" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="X-Large" ForeColor="Red"></asp:Label> </asp:Panel> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="16px" Font-Size="11pt" Font-Underline="False" Font-Bold="False" CaptionAlign="Top" HorizontalAlign="Center" DataKeyNames="p_id" PageSize="5" CellPadding="4" Width="785px" ForeColor="#333333" GridLines="None"> <PagerSettings Mode="NumericFirstLast" />

65

<RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" /> <Columns> <asp:TemplateField HeaderText="Product Image"> <ItemTemplate> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("image_url") %>' Height="80px" Width="80px" PostBackUrl='<%#"product_details.aspx?p_id="+Eval("p_id")%>' AlternateText="Product" ImageAlign="AbsMiddle"> </asp:ImageButton> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="p_id" HeaderText="Product ID" /> <asp:BoundField DataField="p_name" HeaderText="Product Name" /> <asp:TemplateField> <HeaderTemplate> <asp:Label ID="Label2" runat="server" Text="Unit Price"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl="web_images/Indian-Currency-Symbol.png" Height="15"/> <asp:Label ID="Label1" runat="server" Text='<%# Bind("price") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="qty" HeaderText="Quantity" /> <asp:TemplateField> <HeaderTemplate> <asp:Label ID="Label3" runat="server" Text="Total Price"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Image ID="Image2" runat="server" ImageUrl="web_images/Indian-Currency-Symbol.png" Height="15" /> <asp:Label ID="Label2" runat="server" Text='<%# Bind("tprice") %>'></asp:Label> </ItemTemplate> <ControlStyle ForeColor="#569D00" /> </asp:TemplateField> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle Font-Size="9pt" BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView></center><br /> <asp:Panel ID="Panel2" runat="server" Height="106px" Width="785px" HorizontalAlign="Right"> <table cellspacing="5" style="height: 55px; margin-left: 515px;"> <tr> <td style="width:100px" align="left"><asp:Label ID="lblta3" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">SubTotal : </asp:Label> </td> <td style="width:150px;" align="right"> <asp:Image ID="Image4" runat="server" ImageAlign="AbsMiddle" AlternateText="INR" ImageUrl="~/web_images/Indian-Currency-Symbol.png" /> <asp:Label ID="lbltprice" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Large"></asp:Label> </td>

66

</tr> <tr> <td style="width:100px" align="left" width="785"> <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">Shipping : </asp:Label> </td> <td style="width:150px;" align="right"> <asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red" Text="Free"></asp:Label> </td> </tr> <tr> <td colspan="2"><hr /></td> </tr> <tr> <td style="width:100px" align="left"> <asp:Label ID="lblta2" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">Total Amount : </asp:Label> </td> <td style="width:150px;" align="right"> <asp:Image ID="Image5" runat="server" ImageAlign="AbsMiddle" AlternateText="INR" ImageUrl="~/web_images/Indian-Currency-Symbol.png" /> <asp:Label ID="lbltotal" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label> </td> </tr> </table> </asp:Panel> <br /> <asp:Panel ID="Panel3" runat="server" Height="24px" HorizontalAlign="Left" Width="785px">&nbsp; <asp:ImageButton ID="imgShopMore" runat="server" Height="22px" ImageUrl="~/web_images/back.gif" Width="106px" PostBackUrl="~/order_history.aspx" /> </asp:Panel> </div> </td> </tr> </table> </asp:Content>

67

Order history page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="order_history.aspx.cs" Inherits="order_history" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height:820px; width: 785px;"> <tr> <td height="37" align="center"><hr /> <asp:Image ID="imgMessage" runat="server" Height="28px" ImageAlign="Bottom" ImageUrl="~/web_images/cart.jpg" /> &nbsp;<asp:Label ID="lblOH" runat="server" Font-Size="X-Large" ForeColor="#5EAD00" Font-Bold="True" Font-Underline="False" Font-Names="Times New Roman">Order History</asp:Label> <hr /></td> </tr> <tr valign="top"> <td height="750"> <div style="height:750px;"><center> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="16px" Font-Size="11pt" Font-Underline="False" Font-Bold="False" CaptionAlign="Top" HorizontalAlign="Center" DataKeyNames="order_id" PageSize="5" CellPadding="4" Width="785px" ForeColor="#333333" GridLines="None"> <PagerSettings Mode="NumericFirstLast" /> <RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" /> <Columns> <asp:HyperLinkField DataNavigateUrlFields="order_id" DataNavigateUrlFormatString="order_details.aspx?order_id={0}" DataTextField="order_id" HeaderText="Order ID" /> <asp:BoundField DataField="order_date" HeaderText="Order Date" /> <asp:BoundField DataField="order_status" HeaderText="Order Status" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle Font-Size="9pt" BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView><br /> <asp:Label ID="lblMessage" runat="server" Font-Size="X-Large" ForeColor="Red" Font-Bold="False" Font-Underline="False" Font-Names="Times New Roman"></asp:Label> </center></div> <div style="font-size: medium"> Note: In case of any query regarding the status, please contact us as given details in the Contact Us Section </div> </td> </tr> </table>

68

Products page
<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="products.aspx.cs" Inherits="products" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table> <tr> <td height="33"> <div class="center_title_bar">You are Here : <asp:Label ID="lblSite" runat="server" ForeColor="#3333FF"></asp:Label></div> <div style="float:right; margin-top:10px;"> <asp:Panel ID="Panel2" runat="server"> <asp:LinkButton ID="lbtnPreviousT" runat="server" onclick="lbtnPrevious_Click" Font-Size="Medium">&lt;&lt;&nbsp;Previous</asp:LinkButton>&nbsp;&nbsp; <asp:Label ID="lblCPageT" runat="server" Font-Size="Small"></asp:Label>&nbsp;&nbsp; <asp:LinkButton ID="lbtnNextT" runat="server" onclick="lbtnNext_Click" Font-Size="Medium">Next&nbsp;&gt;&gt;</asp:LinkButton> </asp:Panel> </div> </td> </tr> <tr> <td height="617"> <div> <asp:Table ID="Table1" runat="server" Height="617px" Width="785px" border="1"> </asp:Table> </div> </td> </tr> <tr align="center"> <td> <asp:Panel ID="Panel1" runat="server"> <asp:LinkButton ID="lbtnPrevious" runat="server" onclick="lbtnPrevious_Click" Font-Size="Medium">&lt;&lt;&nbsp;Previous</asp:LinkButton>&nbsp;&nbsp; <asp:Label ID="lblCPage" runat="server" Font-Size="Small"></asp:Label>&nbsp;&nbsp; <asp:LinkButton ID="lbtnNext" runat="server" onclick="lbtnNext_Click" Font-Size="Medium">Next&nbsp;&gt;&gt;</asp:LinkButton> </asp:Panel> </td> </tr> </table> </asp:Content> <asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder2">

</asp:Content>

69

Search result page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="Search_Results.aspx.cs" Inherits="Search_Results" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script type="text/javascript" language="javascript"> function Svalidate() { if(document.getElementById("<%=txtS.ClientID%>").value == "") { alert("Please enter some text to search."); document.getElementById("<%=txtS.ClientID%>").focus(); return false; } } </script> <table> <tr> <td height="33"> <div class="center_title_bar">Search Results</div> <div style="float:right; margin-top:10px;"> <asp:Panel ID="Panel2" runat="server"> <asp:LinkButton ID="lbtnPreviousT" runat="server" onclick="lbtnPrevious_Click" Font-Size="Medium">&lt;&lt;&nbsp;Previous</asp:LinkButton>&nbsp;&nbsp; <asp:Label ID="lblCPageT" runat="server" Font-Size="Small"></asp:Label>&nbsp;&nbsp; <asp:LinkButton ID="lbtnNextT" runat="server" onclick="lbtnNext_Click" Font-Size="Medium">Next&nbsp;&gt;&gt;</asp:LinkButton> </asp:Panel> </div> </td> </tr> <tr> <td style="font-size: 12px"> &nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Small" Text="Search : "></asp:Label> &nbsp;<asp:DropDownList ID="ddlSCategories" runat="server" Height="22px" Width="160px" Font-Size="Medium" Font-Names="Times New Roman"> </asp:DropDownList> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="txtS" runat="server" Width="389px" AutoPostBack="True" ValidationGroup="aa" ontextchanged="txtS_TextChanged" AutoCompleteType="Search" Height="21px" Font-Names="Times New Roman"></asp:TextBox> &nbsp;&nbsp; <asp:Button ID="cmdS" runat="server" onclick="cmdS_Click" OnClientClick='return Svalidate()' Text="Search" ValidationGroup="aa" Height="26px" /> <br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Search Results for : <asp:Label ID="lblSearch" runat="server" EnableTheming="True" Font-Bold="True" Font-Names="Times New Roman" Font-Overline="False" Font-Size="X-Large" ForeColor="Blue"></asp:Label> </td>

70

</tr> <tr> <td height="617"> <div> <asp:Table ID="Table1" runat="server" Height="617px" Width="785px" border="1"> </asp:Table> </div> </td> </tr> <tr align="center"> <td> <asp:Panel ID="Panel1" runat="server"> <asp:LinkButton ID="lbtnPrevious" runat="server" onclick="lbtnPrevious_Click" Font-Size="Medium">&lt;&lt;&nbsp;Previous</asp:LinkButton>&nbsp;&nbsp; <asp:Label ID="lblCPage" runat="server" Font-Size="Small"></asp:Label>&nbsp;&nbsp; <asp:LinkButton ID="lbtnNext" runat="server" onclick="lbtnNext_Click" Font-Size="Medium">Next&nbsp;&gt;&gt;</asp:LinkButton> </asp:Panel> </td> </tr> </table>

</asp:Content>

71

Sign in page
<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="signin.aspx.cs" Inherits="signin" Title="Untitled Page" %> <asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1"> <script type="text/javascript" language="javascript"> function validate_login() { var EmailID = document.getElementById("<%= txtEmailID.ClientID %>"); var Pwd = document.getElementById("<%= txtPwd.ClientID %>"); return check_data(EmailID,Pwd); } function validate_new_acc() { var EmailID = document.getElementById("<%= txtNUEmailID.ClientID %>"); var Pwd = document.getElementById("<%= txtNUPwd.ClientID %>"); var CPwd = document.getElementById("<%= txtNUCPwd.ClientID %>"); if(check_data(EmailID,Pwd) == false) return false; if(Pwd.value!=CPwd.value) { alert("The passwords you have entered do not match. Please try again."); CPwd.focus(); return false; } return true; } function check_data(EmailID,Pwd) { if(EmailID.value=='') { alert("Please enter email"); EmailID.focus(); return false; } if(EmailID.value!='' && isValidEmail(EmailID.value)==false) { return false; } if(Pwd.value=='') { alert("Please enter password"); Pwd.focus(); return false; } if(Pwd.value.length<6) { alert("Password must be at least six digit long."); Pwd.focus(); return false;

72

} return true; } function isValidEmail(emailid) { var l=emailid.length; if(l==0) { return false; } if(l!=0) { var a=emailid.indexOf('@'); var d=emailid.lastIndexOf('.'); var str1=emailid.substr(0,a); var str2=emailid.substr(a+1,d-a-1); var str3=emailid.substr(d+1,l); var len1=str1.length; var len2=str2.length; var len3=str3.length; if(a<0 ) { alert("Check for missing '@' or '.' "); return false; } else if(d<2) { alert("Check for missing '.' "); return false; } else if (a>d) { alert ("Invalid email. Please enter correct email address"); return false; } if (len1<=1 || len2<=1 || len3 <=1) { alert ("Invalid email. Please enter correct email address"); return false; } } return true; } </script> <table style="width: 785px; height:650px;"> <tr> <td colspan="3" align="center" style="height:80px; font-weight:bold; text-decoration:underline; color:Gray; font-size:25px;"> <div>Register/Login</div> </td> </tr> <tr style="height:15px; font-weight:bold; color:#5EAD00; font-size:small;"> <td align="left"> Not a customer yet?

73

</td> <td></td> <td align="left"> Are you an existing customer? </td> </tr> <tr style="height:15px;"> <td align="left"><img src="web_images/gray-line.gif" alt="" width="100%" height="4" /></td> <td></td> <td align="left"><img src="web_images/gray-line.gif" alt="" width="100%" height="4" /></td> </tr> <tr valign="top"> <td style="width:367px; padding-left:10px; height:200px;"> <table class="shadow"> <tr> <td class="tablecells"> <asp:Label ID="Label1" runat="server" Text="E-mail ID: " Font-Names="Verdana"></asp:Label> </td> <td class="tablecells"> <asp:TextBox ID="txtNUEmailID" runat="server" Width="183px" Font-Names="Verdana" ValidationGroup="nu"></asp:TextBox> </td> </tr> <tr> <td class="tablecells"> <asp:Label ID="Label2" runat="server" Text="Password: " Font-Names="Verdana"></asp:Label> </td> <td class="tablecells"> <asp:TextBox ID="txtNUPwd" runat="server" Width="183px" Font-Names="Verdana" TextMode="Password" ValidationGroup="nu"></asp:TextBox> </td> </tr> <tr> <td class="tablecells"> <asp:Label ID="Label3" runat="server" Text="Confirm Password: " Font-Names="Verdana"></asp:Label> </td> <td class="tablecells"> <asp:TextBox ID="txtNUCPwd" runat="server" Width="183px" Font-Names="Verdana" TextMode="Password" ValidationGroup="nu"></asp:TextBox> </td> </tr> <tr> <td colspan="2" align="center"> <asp:ImageButton ID="imgCreateAcc" runat="server" OnClientClick='return validate_new_acc()' ImageUrl="web_images/create_account_now.gif" ValidationGroup="nu" onclick="imgCreateAcc_Click" /> </td>

74

</tr> </table> </td> <td style="width:40px;"> </td> <td style="width:367px;"> <table class="shadow"> <tr> <td class="tablecells"> <asp:Label ID="Label4" runat="server" Text="E-mail ID: " Font-Names="Verdana"></asp:Label> </td> <td class="tablecells"> <asp:TextBox ID="txtEmailID" runat="server" Width="183px" Font-Names="Verdana" ValidationGroup="ru"></asp:TextBox> </td> </tr> <tr> <td class="tablecells"> <asp:Label ID="Label5" runat="server" Text="Password: " Font-Names="Verdana"></asp:Label> </td> <td class="tablecells"> <asp:TextBox ID="txtPwd" runat="server" Width="183px" Font-Names="Verdana" TextMode="Password" ValidationGroup="ru"></asp:TextBox> </td> </tr> <tr> <td colspan="2" align="right" style="height:25px;"> <asp:LinkButton ID="lbtnFPwd" runat="server" onclick="lbtnFPwd_Click">Forgot your password?</asp:LinkButton> </td> </tr> <tr> <td colspan="2" align="center" style="height:35px;"> <asp:ImageButton ID="imgLogin" runat="server" OnClientClick='return validate_login()' ImageUrl="~/web_images/login.gif" onclick="imgLogin_Click" ValidationGroup="ru" /> </td> </tr> </table> </td> </tr> <tr> <td colspan="3" align="center" style="color: red; font-weight: bold; font-size: large;" valign="top"> <asp:Label ID="lblMessage" runat="server" Visible="False"></asp:Label> </td> </tr> </table>

75

Create account page

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class signin : System.Web.UI.Page { eshop_functions eshopf = new eshop_functions(); string uid, msg; protected void Page_Load(object sender, EventArgs e) { txtEmailID.Focus(); if (Request.QueryString.HasKeys()) { msg = Request.QueryString.Get("msg").ToString(); } } protected void imgCreateAcc_Click(object sender, ImageClickEventArgs e) { uid = eshopf.get_uid(txtNUEmailID.Text, txtNUPwd.Text); if (uid == "0") { if (eshopf.insert_user(txtNUEmailID.Text, txtNUPwd.Text)) { uid = eshopf.get_uid(txtNUEmailID.Text, txtNUPwd.Text); if (eshopf.update_request_id(Session["request_id"].ToString(), uid) == "false") { lblMessage.Text = "Account created\nFailed to save cart! Please try after sometime."; } else { Session["uid"] = uid; Session["request_id"] = uid; Session["username"] = txtNUEmailID.Text; if (msg == "checkout") Response.Redirect("ship_info.aspx?msg=checkout"); else Response.Redirect("ship_info.aspx"); } } else

76

lblMessage.Text = "Failed to Register!</br>Please try after sometime."; } else lblMessage.Text = "E-Mail ID already exists!</br>Please try a different one."; lblMessage.Visible = true; } protected void imgLogin_Click(object sender, ImageClickEventArgs e) { uid = eshopf.get_uid(txtEmailID.Text, txtPwd.Text); if (uid == "0") lblMessage.Text = "Invalid Username or Password!"; else if (eshopf.update_request_id(Session["request_id"].ToString(), uid) == "false") { lblMessage.Text = "Failed to login! Please try after sometime."; } else { Session["uid"] = uid; Session["request_id"] = uid; string uname = eshopf.get_uname(uid); if (uname != "0") Session["username"] = uname; else Session["username"] = txtEmailID.Text; if (msg == "checkout") Response.Redirect("ship_info.aspx?msg=checkout"); else Response.Redirect("my_acc.aspx"); } lblMessage.Visible = true; } protected void lbtnFPwd_Click(object sender, EventArgs e) { Response.Redirect("forgot_pwd.aspx"); } }

77

Terms and conditions page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="terms_conditions.aspx.cs" Inherits="terms_conditions" Title="Untitled Page" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height: 650px; width: 785px;" > <tr> <td height="25" style="background-color: #C0C0C0; font-size: large; font-weight: bold;">&nbsp;&nbsp;Terms And Conditions</td> </tr> <tr> <td style="text-align: justify;" valign="top" align="left"> <p>The Terms and Conditions contained herein along form an Agreement regulating our relationship with regard to the use of &#8220;PresentBazaar.com&#8221; by you.</p> <p>Please read this Agreement carefully. You are advised to regularly check for any amendments or updates to the terms and conditions from time to time. PresentBazaar.com may add to or change or update these Terms of Use, from time to time entirely at the its own discretion. You are responsible for checking these Terms of Use periodically to remain in compliance with these terms. Your use of a Site after any amendment to the Terms of Use shall constitute your acceptance of these terms and you also agree to be bound by any such changes/revisions.</p> <p>Any clause of terms and conditions if deemed invalid, void or for any reason unenforceable, shall be deemed severable and shall not affect the validity and enforceability of the remaining clauses of the terms and conditions.</p> <p><strong>Online Purchases</strong></p> <p>This Website is only a venue where Users may meet and interact with us for their sale and purchase transactions. The commercial / contractual terms include without limitation price, shipping costs, date, period, mode of delivery, warranties related to products and services including after sales services related to products and services, etc., over which the we have complete control and the same may be subject to change.</p> <p>The agreement between you and PresentBazaar.com is subject to the following terms and conditions :-</p> <ol type="1"> <li>The User certifies that he/she is at least 18 (eighteen) years of age or has the consent of a parent or legal guardian.</li> <li>These terms and conditions supersede all previous representations, understandings, or agreements and shall prevail notwithstanding any variance with any other terms of any order submitted. By using the Shopping services of PresentBazaar.com you agree to be bound by the Terms and Conditions.</li> <li>All prices, unless indicated otherwise are in Indian Rupees</li> <li>By indicating User&#8217;s acceptance to purchase any product or service offered on the site, user is obligated to complete such transactions. Users shall prohibit from indicating its acceptance to purchase products and services where it does not intend to complete such transactions.</li> <li>Any order placed for a product that is listed at an incorrect price may be cancelled. This shall be regardless of whether

78

the order has been confirmed and/or payment levied. In the event the payment has been processed, the same shall be credited to your account and duly notified to you by email.</li> <li>In a credit card transaction, you must use your own credit card. PresentBazaar.com will not be liable for any credit card fraud. The liability to use a card fraudulently will be on the user and the onus to 'prove otherwise' shall be exclusively on the user.</li> <li>In the event that a non-delivery occurs on account of a mistake by you (i.e. wrong name or address) any extra cost towards re-delivery shall be claimed from the User placing the order.</li> <li>Shipment/delivery time of order processing starts from the day of receipt of the payment confirmed against the order placed with PresentBazaar.com. Usually all orders are processed and shipped within 7 working days, once payment is confirmed. However, certain categories of products have different lead-times for delivery due to the nature of the product. Do check the delivery timelines for each product while ordering. PresentBazaar.com shall not be liable for any delay / non-delivery of purchased goods in the event of flood, fire, wars, acts of God or any cause that is beyond the control of PresentBazaar.com.</li> <li>The User agrees to use the services provided by PresentBazaar.com, its affiliates, consultants and contracted companies, for lawful purposes only.</li> <li>The User agrees to provide authentic and true information. PresentBazaar.com reserves the right to confirm and validate the information and other details provided by the User at any point of time. If upon confirmation such User details are found not to be true (wholly or partly), PresentBazaar.com has the right in its sole discretion to reject the registration and debar the User from using the Services available at this website, and / or other affiliated websites without prior intimation whatsoever.</li> </ol> </td> </tr> </table> </asp:Content>

79

View cart page


<%@ Page Language="C#" MasterPageFile="~/eshop_master.master" AutoEventWireup="true" CodeFile="view_cart.aspx.cs" Inherits="view_cart" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="height:820px; width: 785px;"> <tr> <td height="33"> <div class="center_title_bar">Cart Details</div> </td> </tr> <tr> <td height="37" align="center"><hr /> <asp:Image ID="imgMessage" runat="server" /> &nbsp;<asp:Label ID="lblMessage" runat="server" Font-Size="X-Large" ForeColor="#5EAD00" Font-Bold="False" Font-Underline="False" Font-Names="Times New Roman"></asp:Label> <hr /></td> </tr> <tr> <td height="750"> <div style="height:750px;"><center> <asp:Panel ID="Panel4" runat="server" Height="39px" HorizontalAlign="Right" Width="785px">&nbsp;<asp:ImageButton ID="imgCheckOut1" runat="server" AlternateText="Check Out" ImageUrl="~/web_images/checkout.gif" onclick="imgCheckOut_Click" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:ImageButton ID="imgShopMore1" runat="server" Height="22px" ImageUrl="~/web_images/shop_more.gif" Width="106px" onclick="imgShopMore_Click" /> </asp:Panel> <asp:Panel ID="Panel1" runat="server" Font-Size="Large" Height="36px" HorizontalAlign="Right" Width="785px"> <asp:Label ID="lblta1" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">Total Amount : </asp:Label> <asp:Image ID="Image3" runat="server" ImageAlign="AbsMiddle" AlternateText="INR" ImageUrl="~/web_images/Indian-Currency-Symbol.png" /> <asp:Label ID="lbltprice1" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="X-Large" ForeColor="Red"></asp:Label> </asp:Panel> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="16px" Font-Size="11pt" Font-Underline="False" Font-Bold="False" CaptionAlign="Top" HorizontalAlign="Center" DataKeyNames="p_id" onrowdeleting="GridView1_RowDeleting" PageSize="5" onrowupdating="GridView1_RowUpdating" CellPadding="4" Width="785px" ForeColor="#333333" GridLines="None"> <PagerSettings Mode="NumericFirstLast" /> <RowStyle HorizontalAlign="Center" BackColor="#EFF3FB" /> <Columns> <asp:CommandField ShowDeleteButton="True" HeaderText="Delete" ButtonType="Image" DeleteImageUrl="~/web_images/btn-x.gif" DeleteText="" > <ControlStyle Height="15px" /> </asp:CommandField>

80

<asp:TemplateField HeaderText="Product Image"> <ItemTemplate> <asp:ImageButton runat="server" ImageUrl='<%# Eval("image_url") %>' Height="80px" Width="80px" PostBackUrl='<%#"product_details.aspx?p_id="+Eval("p_id")%>' AlternateText="Product" ImageAlign="AbsMiddle"> </asp:ImageButton> </ItemTemplate> </asp:TemplateField> <asp:HyperLinkField DataNavigateUrlFields="p_id" DataNavigateUrlFormatString="product_details.aspx?p_id={0}" DataTextField="p_name" HeaderText="Product Name" /> <asp:TemplateField> <HeaderTemplate> <asp:Label ID="Label2" runat="server" Text="Unit Price"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl="web_images/Indian-Currency-Symbol.png" Height="15"/> <asp:Label ID="Label1" runat="server" Text='<%# Bind("price") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Quantity"> <ItemTemplate> <asp:TextBox ID="txtQty" runat="server" Text='<%# Eval("qty") %>' Width="35" AutoPostBack="False"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="txtQty"></asp:RequiredFieldValidator> <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="(1-25)" ControlToValidate="txtQty" MaximumValue="25" MinimumValue="1" Display="Dynamic" SetFocusOnError="True" Type="Integer"></asp:RangeValidator> </ItemTemplate> </asp:TemplateField> <asp:ButtonField CommandName="Update" HeaderText="Update" Text="Update" CausesValidation="True" ShowHeader="True" ButtonType="Image" ImageUrl="~/web_images/update.gif" > <ControlStyle Height="22px" Width="70px" /> </asp:ButtonField> <asp:TemplateField> <HeaderTemplate> <asp:Label ID="Label3" runat="server" Text="Total Price"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Image ID="Image2" runat="server" ImageUrl="web_images/Indian-Currency-Symbol.png" Height="15" /> <asp:Label ID="Label2" runat="server" Text='<%# Bind("tprice") %>'></asp:Label> </ItemTemplate> <ControlStyle ForeColor="#569D00" /> </asp:TemplateField> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle Font-Size="9pt" BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#2461BF" />

81

<AlternatingRowStyle BackColor="White" /> </asp:GridView></center><br /> <asp:Panel ID="Panel2" runat="server" Height="106px" Width="785px" HorizontalAlign="Right"> <table cellspacing="5" style="height: 55px; margin-left: 515px;"> <tr> <td style="width:100px" align="left"><asp:Label ID="lblta3" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">SubTotal : </asp:Label> </td> <td style="width:150px;" align="right"> <asp:Image ID="Image4" runat="server" ImageAlign="AbsMiddle" AlternateText="INR" ImageUrl="~/web_images/Indian-Currency-Symbol.png" /> <asp:Label ID="lbltprice2" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Large"></asp:Label> </td> </tr> <tr> <td style="width:100px" align="left" width="785"> <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">Shipping : </asp:Label> </td> <td style="width:150px;" align="right"> <asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red" Text="Free"></asp:Label> </td> </tr> <tr> <td colspan="2"><hr /></td> </tr> <tr> <td style="width:100px" align="left"> <asp:Label ID="lblta2" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Medium">Total Amount : </asp:Label> </td> <td style="width:150px;" align="right"> <asp:Image ID="Image5" runat="server" ImageAlign="AbsMiddle" AlternateText="INR" ImageUrl="~/web_images/Indian-Currency-Symbol.png" /> <asp:Label ID="lbltprice3" runat="server" Font-Bold="True" Font-Names="Times New Roman" Font-Size="Large" ForeColor="Red"></asp:Label> </td> </tr> </table> </asp:Panel> <br /> <br /> <asp:Panel ID="Panel3" runat="server" Height="24px" HorizontalAlign="Right" Width="785px">&nbsp;<asp:ImageButton ID="imgCheckOut" runat="server" AlternateText="Check Out" ImageUrl="~/web_images/checkout.gif" onclick="imgCheckOut_Click" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:ImageButton ID="imgShopMore" runat="server" Height="22px" ImageUrl="~/web_images/shop_more.gif" Width="106px" onclick="imgShopMore_Click" /> </asp:Panel> </div> </td> </tr>

82

</table> </asp:Content> <asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder2">

</asp:Content>

83

8.Screen Shots

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

9.BIBLIOGRAPHY
The main books ,which were consulted for the project development, are : 1. Guide to Microsoft Visual Studio Peter Norton 2. Introduction of Microsoft SQL Server : Aptech 3. MSDN Library 4. Software Engineering Roger S. Pressman, K. K. Aggarwal 5. Mastering Visual Basic BPB Publication

100

You might also like