Sunteți pe pagina 1din 99

ONLINE GIFT SHOP

Mini project submitted in partial fulfillment of the requirements for the


award of the degree of
Master of Computer Application
of
SASTRA University
Submitted by

AROCKIA JANCY.A
Register No: 116070909
CHINDHU.S
Register No: 116070911
Under the Supervision and Guidance of
Smt.L.GOWRI

DEPARTMENT OF COMPUTER APPLICATIONS

School of Computing

SASTRA University

(A university established under section 3 of the UGC Act, 1956)

Thanjavur – 613 401

April – 2015
DEPARTMENT OF COMPUTER APPLICATION

School of computing
SASTRA University
(A university established under section 3 of the UGC Act, 1956)
Thanjavur – 613 401
April – 2015

Bonafide Certificate
Certified that this mini project report entitled as
ONLINE GIFT SHOP
Is a Bonafide record of work done by
AROKIA JANCY.A
Register No: 116070909
CHINDHU.S
Register No: 116070911
In partial fulfillment of the requirements for award of the
Degree of
Master of Computer Application
During the year 2014-2016

Internal Guide Associate Dean, CA


Submitted for project viva-voce examination held on

Internal ExaminerExternal Examiner


ACKNOWLEDGEMENT

We first of all praise the almighty for the successful completion of this project.
Our heartfelt gratitude and thanks to our parents, who have constantly encouraged,
and continuously supported our entire academic life.

We would like to express my heartfelt gratitude to the Mentor of this Esteemed


University Prof. R. Sethuraman, Vice-Chancellor, SASTRA University for his valuable
encouragement.

We express our heartfelt gratitude to Dr. G. Bhalachandran, Registrar, SASTRA


University for granting us to take up this project.

We are very grateful to Dr. P. Swaminathan, Dean, School of Computing,


SASTRA University for permitting us to undertake this project. We extend our thanks
to Dr.S.Gopalakrishnan, Professor and Associate Dean, Department of Computer
Application, SASTRA University, whose motivation and valuable advice has served us
in good stead.

With grateful gratitude,We sincerely acknowledge the adequate and appreciable


facilities and encouragement extended by Smt.L.GOWRI, Assistant Professor,
Department of Computer Applications, SASTRA University, Thanjavur, with her
valuable guidance for successfully completing this project work.
SNO CONTENT PG NO
1 Introduction
1.1 problem statement

2 Project Schedule

3 Software Requirements Specification


3.1 Functional requirements- use case description
3.2 Traceability tree
3.3 non Functional requirements
3.3.1 Performance requirements
3.3.2 Resources requirements

4 System Analysis
4.1 use case diagram
4.2 class diagram
4.3 activity diagram

5 Design
5.1 sequence diagram
5.2 database design
5.3 form design

6 Implementation
6.1 sample code

7 Testing
7.1 test plan documentation
7.1.1 unit testing
7.1.2 integration testing
7.1.3 validation testing

8 Deployment
8.1 problem faced
8.2 lessons learnt

9 Future plans

10 Bibliography / References
SYNOPSIS
The project is entitled as “ONLINE GIFT SHOP”. It is also called as electronic commerce system for users
to buy gifts using internet. The project is developed from a user point of view. It provides the user with
catalog of different types of gifts available for purchase in this website. A shopping cart is provided to the
registered user to add or remove a selected gift item. The registered user can compare prices and order the
gifts sitting at home. A guest user can only view the gifts. Offers are only viewed by registered user. When a
registered confirms an order, a bill is generated automatically by the system. The registered user can give
their feedback about the gift purchased. Using this system, the admin maintains the details the details of
stock, payment and registered user details. Admin sends offer mails to registered user on occasional days.
This website will be useful to anyone who wants to purchase gifts using internet. User can select gifts online
quickly and comfortably. It saves user time and schedule of shopping and provides security through valid
registration. The system is implemented using two tier approach, with ASP.NET as front-end and SQL
SERVER 2005 as back-end.
INTRODUCTION

1.1 PROBLEM STATEMENT


Online gift shop provides services to the user with a catalogue of different types of gifts available for
purchase through this site. The user can browse through the product categories like Birthday, New Year,
Wedding anniversary, Christmas gifts and can add these items to the shopping cart. To view more gifts, the
user should register them. After registering the customer can login to their account to purchase gifts. The user
can also search for a particular gift item based on the categories available on this site. Only the registered
users have an authority to purchase the gifts. They can compare and choose to select according to price list.
The selected items are added to the cart and these items can be edited if needed. On occasion day’s offers are
available only for registered user. The user can choose the payment method in the system and bill is
generated automatically in the system. After purchase, a confirmation SMS is sent to the user.

A guest user can only view the gifts present in this site .They may miss out the offers that is available on
this site. So to know more about the gifts and offers they have to register first. Then the guest user becomes
registered user and they can enjoy online gift shopping.

The role of administrator is to maintain stock details of the gifts. The admin also maintains registered user
details. Payment details are also maintained by the admin. When there is an offer it is the duty of the admin
to send mail or message to the user about offer sale.

The user can buy gifts 24/7 anywhere, anytime. The users save their time and energy at a mouse click. It is
user-friendly and easy to access.
2.PROJECT SCHEDULE

Project Starting Date :

Project Finishing Date :

Description of the task No .of days to complete


Software requirements 10
System analysis 10
Design 10
Implementation 30
Testing 9
Deployment 3
Future Plan 2
3.SOFTWARE REQUIREMENT SPECIFICATION

3.1 FUNCTIONAL REQUIREMENTS

USECASE SPECIFICATION<LOGIN>

1. Usecase name

LOGIN

1.1 Brief Description

This usecase describes how the registered user logs into the online gift shop system.

1.2Flow of Events

1.2.1 Basic flow

This usecase starts when the registered user wishes to login to thesystem.

1.2.1.1 The system requests the registered user to enter username and password.

1.2.1.2 The registered user enters username and password.

1.2.1.3 If the username and password are valid, then the system allows the registered
user to log into system and the homepage is displayed.

1.2.2 Alternate flow< Invalid username and password>

If the registered user enters an invalid username and password, then the system displays
an Error message. The registered user can choose either return to the beginning of the
basic flow or cancel the login at which point the usecase ends.

1.3 Special Requirements

None

1.4 Pre condition

The registered user should own a login id and enter the username and password.
1.5 Post condition

If the usecase is successful, the registered user gives the valid username and password
then the user successfully enters into the system. If not the system state is unchanged.

1.6 Extension Points

None
USECASE SPECIFICATION<VIEW CATALOG DETAILS>

2. Usecase name

View Catalog Details

2.1 Brief Description

This usecase describes how the user (registered and guest) can view the gift items.

2.2 Flow of Events

2.2.1Basic Flow

The usecase begins when the user wishes to view gift details.

2.2.1.1 The user needs to select from the list of options provided like model, color, and
size or based on price.

2.2.1.2 Based on the option selected by the user, the system will display the related gift
items.

2.2.2 Alternate Flow

None

2.3 Special Requirements

None

2.4 Pre conditions

The user is a registered and guest user.

2.5 Post condition

If the usecase is successful, then the user can view the details of the gifts. If not, the
system state is unchanged.

2.6 Extension Points

None
USECASE SPECIFICATION<SEARCH AN ITEM>

3. Usecase name

Search an Item

3.1 Brief Description

This usecase describes how the registered user can search a particular gift item.

3.2 Flow of Events

3.2.1 Basic Flow

The usecase begins when the registered user wishes to search particular gift.

3.2.1.1 The registered user needs to select from the list of options provided like based
on price, color, model using filter mechanism.

3.2.1.2 Based on the search option selected by the registered user, the system will
display the related gift items.

3.2.2 Alternate Flow <No Items Found>

If a particular gift item is not found, the system generates the message called “No Item
Found”.

3.3 Special Requirements

None

3.4 Pre conditions

The user is a registered user.

3.5 Post condition

If the usecase is successful, then the registered user can search the details of the gift. If
not, the system state is unchanged.

3.6 Extension Points

None
USECASE SPECIFICATION<MAINTAIN THE CART>

4. UseCase Name

Maintain the Cart

4.1 Basic Description

This usecase describes how the user can view or edit the cart.

4.2 Flow of Events

4.2.1 Basic Flow

This usecase starts when the user wishes to maintain the items from the cart.

4.2.1.1 The user can browse the catalog, view, add or remove items from the cart.

4.2.1.2 The user can retrieve their cart between sessions.

4.2.2 Alternate Flow

If an existing item is added to the cart, it shows a message “Already Item Exists”.

4.3 Special Requirements

None

4.4 Pre conditions

The User must login into the system.

4.5 Post conditions

If the use case is successful, then the gift items will be added or removed. If not, the
system state is unchanged.

4.6 Extension Points

None
USECASE SPECIFICATION<CONFIRM ORDER>

5. Usecase name

Confirm Order

5.1 Brief Description

This usecase describes how the registered user confirms the order.

5.2 Flow of Events

5.2.1Basic Flow

The usecase begins when the user wishes to confirms the order.

5.2.1.1 The system requests the user to enter the personal details

like name, address, phone number, e-mail id and so on.

5.2.1.2 The registered user enters the requested details

5.2.1.3 The Registered user confirms the booking details.

5.2.1.4 The details get registered into the system.

5.2.1.5 The registered user selects online mode to pay for the

gifts.

5.2.2 Alternate Flow <Incomplete/blank Fields>

If the registered user doesn’t enter any mandatory fields, then the system will display
incomplete registration and the system requests the user to enter all the fields.

5.3 Special Requirements

None

5.4 Pre conditions

The user is a registered user.


5.5 Post condition

If the usecase is successful, the gift items get added in the system. If not, the system state
is unchanged.

5.6 Extension Points

None
USECASE SPECIFICATION<REGISTERED>

6. Usecase name

Registered

6.1 Brief Description

This usecase describes how the guest user fills the registration form in the system.

6.2 Flow of Events

6.2.1 Basic Flow

This usecase starts when the guest user wishes to register the details.

6.2.1.1 The system requests the guest user to register their details like name, address,
email id & phone no.

6.2.1.2 The details get registered into the system.

6.2.1.3 The system validates the entered name and registers it.

6.2.1.4 Then the guest user enters into the system with the new username and
password.

6.2.2 Alternate Flow<Incomplete/blank fields>

If the guest user doesn’t enter any mandatory fields, then the system will display
incomplete registration and the system requests the guest user to enter all the details.

6.3 Special Requirements

None

6.4 Pre conditions

None

6.5 Post conditions


If the usecase is successful, then the guest user gives the valid details and enters in the
system. If not, the system state is unchanged.

6.6 Extension Points

None
USECASE SPECIFICATION<MAINTAIN STOCK DETAILS>

7. UseCase Name

Maintain Stock Details

7.1 Basic Description

This usecase describes how the admin can maintain the stock details.

7.2 Flow of Events

7.2.1 Basic Flow

This usecase starts when the admin wishes to maintain the details of the stock.

The system requests the admin to select the option such as add, update or delete
information. Depending upon the selection appropriate option will be done
successfully.

7.2.1.1 Add Info:

7.2.1.1.1The system requests the admin to enter the details

Of the user to add.

7.2.1.1.2 The admin responds and enters the stock details.

7.2.1.1.3 The system validates and stores the data.

7.2.1.2 Update Info:

7.2.1.2.1The system requests to enter the product id.

7.2.1.2.2 The admin enters the gift product id.

7.2.1.2.3 The system will retrieve the stock details.

7.2.1.2.4 The admin can modify the stock details.

7.2.1.2.5 The system will update the details.

7.2.1.3 Delete Info:


7.2.1.3.1The system requests to enter the gift product id.

7.2.1.3.2 The admin enters the gift product id.

7.2.1.3.3 The system will retrieve the stock details.

7.2.1.3.4 The admin confirms to delete.

7.2.1.3.5 The system will delete the stock details.

7.2.2 Alternate Flow

7.2.2.1 < Incomplete/blank fields >

If the admin doesn’t update any field, the system shows “Error Message”.

7.2.2.2< Invalid Data >

If invalid data are added, the system shows “Error Message”.

7.2.2.3 < No Record Found >

If the user id is not available, the system will generate the error message “No Record
Found”.

7.3 Special Requirements

None

7.4 Pre conditions

The admin must login into the system.

7.5 Post conditions

If the use case is successful, then the stock details are updated in the system. If not, the
system state is unchanged.

7.6 Extension Points

None
USECASE SPECIFICATION<MAINTAIN REGISTERED USER DETAILS>

8. UseCase Name

Maintain Registered User Details

8.1 Basic Description

This usecase describes how the admin can maintain the registered user details.

8.2 Flow of Events

8.2.1 Basic Flow

This usecase starts when the admin wishes to maintain the details about the registered
user.

The system requests the admin to select the option such as add, update or delete
information. Depending upon the selection appropriate option will be done
successfully.

8.2.1.1 Add Info:

8.2.1.1.1The system requests the admin to enter the details of

Of the user

8.2.1.1.2 The admin responds and enters the user details.

8.2.1.1.3 The system validates and stores the data.

8.2.1.2 Update Info:

8.2.1.2.1The system requests to enter the user id.

8.2.1.2.2 The admin enters the user id.

8.2.1.2.3 The system will retrieve the user details.

8.2.1.2.4 The admin can modify the use details.

8.2.1.2.5 The system will update the details.


8.2.1.3 Delete Info:

8.2.1.3.1The system requests to enter the user id.

8.2.1.3.2 The admin enters the user id.

8.2.1.3.3 The system will retrieve the user details.

8.2.1.3.4 The admin confirms to delete.

8.2.1.3.5 The system will delete the user details.

8.2.2 Alternate Flow

8.2.2.1 < Incomplete/blank fields >

If the admin doesn’t update any field, the system shows “Error Message”.

8.2.2.2 < Invalid Data >

If invalid data are added, the system shows “Error Message”.

8.2.2.3 < No Record Found >

If the user id is not available, the system will generate the error message “No Record
Found”.

8.3 Special Requirements

None

8.4 Pre conditions

The admin must login into the system.

8.5 Post conditions

If the use case is successful, then the user details are updated in the system. If not, the
system state is unchanged.

8.6 Extension Points

None
USECASE SPECIFICATION<MAINTAIN PAYMENT DETAILS>

9. UseCase Name

Maintain Payment Details

9.1 Basic Description

This usecase describes how the clerk can maintain the employee details.

9.2 Flow of Events

9.2.1 Basic Flow

This usecase starts when the clerk wishes to maintain the employee details.

The system requests the clerk to select the option such as update or delete information.
Depending upon the selection appropriate option will be done successfully.

9.2.1.1 Update Info:

9.2.1.1.1The system requests to enter the employee status.

9.2.1.1.2 The clerk enters the employee status.

9.2.1.1.3 The system will retrieve the salary details.

9.2.1.1.4 The clerk can modify the salary details.

9.2.1.1.5 The system will update the employee details.

9.2.1.2 Delete Info:

9.2.1.2.1The system requests to enter the gift product id.

9.2.1.2.2 The admin enters the gift product id.

9.2.1.2.3 The system will retrieve the payment details.

9.2.1.2.4 The admin confirms to delete.

9.2.1.2.5 The system will delete the payment details.


9.2.2 Alternate Flow

9.2.2.1 < Incomplete/blank fields >

If the admin doesn’t update any field, the system shows “Error Message”.

9.2.2.2 < No Record Found >

If the gift model number is not available, the system will generate the error message “No
Record Found”.

9.3 Special Requirements

None

9.4 Pre conditions

The admin must log into the system.

9.5 Post conditions

If the use case is successful, then the payment details are updated in the system. If not, the
system state is unchanged.

9.6 Extension Points

None
USECASE SPECIFICATION<SEND OFFER MAIL>

10. Usecase name

Send Offer mail

10.1 Brief Description

This usecase describes how the admin sends an offer mail.

10.2 Flow of Events

10.2.1Basic Flow

The usecase begins when the admin wishes to send an offer mail.

10.2.1.1 If there is any offer available on a special occasion, the admin has to send a
mail to the registered users.

10.2.2 Alternate Flow

When there is no special offer, no offer mail is sent.

10.3 Special Requirements

None

10.4 Pre conditions

The admin should login.

10.5 Post condition

If the usecase is successful, an offer mail is sent to the registered users. If not, the
system state is unchanged.

10.6 Extension Points

None
USECASE SPECIFICATION<GENERATE BILL>

11. Usecase name

Generate Bill

11.1 Brief Description

This usecase describes how the admin generates a bill when an order is confirmed.

11.2 Flow of Events

11.2.1 Basic Flow

The usecase begins when the admin wishes to generate a bill when an order is confirmed.

11.2.1.1 When a gift item is ordered, the bill is generated for that.

11.2.1.2 If the registered user order only one item, service charges plus tax is included.

11.2.1.3 If the items are purchased more than three, there are no service charges.

11.2.2 Alternate Flow

None

11.3 Special Requirements

None

11.4 Pre conditions

The admin should login into the system.

11.5 Post condition

If the usecase is successful, then the admin checks how many orders are placed and
generates bill for each order. If not, the system state is unchanged.

11.6 Extension Points

None
Use Case Specification: <View Feedback>

12. View feedback


12.1 Brief Description
This use case describes how the registered user view feedback in the online
gift shop

12.2 Flow of Events


12.2.1 Basic Flow
1. This use case starts when the actor wishes to view the feedbacks about gifts
in the online gift shop.

2.Select the feedback menu from the home page.

3. The Registered user can view about the gifts.

12.2.2 Alternative Flow


None

12.3 Special Requirements


None

12.4 Pre-Conditions
The user should be a registered user.

12.5 Post Conditions


If the use case was successful then the system will allow to view feedback otherwise

it won’t allow.

12.6 Extension Points


None
Use Case Specification: <Enter Feedback>

13. Enter feedback


13.1Brief Description
This use case describes how the registered user can enter the feedback form in
the online gift shop

13.2 Flow of Events


13.2.1 Basic Flow
1. This use case starts when the actor wishes to enter the feedbacks about gifts

in the online gift shop.

2.Select the feedback menu from the home page.

3. The Registered user can enter their feedback about the gifts.

13.2.2 Alternative Flow


None

13.3 Special Requirements


None

13.4 Pre-Conditions
The user should be a registered user.

13.5 Post Conditions


If the use case was successful then the system will allow the registered user to enter

the feedback otherwise it won’t allow.

13.6 Extension Points


None
3.2 TRACEABILITY TREE
3.2.1 TRACED OUT
3.2.2TRACED IN
3.2.3TRACEABILITY TREE
3.3 NON FUNCTIONAL REQIUREMENTS

3.3.1 PERFORMANCE REQUIREMENTS:-


The system is supposed to provide response to the candidates who interacts with the system.
The system provides the complete details with antivirus software.

3.3.2RESOURCES REQUIREMENTS:-

3.4.2.1 HARDWARE REQUIREMENTS:-

COMPONENTS MINIMUM RECOMMENDED


Processor Pentium inside Intel

Clock Speed 700 MHZ 1 GHZ or above

Cabinet AT ATX

RAM 256MB SDRAM 512 SDRAM or above

Primary Device 1.44MB Floppy Drive 1.44MB Floppy Drive

Hard Disk 20GB 80GB

CD-ROM 40X CD-ROM drive 52X CD-ROM drive

Display Unit 14” Color Monitor 15”Color Monitor

Keyboard 104 Key Board 107 Key Board

Mouse 2 Button Mouse 3 Button Scroll Mouse

Modem 33.6 Kbps Modem 56.6 Kbps FAX Modem

Sound System 100 W Sound System 380 W Sound System


3.4.2.2 SOFTWARE REQUIREMENTS:-

Operating System Windows 2008/XP/7


Application Software VISUAL STUDIO.NET 2008
ASP.NET WITH SQL 2005

Tools for analysis and design:

Rational administration
Rational requisite pro
Rational rose
4. SYSTEM DESIGN
4.1 USE CASE DIAGRAM

Enter Feedback Confirm Order


Maintain the cart

View Feedback
Search an item

Registered User
View Catalog Details

Login

User
Maintain Stock details

Admin Maintain Registered User Details

Maintain Payment Details

Send Offer Mail

Registered
Guest User
Generate Bill
4.2 CLASS DIAGRAM
4.3 ACTIVITY DIAGRAM

LOGIN

User Enters username


and pasword

Rejected Invalid username and


[validate] password

Accepted

Display user
Homepage
VIEW CATALOG DETAILS

User logs into


the system

Display
Homepage

Display gift
catalog

User selects the


gift

View selected gift


and its details
SEARCH AN ITEM

search for
particular item

Not found Found


[check item]

Display particular
No item found details
MAINTAIN CART DETAILS

Registered User
Login

select option

Select gift to [DELETE] Select gift to


[check option]
add [ADD] delete

AlreadyExist [Not Found] No Record


[check gift] [check gift]
Found
[ invalid ]
[ valid ] [Found]

Add gift to cart Gift delete from


the cart
CONFIRM ORDER

Enter product
detail

product detail is
entered

confirm booking [ available ] [ Not available ] Incomplete/blan


[check gift]
k field

confirm detail
get registered
MAINTAIN REGISTEREDUSER DETAILS

Admin login

select option

[ADD] [DELETE] Admin enter the


Enter Registered [check option]
user ID
user details

Incomplete/blank [UPDATE]
field Enter the user [NotFound] "Error Message"
[check user detail]
ID "NoRecordFound"
"ErrorMessage"
Incorrect [Found]
[check details] Invalid Data
System retrieve
[check user Id] the user detail
[ correct ]
[invalid]
[ valid ]
Store the detail
Retrieve the Confirm to
User detail delete

Modify the user


detail System delete
the user detail
System update
the detail
MAINTAIN PAYMENT DETAILS

Admin login

select option

System request to [ UPDATE ] [DELETE] System request to enter


enter product details [check option] the product detail

Admin enter Admin enter


product details product detail

Incomplete/blank
[check product detail] field [Not Found]
[check productdetail] No record
[In correct] Found

[ correct ] [Found]
Admin confirm
System retrieves the
to delete
payment detail

Admin modify the


Delete the
payment details
payment detail

Update the
payment detail
MAINTAIN STOCK DEAILS

Admin login

Select option

[ADD] [DELETE]

[UPDATE]

Enter the System request to


product details enter product id
System request
the product id
Admin enters the
product id Admin enters
[check detail] Incomplete/
product
blank field

[invalid]
Invalid data [not found] No record found
Add stock validate check item

[valid] [found]

modify the Confirm delete


Stores the stock details
stock.
delete the
Update the product
details
VIEW FEEDBACK

Select feedback
menu

View the comments under


each particular gifts
ENTER FEEDBACK

Select feedback
menu

Enter feedback based on


gifts or website

feedback is
added
5. DESIGN
5.1 SEQUENCE DIAGRAM

LOGIN

: RegisteredUser : LoginPage : Logincontrol : login

EnterUserName and Password


Validate

Pass the User detail


Pass the User details
retrieve

Pass User details

validate

Login successful
REGISTERED

: Guest User : Registration Page : Getting Registered : Registsration Entity

validate

Enter the User details


Pass the user details
Pass the user details add()

Registration successfull
VIEW CATALOG DETAILS

: User : View Boundary : View Control : View Entity

Select a gift item validate

Pass the gift detail


Pass the gift detail
retrieve

Display gift details


SEARCH AN ITEM

: SearchBondary : SearchItem : SearchEntity


: RegisteredUser

Enter a particular gift to search

Validate

Pass the gift detail


Pass the gift detail

Retrieve gift detail

Display gift detail


MAINTAIN CART DETAILS

: RegisteredUser : ShoppingCartPage : ShoppingCartControl : ShoppingCartEntity

Select item to add


Validate

Pass gift detail


Pass gift detail

add( )

Added successfully

Select item delete

Validate

Pass gift detail

Pass gift detail

delete( )

Deleted successfully
CONFIREM ORDER

: RegisteredUser : confirmorder boundary : confirmorder control : Registered

Enter RegisteredUser details


validate

Pass the RegisteredUser details


validate

Pass the RegisteredUser details


confirm order

Booking Confirmed
GENERATE BILL

: Admin : BillBoundary : BillControl


Get Product ID

Check offer available

Subtract the offer charge and generate bill

Num of item < 3 calculate tax & service charge and generate bill
MAINTAIN STOCK DETAILS

: Admin : Stock boundary : Stock control : Stock

select option to add


validate

Enter item details


Pass the item details validate

Pass the item details


add()

Added successfully

Select option to delete


validate

Enter the item details


Pass the item details
validate

Pass the item details


retrieve

Pass retrieved details

validate

Deleted successfully

Select option to update


validate

Enter the item details


Pass the item details validate

Pass the item details


retieve
Pass retrieved details

validate

Updated sucessfully
MAINTAIN REGISTEREDUSER DETAILS

: Admin : RegisteredUserBoundary : RegisteredUsercontrol : RegisteredUser

select option to add


Validate
Enter RegisteredUser details
Pass the RegisteredUser Detail
validate

Pass the RegisteredUser Detail


add ( )

Added Successfully

Select option to delete


Validate
Enter RegisteredUser details
Pass the RegisteredUser detail
validate

Pass RegisteredUser detail


retrieve
Pass retrieved details
validate
Deleted successfully

Select option to update


Validate
Enter RegisteredUser details
Pass RegisteredUser detail
validate

Pass RegisteredUser detail


retrieve

Pass retrieved details


validate

Updated successfully
MAINTAIN PAYMENT DETAILS

: Admin : Payment boundary : Payment Control : Payment

Select option to update


validate
Enter payment details

Pass payment details


validate

Pass payment details


retrieve
Pass retrieved details

validate

Updated successfully

Select option to delete

Enter payment details validate


Pass payment details
validate

Pass payment details


retrieve
Pass retrieved details

validate

Deleted successfully
SEND OFFER MAIL

: Admin : OfferBoundary : RegisteredUser

Enter Offer Detail

check

Send offer Mail

recevied()
5.2 DATABASE DESIGN

LOGIN

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 User _Name Varchar 20 Not null Enter user name

2 Password Varchar 10 Not null Used for


authentication

REGISTERED

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Varchar 20 Not null Enter the name
Name
2 Address Varchar 20 Not null Enter the address

3 Phone _no Integer 10 Not null Enter the phone


no
4 Email -id Varchar 20 Not null Enter the email-id

5 Password Varchar 20 Not null Enter the


password
6 Gender Varchar 20 Not null Enter the gender

CATALOG

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Product _Id Integer 10 Primary key View the product
id
2 Product_ Varchar 20 Not null View the product
Name name
3 Price Float 10 Not null View the price
CONFIRM ORDER

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Varchar 20 Not null Enter the name
Name
2 Address Varchar 20 Not null Enter the address

3 Quantity Integer 10 Not null Enter the quantity

4 Phone no Integer 10 Not null Enter the phone


no
5 Email-id Varchar 20 Not null Enter the email-id

6 Payment_ Varchar 20 Not null Choose payment


type method

STOCK

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Product _Id Varchar 20 Primary key Maintains the
product id
2 Product_ Varchar 20 Not null Maintains the
Name product name
3 Price Float 10 Not null Maintains the
price
REGISTEREDUSER

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 User _Name Varchar 20 Not null Maintains the
user name
2 Address Varchar 20 Not null Maintains the
address
3 Phone No Integer 10 Not null Maintains the
phone no
4 Email-ID Varchar 20 Not null Maintains the
email-id
5 Password Varchar 20 Not null Maintains the
password
6 Gender Varchar 20 Not null Maintains the
gender

PAYMENT

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Bill _ID Integer 10 Primary key Maintains the bill
id
2 User _Name Varchar 20 Not null Maintains the
user name
3 Card _Type Varchar 20 Not null Maintains the the
card type
4 Card _No Varchar 20 Not null Maintains the
card no
5 Status Varchar 20 Not null Checks the status

OFFER MAIL

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Email-Id Varchar 20 Primary key Used to identify
the email id
2 Offer Varchar 20 Not null Used to identify
the offer
BILL

SNO FIELD DATA TYPE DATATYPE CONSTRAINTS DESCRIPTION


NAME SIZE
1 Integer 10 Primary key Used to generate
Product _ID the product id
2 Bill _Id Integer 10 Not null Used to generate
the bill id
3 Name Varchar 20 Not null Used to generate
the name
4 Address Varchar 20 Not null Used to generate
the address
5 Phone _No Integer 10 Not null Used to generate
the phone no
6 Quantity Integer 10 Not null Used to generate
the quantity
7 Price Float 10 Not null Used to generate
the price
5.3 FORM DESIGN

HOMEPAGE
SIGNUP
VIEW CATALOG
STOCK DETAILS
PAYMENT DETAILS
REGISTEREDUSER DETAILS
OFFER DETAILS
VIEW FEEDBACK
ENTER FEEDBACK
6. IMPLEMENTATION

6.1 SAMPLE CODING

SIGNUP

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.Windows.Forms;

namespace Online_gift_shopss
{
publicpartialclassSignup : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataReader dr;
string gender;

protectedvoid Page_Load(object sender, EventArgs e)


{

protectedvoid Button2_Click(object sender, EventArgs e)


{
TextBox2.Text = "";
TextBox3.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
if (RadioButton3.Checked == true)
{
gender = "Male";
}
elseif (RadioButton4.Checked == true)
{
gender = "Female";
}
else
{
MessageBox.Show("Choose gender");
}
dbconnection.database();
cmd = newSqlCommand("select * from register where
name='"+TextBox3.Text+"'",dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
MessageBox.Show("Username already exist");
}
else
{
dbconnection.database();
cmd = newSqlCommand("insert into register
values('"+TextBox3.Text+"','"+TextBox5.Text+"','"+TextBox6.Text+"','"+gender+"','"+Text
Box2.Text+"','"+TextBox9.Text+"','"+TextBox8.Text+"')",dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Registered Success");
Response.Redirect("Default.aspx");
TextBox2.Text = "";
TextBox3.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
}

}
}
}

LOGIN

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.Windows.Forms;
using System.Data.SqlClient;

namespace Online_gift_shopss
{
publicpartialclassLogin : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataReader dr;

protectedvoid Page_Load(object sender, EventArgs e)


{

protectedvoid Button2_Click(object sender, EventArgs e)


{
TextBox2.Text = "";
TextBox1.Text = "";
}

protectedvoid Button3_Click(object sender, EventArgs e)


{
Response.Redirect("Default.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
if (DropDownList1.Text == "Admin")
{

if (TextBox1.Text == "Admin"&& TextBox2.Text == "Admin")


{
MessageBox.Show("Login Success");
Response.Redirect("Adminmenu.aspx");
}

else
{
MessageBox.Show("Invalid Login");
}
}
elseif (DropDownList1.Text == "User")
{

dbconnection.database();
cmd = newSqlCommand("select * from register where name='" +
TextBox2.Text + "' and pwd='" + TextBox1.Text + "'", dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
MessageBox.Show("Welcome to online gift shop");
Session["username"] = TextBox2.Text.Trim();
Response.Redirect("usermenu.aspx");
}
else
{
MessageBox.Show("Invalid login");
}
}
}
protectedvoid CustomValidator1_ServerValidate(object source, ServerValidateEventArgs
args)
{

}
}
}

FORGOT 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;

namespace Online_gift_shopss
{
publicpartialclassFordet : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataReader dr;

protectedvoid Page_Load(object sender, EventArgs e)


{

protectedvoid Button2_Click(object sender, EventArgs e)


{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
}

protectedvoid Button3_Click(object sender, EventArgs e)


{
Response.Redirect("Login.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("update register set [pwd]='"+TextBox2.Text+"' where
[name]='"+TextBox3.Text+"'",dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
}
}
}

CONFIRM ORDER

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.Windows.Forms;

namespace Online_gift_shopss
{
publicpartialclassPayment : System.Web.UI.Page
{
string v;
SqlCommand cmd;
SqlDataReader dr;
string cart;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session["username"] != null)
{
Label3.Text = Convert.ToString(Session["username"]);
Textbox2.Text = Convert.ToString(Session["username"]);
}
else
{

}
if (Session["productid"] != null)
{

Textbox5.Text = Convert.ToString(Session["productid"]);
}
else
{

}
if (Session["amount"] != null)
{

Textbox3.Text = Convert.ToString(Session["amount"]);
}
else
{

}
Textbox4.Text = DateTime.Now.ToString("dd/MM/yyyy");

protectedvoid Button3_Click(object sender, EventArgs e)


{
Response.Redirect("usermenu.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
if (RadioButton1.Checked == true)
{
v = "Cash on Delivery";
}
else
{
MessageBox.Show("Choose option");
}

dbconnection.database();
cmd = newSqlCommand("insert into payment
values('"+Textbox2.Text+"','"+Textbox5.Text+"','"+Textbox3.Text+"','"+Textbox4.Text+"',
'"+v+"')",dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Confirm Success");

dbconnection.database();
cmd = newSqlCommand("select count(customername) as counts from
payment",dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
cart=dr["counts"].ToString();
Session["counts"] = cart;
}
}

protectedvoid Button2_Click(object sender, EventArgs e)


{
Textbox2.Text = "";
Textbox3.Text = "";
Textbox5.Text = "";
Textbox4.Text = "";
}
}
}
STOCK DETAILS

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.Windows.Forms;

namespace Online_gift_shopss
{
publicpartialclassStockDetails : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataReader dr;
int a,b;
string id;

protectedvoid Page_Load(object sender, EventArgs e)


{
if (Page.IsPostBack)
{

}
else
{
dbconnection.database();
cmd = newSqlCommand("select * from productid", dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
id = dr["productid"].ToString();
a = Convert.ToInt32(id);

}
}
b = a + 1;
TextBox3.Text = Convert.ToString(b);
}
}

protectedvoid Button5_Click(object sender, EventArgs e)


{
Response.Redirect("Adminmenu.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("select * from stock where
productid='"+TextBox3.Text+"'",dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
MessageBox.Show("Already Exists so update the information");
}
else
{
dbconnection.database();
cmd = newSqlCommand("insert into stock values('" +TextBox3.Text+ "','"
+TextBox2.Text+ "','" +TextBox1.Text+ "')", dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Data Insert");

dbconnection.database();
cmd = newSqlCommand("insert into productid
values('"+TextBox3.Text+"')",dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();

TextBox3.Text = "";
TextBox2.Text = "";
TextBox1.Text = "";

}
}

protectedvoid Button2_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("select * from stock where
productid='"+TextBox3.Text+"'",dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
TextBox2.Text = dr["productname"].ToString();
TextBox1.Text = dr["price"].ToString();
}
}
else
{
MessageBox.Show("Record not found");
}
}

protectedvoid Button3_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("update stock set productid='" + TextBox3.Text +
"',productname='" + TextBox2.Text + "',price='" + TextBox1.Text + "' where productid='"
+ TextBox3.Text + "'", dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Update data");

TextBox3.Text = "";
TextBox2.Text = "";
TextBox1.Text = "";

dbconnection.database();
cmd = newSqlCommand("select * from productid", dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
id = dr["productid"].ToString();
a = Convert.ToInt32(id);

}
}
b = a + 1;
TextBox3.Text = Convert.ToString(b);

protectedvoid Button4_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("delete from stock where
productid='"+TextBox3.Text+"'",dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Delete Suceess");

TextBox3.Text = "";
TextBox2.Text = "";
TextBox1.Text = "";

dbconnection.database();
cmd = newSqlCommand("select * from productid", dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
id = dr["productid"].ToString();
a = Convert.ToInt32(id);

}
}
b = a + 1;
TextBox3.Text = Convert.ToString(b);
}
}
}
REGISTEREDUSER DETAILS

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.Windows.Forms;
using System.Data.SqlClient;

namespace Online_gift_shopss
{
publicpartialclassViewregister : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataAdapter da;
DataSet ds;
SqlDataReader dr;

protectedvoid Page_Load(object sender, EventArgs e)


{
if (Page.IsPostBack)
{

}
else
{
dbconnection.database();
cmd = newSqlCommand("select distinct name from register",
dbconnection.con);
da = newSqlDataAdapter(cmd);
ds = newDataSet();
da.Fill(ds, "register");
DropDownList1.DataSource = ds.Tables["register"];
DropDownList1.DataValueField = "name";
DropDownList1.DataBind();
dbconnection.con.Close();
}

protectedvoid Button3_Click(object sender, EventArgs e)


{
Response.Redirect("Adminmenu.aspx");
}

protectedvoid Button4_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("select * from register where name='" +
DropDownList1.Text + "'", dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
TextBox2.Text=dr["gender"].ToString();
TextBox1.Text=dr["address"].ToString();
TextBox4.Text=dr["phoneno"].ToString();
TextBox3.Text=dr["emailid"].ToString();
}
}

protectedvoid Button1_Click(object sender, EventArgs e)


{

dbconnection.database();
cmd = newSqlCommand("update register set gender='" + TextBox2.Text +
"',address='" +TextBox1.Text+ "',phoneno='" + TextBox4.Text +
"',emailid='"+TextBox3.Text+"' where name='" +DropDownList1.Text+ "'",
dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Update data");

TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";

protectedvoid Button5_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("delete from register where name='"
+DropDownList1.Text+ "'", dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Delete Suceess");

TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
}
}
}
PAYMENT DETAILS

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.Windows.Forms;

namespace Online_gift_shopss
{
publicpartialclassViewpayment : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataAdapter da;
SqlDataReader dr;
DataSet ds;

protectedvoid Page_Load(object sender, EventArgs e)


{
if (Page.IsPostBack)
{
}
else
{
dbconnection.database();
cmd = newSqlCommand("select distinct customername from payment",
dbconnection.con);
da = newSqlDataAdapter(cmd);
ds = newDataSet();
da.Fill(ds, "payment");
DropDownList1.DataSource = ds.Tables["payment"];
DropDownList1.DataValueField = "customername";
DropDownList1.DataBind();
dbconnection.con.Close();
}
}

protectedvoid Button2_Click(object sender, EventArgs e)


{
Response.Redirect("Adminmenu.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
dbconnection.database();
ds = newDataSet();
da = newSqlDataAdapter("select * from payment where customername='"
+DropDownList1.Text+ "'", dbconnection.con);
da.Fill(ds, "payment");
GridView1.DataSource = ds.Tables["payment"];
GridView1.DataBind();
dbconnection.con.Close();

}
}

SEND OFFER MAIL

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.Windows.Forms;
using System.Net;
using System.Net.Mail;
using System.Text;

namespace Online_gift_shopss
{
publicpartialclassOffers : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataReader dr;
SqlDataAdapter da;
DataSet ds;

protectedvoid Page_Load(object sender, EventArgs e)


{
if (Page.IsPostBack)
{

}
else
{
dbconnection.database();
cmd = newSqlCommand("select distinct name from register",
dbconnection.con);
da = newSqlDataAdapter(cmd);
ds = newDataSet();
da.Fill(ds, "register");
DropDownList1.DataSource = ds.Tables["register"];
DropDownList1.DataValueField = "name";
DropDownList1.DataBind();
dbconnection.con.Close();
}
}

protectedvoid Button2_Click(object sender, EventArgs e)


{
TextBox2.Text = "";
TextBox1.Text = "";
}

protectedvoid Button3_Click(object sender, EventArgs e)


{
Response.Redirect("Adminmenu.aspx");
}

protectedvoid Button4_Click1(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("select * from register where name='" +
DropDownList1.Text + "'", dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{

TextBox2.Text = dr["emailid"].ToString();
}
}
}

protectedvoid Button1_Click(object sender, EventArgs e)


{

MailMessage mail1 = newMailMessage();


mail1.To.Add(TextBox2.Text);
mail1.From = newMailAddress("chindhusolaiyappan@gmail.com");
mail1.Subject = ("Offers:");
StringBuilder builder = newStringBuilder();
builder.Append("<pre>");

builder.Append("<br/>");
builder.Append("Offers :" + TextBox1.Text);
builder.Append("<br/>");

builder.Append("</pre>");
mail1.Body = builder.ToString();

mail1.IsBodyHtml = true;
SmtpClient smtp1 = newSmtpClient();
smtp1.Host = "smtp.gmail.com";
smtp1.Credentials = new
System.Net.NetworkCredential("chindhusolaiyappan@gmail.com",
"smaackrschin593");
smtp1.EnableSsl = true;
smtp1.Send(mail1);
}
}
}

VIEW FEEDBACK

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.Windows.Forms;

namespace Online_gift_shopss
{
publicpartialclassViewfeedback : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataAdapter da;
DataSet ds;
SqlDataReader dr;

protectedvoid Page_Load(object sender, EventArgs e)


{
if (Page.IsPostBack)
{

}
else
{
dbconnection.database();
cmd = newSqlCommand("select distinct customername from feedback",
dbconnection.con);
da = newSqlDataAdapter(cmd);
ds = newDataSet();
da.Fill(ds, "feedback");
DropDownList1.DataSource = ds.Tables["feedback"];
DropDownList1.DataValueField = "customername";
DropDownList1.DataBind();
dbconnection.con.Close();
}
}
protectedvoid Button3_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
dbconnection.database();
ds = newDataSet();
da = newSqlDataAdapter("select * from feedback where customername='"
+DropDownList1.Text+ "'", dbconnection.con);
da.Fill(ds, "feedback");
GridView1.DataSource = ds.Tables["feedback"];
GridView1.DataBind();
dbconnection.con.Close();

protectedvoid Button2_Click(object sender, EventArgs e)


{

}
}
}

ENTER FEEDBACK

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.Windows.Forms;

namespace Online_gift_shopss
{
publicpartialclassFeedback : System.Web.UI.Page
{
SqlCommand cmd;
SqlDataReader dr;

protectedvoid Page_Load(object sender, EventArgs e)


{
if (Session["username"] != null)
{
Label3.Text = Convert.ToString(Session["username"]);
dbconnection.database();
cmd = newSqlCommand("select * from register where
name='"+Label3.Text+"'",dbconnection.con);
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
Textbox1.Text=dr["name"].ToString();
Textbox2.Text=dr["emailid"].ToString();
}
}

}
else
{

}
}

protectedvoid Button3_Click(object sender, EventArgs e)


{
Response.Redirect("usermenu.aspx");
}

protectedvoid Button1_Click(object sender, EventArgs e)


{
dbconnection.database();
cmd = newSqlCommand("insert into feedback
values('"+Textbox1.Text+"','"+Textbox2.Text+"','"+Textbox3.Text+"')",dbconnection.con);
cmd.ExecuteNonQuery();
dbconnection.con.Close();
MessageBox.Show("Feedback Inserted");
Textbox1.Text = "";
Textbox2.Text = "";
Textbox3.Text = "";
}

protectedvoid Button2_Click(object sender, EventArgs e)


{
Textbox1.Text = "";
Textbox2.Text = "";
Textbox3.Text = "";
}
}
}
ADMIN MENU

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;

namespace Online_gift_shopss
{
publicpartialclassAdminmenu : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{

protectedvoid Button4_Click(object sender, EventArgs e)


{
Response.Redirect("StockDetails.aspx");
}

protectedvoid Button8_Click(object sender, EventArgs e)


{
Response.Redirect("Offers.aspx");
}

protectedvoid Button5_Click(object sender, EventArgs e)


{
Response.Redirect("Viewpayment.aspx");
}

protectedvoid Button6_Click(object sender, EventArgs e)


{
Response.Redirect("Viewregister.aspx");
}

protectedvoid Button9_Click(object sender, EventArgs e)


{
Response.Redirect("Default.aspx");
}

protectedvoid Button10_Click(object sender, EventArgs e)


{
Response.Redirect("Viewfeedback.aspx");
}
}}
USER MENU

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;

namespace Online_gift_shopss
{
publicpartialclassusermenu : System.Web.UI.Page
{
protectedvoid Page_Load(object sender, EventArgs e)
{
if (Session["username"] != null)
{
Label4.Text = Convert.ToString(Session["username"]);
}
else
{

}
}

protectedvoid Button9_Click(object sender, EventArgs e)


{
Response.Redirect("Default.aspx");
}
}
}
7.TESTING

Testing is the major quality control measure employed during software development. Its basic function is to
detect errors. Testing is the process of executing a program with the intention of finding errors. It is complete
verification to detect whether the objective is met and the user requirements are satisfied. After the coding phase,
testing is done to test the proper working of the new system. Testing represents the ultimate review of specification,
design and coding. Thus the goal of testing is to uncover the requirements, design encoding errors in the program.

System testing is actually a series of different test whose primary purpose is to fully exercise the computer-
based program.

Different types of testing are:

1. Unit Testing

2. Integration Testing

3. Validation Testing
7.1. UNIT TESTING

Unit testing involves the design of test cases that validate the internal program logic is functioning properly,
and that program input produces valid outputs. All decision branches and internal code flow should be validated. It is
the testing of individual unit before integration. This is a structural testing, that relies on knowledge of its construction
and is invasive. Unit test perform basic tests at component level and test a specific business process, application, and/or
system configuration. Unit tests ensure that each unique path of a business process performs accurately to the
documented specifications and contains clearly defined inputs and expected results. In the lines of this strategy all, the
individual functions and modules were put to the independently. By following this strategy all, the errors in coding
were identified and corrected.

Unit testing is a procedure used to validate the individual units of source code is working properly. The goal of
unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a
strict, written contract that the piece of code must satisfy. As a result, it affords server benefits.

Unit testing is typically done by software developers to ensure that the code they have written meets software
requirements and behaves as the developer intended. Each unit of the system implemented in the source code is
checked for correctness. All error-handling paths are tested. User authentication form and other each individual
modules form are taken as independently. Here login and organization form are taken as smallest unit.
S. Test Condition Expected Result Actual Result Result

No

1. Check whether the It displays the message welcome It displays the message Success
username and password to online gift . welcome to online gift shop.
provided by the
customer matches each
other.
S. Test Condition Expected Result Actual Result Result

No

1. Check whether the customer It displays the message It displays the message Success
fills all the columns. Registered success. Registered success.
7.2. VALIDATION TESTING

Validation testing is done to validate the inputs given by the user. The user inputs are checked for their
correctness and range. If there are errors, the error message is given and the user is prompted again to enter the new
value. If the user types some characters in the numeric and an error message and it is demonstrated in the following
figure.
TC.ID Test Condition Test Input Expected Result Actual Result Result

VT-1.1 Check whether Empty field It displays the error It displays the error Success
the username is message as please message as please
empty in the login enter username enter username
process

VT-1.2 Check whether Empty field It displays the error It displays the error Success
the password is message as please message as please
empty in the login enter password. enter password .
process

VT-1.3 Check whether Incorrect It displays the error It displays the error Success
the username and username and message as enter message as enter
password is password valid username and valid username and
incorrect password password

VT-1.4 Check whether Incorrect It displays the error It displays the error Success
username and username and message as Please message as Please
password is password register first. register first.
matched
7.3. INTEGRATION TESTING

Testing is done for each module. After testing all the modules, the modules are integrated and testing of the
final system is done with the test data, specially designed to show that the system will operate successfully in all its
aspects conditions. Thus the system testing is a confirmation that all is correct and an opportunity to show the user that
the system works.
8. DELOYMENT

8.1. PROBLEM FACED

 As I am working with ASP.Net, I faced some problem regarding database connection


and updating at the initial stage but later it become familiar and easy for me.

8.2. LESSONS LEARNT

This project has given to me some wonderful experience and made me familiar to work with ASP.Net.
I learnt how to make database connection in an efficient manner. This project also helped me to gain
knowledge about system analysis and system designing software’s like rational rose. Through this project I
learnt various testing methodologies like unit testing, validation testing, integration testing and debugging. I
learnt new concepts in ASP.Net and how to work with SQL connectivity and code writing procedure.
9. FUTURE PLAN

It is not possible to develop a system that makes all the requirements of the user. The user requirements are

keep on changing as the system is being used. Some of the future enhancements that can be done to the system are

1. Allow the user to rate about the gift product.

2. Can add complaints when there is any default in the product.


10. BIBLIOGRAPHY

References for the project development were taken from the following Books and Websites.

BOOKS

1. MICROSOFT ASP.NET

POOJA BEMBEY, KULJIT KAUR

2. TEACH YOURSELF SQL-SERVER

SHAM SERIES

WEB SITES

 www.pureasp.net.com
 www.microsoftsqlserver.com
 www.w3schools.com

S-ar putea să vă placă și