Sie sind auf Seite 1von 204

OnLineElecronics

ACKNOWLEDGEMENT

I take this opportunity to express my endless indebtedness and gratitude to my honoured


guide M. Shridhar, deputy general manager(RITES Ltd. Gurgoan) rendering his valuable
guidance and unlimited time for discussion and help during the course of the project.

Finally I could like to express my deep and sincere thanks to all people who have been
directly our indirectly involved in successfull completion of my great endeavor.

Hariom Singh

E. No: 011120440
Page 1 3/14/2009
OnLineElecronics

ABSTRACT

This is a business to consumer, E-commerce website. In this B2C E-commerce site –online money
transaction is taking place between Users (customers), Companies and business house.
Under various groups of products and categories of items, the selling
companies will registers and enter the particulars and specifications of their products together with
prices. The consumers will registers with bank details and other particular for viewing/searching
the available products and for buying them.
Once the consumers confirms the buying transactions the systems prompts
him to enter the bank details for processing and debit the amount. Through the authorized
gateways the debit so raised will be sent for credits to company’s account for selling. A receipt for
transaction conformation is generated by the system for consumer with a copy to the respective
company for delivery of the goods.

TABLE OF CONTENTS
E. No: 011120440
Page 2 3/14/2009
OnLineElecronics

Chapters Page No.

1. Introduction 6
1.1 General 7
1.2 Objective 7
1.3 Web Based Application 7

2. System Analysis 9
2.1 Review of Existing System 10
2.2 Requirement of proposed System 10
2.3 Requirement Analysis 10
2.4 Harware & Software Requirements. 13
2.5 Modeling 13
2.5.1 Functional Modeling 14
2.5.2Behavioral Modeling 14
2.6 Feasibility 14
2.6.1 Technical Feasibility 14
2.6.2 Operational Feasibility 15
2.6.3 Economic Feasibility 15
Cost Best Analysis 16
2.6.4 Social Feasibility 17
2.6.5 Management Feasibility 17
2.6.6 Legal Feasibility 17
2.6.7 Time Feasibility 17
2.7 Software requirement Specification 17
2.7.1 Data Flow Diagram 20
2.8 Entity Relationship Diagram 25
2.9 Software Engineering Paradigm 29

3. System Design 30
3.1 General 31
3.2 Review Benefits, Cost target & Constraints 32
3.2.1 Database Design 32
3.2.2 Program Design 32
3.2.3 System & Program Test Preparation 32
3.2.4 System Interface Specification 32
3.3 Design of Modules 32
3.3.1 Registration Module 32
3.3.1.1 Company Registration 32
3.3.1.2 User Registration 33
3.3.2 Administration Module 33
3.3.2.1 Authentication 33
3.3.2.2 Forgot Password 34
3.3.2.3 Change Password 34

3.3.3 Company Section 34

E. No: 011120440
Page 3 3/14/2009
OnLineElecronics

3.3.3.1 Product Registration 34


3.3.3.2 Product Updating 34
3.3.3.3 Company Status 35
3.3.4 User Section 35
3.3.4.1 My Shopping 35
3.3.4.2 Order Updating 35
3.3.4.3 User Status 35
3.4 Process Logic 37
3.5 Physical & Logical Design 47
3.6 Forms Print 65

4. Software Code 85
4.1 frmHomePage 86
4.2 frmUserRegistration 89
4.3 frmCompanyRegistration 93
4.4 frmUserIntroduction 94
4.5 frmMyShopping 95
4.6 frmShoppingCard 98
4.7 frmUpdateShopping 102
4.8 frmUserStatus 105
4.9 frmCompanyIntroduction 107
4.10 frmProductCategories 108
4.11 frmAirConditioners 111
4.12 frmBreadToasters 113
4.13 frmComputer 115
4.14 frmCookers 116
4.15 frmGeysors 118
4.16 frmIron 120
4.17 frmMixers 121
4.18 frmMusicSystem 123
4.19 frmRefrigerator 125
4.20 frmSandWichMaker 127
4.21 frmStoves 128
4.22 frmTelevision 130
4.23 frmWashingMachine 132
4.24 frmBankingDetails 133
4.25 frmProductUpdation 163
4.26 frmCompanyStatus 165
4.27 frmProductDetails 166
4.28 frmOrderDetails 168
4.29 frmForgotPassword 170
4.30 frmChangePassword 174
4.31 Adrotator Xml File 176
4.32 Class Library(ClsShopping) 178

5. System Testing 179

E. No: 011120440
Page 4 3/14/2009
OnLineElecronics

5.1 Testing Strategies 180


5.2 Testing Web Based Application 187
5.3 Implementation 189
5.3.1 Design of Test Data 189
5.5 Training 193
5.6 Post Implementation Review 195

6. Security and Project Management 196


System Security 197
Project Management 197
Pert Chart 197
Gantt Chart 198

7. System Maintenance 201

8. Future Scope 204

CHAPTER-1

E. No: 011120440
Page 5 3/14/2009
OnLineElecronics

1. INTRODUCTION

E. No: 011120440
Page 6 3/14/2009
OnLineElecronics

1.1 General: India is seen as a growing economic power by the world in the 21st century. As
per the projections made with in next few decades the volume of trade, is expected to be large and
India together with china will emerge as future economic super powers. With a population
bouncing about 100 corers these is ever growing demand of electronic goods and electrical
appliances like T.V.S, refrigerators, air conditioners etc. The income level has raised all the status
of people with boom in economic, industrial, production and services sector. This has triggered a
spurt in consumerism. It is estimated that around 20% of individual’s salary is being spurt on
purchase of electronics goods. Many foreign companies also entered the fray in the field of
marketing electronics goods together with domestic players which has made consumers as the
‘king’ getting the best product with a reasonable price and with a variety of models to choose from.
With the stiff competition in the market the companies, production houses in these sectors are
looking at innovative ideas and means to market, their goods and to increase their share in market.
Obviously to remain firm in the market, one has to harness the potential of Information
technology and related e-commerce to boost the sales.

1.2 Objective: It is proposed to develop a Website for On Line Shopping of house hold
electronic, electrical appliances like televisions, refrigerators, washing machines, air conditioners,
etc. The Companies intending to sell the products and the consumers interested in buying will
register in the website. The financial transactions are through bank accounts of reputed banks and
their authorized payments gateways.

1.3 Web Based Application: There is little debate that Web-Based system and application are
different than the many other categories of the computer software discussed Powel summarizes the
primary differences when he states that the Web-Based system “involves a mixture between
marketing and computing, between internal communication and external relations, and between art
and technology”.
The following attributes are encountered in the vast majority:
1. Network intensive: By its nature, a Web-Based Application is network intensive. It resides
on a network and must serve the needs of the diverse community of the clients. A Web-
Based Application may reside on the internet (thereby enabling open worldwide

E. No: 011120440
Page 7 3/14/2009
OnLineElecronics

communication). Alternatively, an application may be placed on an intranet (implementing


communication across an organization) or an Extranet (inter-network communication).
2. Content Driven: In many cases, the primary function of a Web-based application is to use
hypermedia to present text, graphics, audio, and video, content to the end user.
3. Continuous Evolution: Unlike conventional application software that evolves over a series
of planned, chronological spaced releases, web application evolves continuously. It is not
unusual for some Web-Based application to be updated on an hourly schedule.

Some argue that the continuous evolution of a Web-Based application


makes the work performed on them analogous to gardening. Engineering is about adopting a
consistent and scientific approach, tempered by a scientific practical context, to development and
commissioning of the system of application. Web Site development is often much more about
creating and infrastructure and “tending” the information which grows and blooms within this
garden Over time the garden (i.e. Web-Site) will continue to evolve, change , and grow. A good
initial architecture should allow this growth to occur in a controlled and consistent manner. We
could have “tree surgeons” that prune “trees” (i.e. section of the site) within the garden (the site
itself) while ensuring cross referential integrity. We could have “garden nurseries” where young
plants (i.e. design patterns for Web-Sites) are grown. Continual care and feeling allows a Web-Site
to grow (in robustness and important). But, unlike a garden, web application must serve (adapt to)
the needs of more then the gardener. The following Web-Based application characteristics drive the
process.

CHAPTER-2

E. No: 011120440
Page 8 3/14/2009
OnLineElecronics

2. SYSTEM ANALYSIS

E. No: 011120440
Page 9 3/14/2009
OnLineElecronics

2.1 Review of Existing System: The existing trade of the market is that the goods
manufactured by the company are first received by the dealer which ultimately is responsible for
the sale of the goods to the end user. The dealers acting as middleware (between company and
consumer) consumes a lot of money and therefore the market prices of the goods are very high till
it reaches consumer. Now with the help of the Web-Sites developed for such consumer goods the
market price can be controlled to a large extent bringing relief to the consumers to some extent.
Thus nowadays the trend of market is changing from manufacturers-> dealers->Consumers to
manufacturer->Consumers.
2.2 Requirement of proposed System: Under various groups of products and categories of
items, the selling companies will registers and enter the particulars and specifications of their
products together with prices. The consumers will registers with bank details and other particular
for viewing/searching the available products and for buying them.
Once the consumers confirms the buying transactions the systems prompts
him to enter the bank details for processing and debit the amount. Through the authorized
gateways the debit so raised will be sent for credits to company’s account for selling. A receipt for
transaction conformation is generated by the system for consumer with a copy to the respective
company for delivery of the goods.

2.3 Requirement Analysis: upon evaluating current problems and desired information (input
and output), the analyst begins to synthesize one or more solution. To begin, the data objects,
processing function, and behavior of the system are defined in detail. Once this information has
been established basic architecture of implementation are considered. A client –server approach
would seem to be appropriate but does the software support this architecture fall within the scope
outlined in the software plan? A database management system would seem to be required, but is
the user/customers need for associating justified? The process of evaluation and synthesis
continues until both analyst and customer feel confident that software can be adequately specified
for subsequent development steps.
Throughout evaluation and solution, synthesis, the analyst’s primary focus is on “What” ,
not “How”. What data does the system produce and consume, What function must the system
perform, What behaviors does the system exhibits, What interface are defined and What constraint
apply?

E. No: 011120440
Page 10 3/14/2009
OnLineElecronics

During the evaluation and solution synthesis actually the analyst creates model of the
system in and effort to better understand data and control flow of functional processing operational
behaviors and information contained. The model servers as a foundation for software design and
the basic for the creation of specifications for the software.
Keeping in mind the problem with requirement gathering, a number of independent
investigators have developed a team oriented approach to requirement gathering that applied
during early stages of analysis and specifications called FACILITATED APPLICATION
SPECIFICATION TECHNIQUES (FAST).
This approach encourages the creation of a join team of customers and developers who
work together identify the problem, propose elements of the solution, negotiate different approach
and specify preliminary set of solution requirements has been used predominantly by the
information system community, but the technique offers potential for improved communication in
application of all kinds.
Many different approaches of FAST have been proposed. Each makes use of a slightly
different scenario but all apply variation on the following basic guide lines.
• A meeting is conducted at a neutral site and attended by both software engineers and
customers.
• Rule for preparation and participation are established.
• An agenda is suggested that is formal enough to cover all important points but informal
enough to encourage the free flow of ideas.
• A “facilitator” (can be a customer, a developer, or an outsider) control the meeting.
• A “definition mechanism” (can be work sheets, flip charts, or wall stickers or an
electronic bulletin board, chat room or virtual form) is used.
• The goal is to identify the problem, propose elements of the solutions, negotiate
different approaches, and specify a preliminary set of solution requirements and
atmosphere i.e. conductive to the accomplishment of the goal.
Initial meetings between the developers and customers occur and basic question and answer help
to establish the scope of the problem and the overall perception of a solution. Out of these initial
meeting, the developer and customers write a one-or two-page “Product request”. A meeting place,
time and date for FAST arte selected and a facilitator is chosen attendees form both the

E. No: 011120440
Page 11 3/14/2009
OnLineElecronics

development and customer/User organization are invited to attend. The product request is
distributed to all attendees before the meeting date.

While reviving the request in the days before the meeting, each FAST attendees is asked to
make a list of object that are part of the environment that surrounds the system, other object that
are to be produced by the system, and objects that are used by the system to perform its functions.
In addition each attendees is asked to make another list of services (process are functions) that
manipulates or interact with the object. Finally list of concentrate and performance criteria are also
developed. The attendees are informed that the list are not expected to be exhaustive but are
expected to reflect each persons perception of the system.

As the FAST meeting begins, the first topic of discussion is the need and justification for
the new product- everyone should agree that the product is justified. Once agreement has been
established, each participant present his or her list for discussion. The list can be pinned to the
walls of the room using large sheets of the papers, straight to the wall using adhesive backed
sheets, or written on a wall board. Alternatively, the list may have posted on an electronic bulletin
board on posed in a chat room environment for review prior to the meeting. Ideally list entity
should be capable of being manipulated so that list can combine, entries can be deleted and
addition can be made.

Quality Function Deployment: Quality function deployment is a quality management


technique that translates the needs of the customer in to technical requirement for software. To
accomplish this QFD emphasizes understanding of what is valuable to the customer and deploys
these values throughout the engineering process. QFD identify three types of requirements. –
1. Normal Requirements.
2. Expected Requirements.
3. Exciting Requirements.

E. No: 011120440
Page 12 3/14/2009
OnLineElecronics

2.4 Software/Hardware Requirements..


Software Requirements:
Front End : Asp.Net, C#,HTML,XML,
JScript.

Middle Tier : Xml Web Services

RDBMS : SQL Server 2000

Server : IIS 5.0

Operating System : Windows 2000 Server

Hardware Requirements:
Disc space : 1 GB

Processor : Intel Pentium IV based Processor

Processor speed : 1.13 MHz

Memory : 128 MB RAM

Server : Xeon server 3.6 GHz


for hosting website.

IP Address : Domain Name Registration

2.5 Modeling: We create functional models to gain a better understanding of the actual entity
to be built. When the entity is a physical thing, we can built a model that is identical in form and
shape but smaller in scale. However when the entity to be built is software, our model must take a
different form. It must be capable of representing the information that software transform to
occurrence, and the behavior of the system as the transformation is taking place.
The second and third operational analysis principles require that we build models of function and
behavior.

2.5.1 Functional Modeling: Software transforms information, and in order to accomplish this, it
must perform at least three generic function; input, processing and output .When functional models

E. No: 011120440
Page 13 3/14/2009
OnLineElecronics

of an applications are created, the software engineer focuses on problem specific function. The
functional model begins with a single context level model. Over a series of attractions, more and
more functional detail is provided, until a through delineation of all system functionality is
represented.

2.5.2 Behavioral Modeling: Most software response to events from the outside world. This
stimulus\response characteristic forms the basic of the behavioral model. A computer
programmer always exist in some state\and externally observable mode of behavior that is
changed only when some event occurs.

2.6 Feasibility
Feasibility is the determination of whether or not a project is worth doing. The process followed in
making this determination is called a feasibility study. This type study determines if a project can
and should be taken. Once it has been determined that a project is feasible, the analyst can go
ahead and prepare the project specification which finalizes project requirements. Generally,
feasibility studies are undertaken within tight time constraints and normally culminate in a written
and oral feasibility report. The contents and recommendations of such a study will be used as a
sound basis for deciding whether to proceed, postpone or cancel the project. Thus, since the
feasibility study may lead to the commitment of large resources, it becomes necessary that it
should be conducted competently and that no fundamental errors of judgment are made.
2.6.1 Technical Feasibility: This is concerned with specifying equipment and software
that will successfully satisfy the user requirement. Thetecnical needs of the system may vary
considerably, but might include:
• The facility to produce outputs in a given time.
• Response time under certain conditions.
• Ability to process a certain volume of transaction at a particular speed.
• Facility to communicate data to distant location.

In examining technical feasibility feasibility, configuration of the system is given more


importance than the actual make of hardware. The configuration should give the complete picture
about the system’s requirements: How many workstation’s are required, how these units are

E. No: 011120440
Page 14 3/14/2009
OnLineElecronics

interconnected so that they could operate and communicate smoothly. What speeds of input and
output should be achieved at particular quality of printing. This can be used as a basis for the
tender document against which dealers and manufacturers can later make their equipment bids.
Specific hardware and software products can then be evaluated keeping in view with the logical
needs.
At the feasibility stage, it is desirable that two or three different configurations will be
pursued that satisfy the key technical requirements but which represent different levels of ambition
and cost. Investigation of these technical alternatives can be aided by approaching a range of
suppliers for preliminary discussions. Out of all types of feasibility, technical feasibility generally
is the most difficult to determine.
2.6.2 Operational feasibility: It is mainly related to human organizational and political
aspects. The points to be considered are:
• What changes will be brought with the system?
• What organizational structures are distributed?
• What new skills will be required? Do the existing staff members have these skills?
If not, can they be trained in due course of time?
Generally project will not be rejected simply because of operational infeasibility but such
considerations are likely to critically affect the nature and scope of the eventual recommendations.
This feasibility study is carried out by a small group of people who are familiar with information
system techniques, who understand the parts of the business that are relevant to the project and are
skilled in system analysis and design process.
2.6.3 Economic feasibility: Economic analysis is the most frequently used technique for
evaluating the effectiveness of a proposed system. More commonly known as cost/benefit analysis;
the procedure is to determine the benefits and savings that are expected from a proposed system
and compare them with costs. If benefits outweigh costs, a decision is taken to design and
implemented the system. Otherwise, further justification or alternative in the proposed system will
have to be made if it is to have a chance of being approved. This is an ongoing effort that improves
in accuracy at each phase of the system life cycle.
2.6.3.1 Cost Benefit Analysis: In early days of Computing, software costs constituted a
small percentage of the overall computer-based system cost. An order of magnitude error in

E. No: 011120440
Page 15 3/14/2009
OnLineElecronics

estimates of software cost had relatively little impact. Today, software is the most expensive
element of virtually all computer-based systems. For complex, custom systems, a large cost
estimation error can make the difference between profit and loss. Cost overrun can be disastrous
for developer
Software cost and effort estimation will never be an exact science. Too
many variables=human, technical, environmental, political-can affect the ultimate cost of software
and effort applied to develop it. However, software project estimation can be transformed from a
black art to a series of systematic steps that provide estimates with acceptable risk.
To achieve reliable cost and effort estimates, a number of options arise:
1. Delay estimation until late in the project (obviously, we can achieve 100% accurate
estimates after the project is completed).
2. Base estimates on similar projects that have already been completed.
3. Use relatively simple decomposition techniques to generate project cost and effort
estimates.
4. Use one or more empirical models for software cost and effort estimation.

Estimation of the Project:


Project Size: 2.1 KLOC
Project is small and application oriented, therefore, it will be considered as organic type.
1. Software reliability is high.
2. Product complexity is high.
3. Analysis capability is very high.
4. Programming language expenditure of analysis-low .
5. All other diverse are normal.

Therefore, the effort adjustment factor will be calculated from the table
(EAF) Effort Adjustment Factor= 1.15*1.15*0.71*1.07=1.04
Effort in Man-Month will be calculated from the equation
E=a(KLOC)b * EAF……………………….Eqn.-1
Where a, b are constants and E is total effort in Man-month
Values of a, b will be calculated as a=3.2, b==1.05

E. No: 011120440
Page 16 3/14/2009
OnLineElecronics

E=3.2(2.1 KLOC) 1.05 man-month=6 months


Development time will be calculated from the formula:
D=C(KLOC)d
Hence, D=2.5(2.1)0.38
=2 months.
Thus, manpower cost for project development=6*10=Rs. 60,000/-
I/c other wise expenses, contingent expenses it is Rs. 1,00,000/-

2.6.4 Social feasibility: Social feasibility is a determination of whether a proposed project


will
be acceptable to the people or not. This determination typically examines the portability of the
project being accepted by the group directly affected by the proposed system change.

2.6.5 Management feasibility: It is a determination of whether a proposed project will be


acceptable to management. If management does not accept a project or gives a negligible support
to it, the analyst will tend to view the project as a non-feasible one.

2.6.6 Legal feasibility: Legal feasibility is a determination of whether a proposedinfringes on


known Acts, Status, as well as any pending legislation. Although in some instances the project
might appear sound, on closer investigation it may be found to infringe on several legal areas.

2.6.7 Time feasibility: Time feasibility is a determination of whether a proposed project can be
implemented fully within a stipulated time frame. If a project takes too much time it is likely to be
rejected.

2.7 Software Requirement Specification


System Analysis is the application of the system approach to the study and solution of the
problems using computer-based system. An activity encompasses most of the tasks collectively
called as “Computer System Engineering”. Analysis is a detailed study of the various operation

E. No: 011120440
Page 17 3/14/2009
OnLineElecronics

performed by a system and their relationship within and outside of the system. This involves
gathering information and using structured tool for analysis such as DFD (data flow diagram),
Decision Tree etc. During analysis data are collected on the available files, decision points and
transactions handled by the present system. The fact finding and information gathering for
proposed system is the key part of system analysis. Information is gathered from sources both
internal and external to the organization. The external sources include vendors, supplier
professional journals and other similar systems. The primary internal sources include the system
users, system documentation existing programs, and reports. Analysis is the process of diagnosing
situations, done with a defiant aim, with the system kept in mind to produce a report based on the
findings. Analysis is a fact of finding technique where studies like the system requirement
specifications, boundaries of feasibility analysis and cost benefit analysis are carried out. The
requirements of both the system and the software are document and reviewed with the user.
Requirements analysis is a software engineering task that bridges the gap between system
level requirement engineering and software design. Requirement engineering activities result in the
specification of software’s interface with other system elements, and establish constraints that
software interface with other system elements, and establish constraints that software must meet.
Requirements analysis allows the software engineer to refine domains that will be treated by
software. Requirement analysis provides the software designer with a representation of
information, function, and behavior that can be translated to data, architectural, interface, and
component-level designs. Finally, the requirements specification provides the developer and the
customer with the means to assess quality once software is built.
Software requirements analysis may be divided into five areas of effort:
1. Problem recognition.
2. Evaluation and synthesis.
3. Modeling.
4. Specification.
5. Review.
Initially, the analyst studies the System Specification and the Software Project
Plan. It is important to understand software in a System context and to review the software scope
that was used to generate planning estimates so that problem recognition is ensured. The goal is
recognition of the basic problem elements as perceived by the customer/users.

E. No: 011120440
Page 18 3/14/2009
OnLineElecronics

Problem evaluation and solution synthesis is the next major area of effort for analysis. The
analyst must define all externally observable data objects, evaluated the flow and content of
information, define and elaborate all software function, understand software behavior in the
context of events that affect the system, establish system interface characteristics, and uncover
additional, and uncover additional design constraints. Each of these tasks serves to describe the
problem so that an overall approach or solution may be synthesized.

System

Engineering

Software
requirements
analysis

Software
design

E. No: 011120440
Page 19 3/14/2009
OnLineElecronics

2.7.1

E. No: 011120440
Page 20 3/14/2009
OnLineElecronics

E. No: 011120440
Page 21 3/14/2009
OnLineElecronics

E. No: 011120440
Page 22 3/14/2009
OnLineElecronics

E. No: 011120440
Page 23 3/14/2009
OnLineElecronics

E. No: 011120440
Page 24 3/14/2009
OnLineElecronics

2.8 Entity Relationship Diagram

The object/ relationship pair is the cornerstone of the data model. These pairs can be represented
graphically using the entity/relationship diagram. The ERD was originally proposed by peter Chen
for the design of relational database systems and has been extended by others. A set of primary
components are identified for the ERD: data objects, attributes, relationships, and various type
indicators. The primary purpose of the ERD is to represent data objects and relationships.
Data objects are represented by a labeled rectangle. Relationships are indicating with a
labeled line connecting objects. In some variations of the ERD, the connecting line contains a
diamond that is labeled with the relationship. Connections between data objects and relationships
are established using a variety of special symbols that indicate cardinality and modality.

E. No: 011120440
Page 25 3/14/2009
OnLineElecronics

ER-Diagram

E. No: 011120440
Page 26 3/14/2009
OnLineElecronics

The Attributes of the Entities are:

UserRegistration(userId, password, firstName, lastName, street, state, country, zip,

fax, telephone,email, status,payMode,registrationDate)

CompanyRegistration (companyId, companyName, password, category, address,

telephone, email, securityQuestion, securityAnswer, registrationDate)

BankDetails(bankId, bankName, address, accountholderName, accountNo, chequeNo,

amount)

Buyer(shoppingId, userId, itemId, itemName, itemPrice, itemQuantity, shoppingDate,

companyId)

The different Product Tables are:

Television(itemId, companyId, itemName, firstSecondHand, description, category,

brandName, sizeInInches, marketPrice, discount, warranty, registrationDate, img)

Refrigerators(itemId, companyId, itemName, firstSecondHand, description, category,

brandName, capacityInLiters, marketPrice, discount, warranty, registrationDate, img)

WashingMachine(itemId, companyId, itemName, firstSecondHand, description,

category, brandName, capacityInLiters, marketPrice, discount, warranty,

registrationDate, img)

Airconditioners(itemId, companyId, itemName, firstSecondHand, description,

category, brandName, capacityInTonnes, marketPrice, discount, warranty,

registrationDate, img)

MusicSystem(itemId, companyId, itemName, firstSecondHand, description, category,

brandName, capacityInWatt, compatibilityWith, marketPrice, discount, warranty,

registrationDate, img)

E. No: 011120440
Page 27 3/14/2009
OnLineElecronics

Mixers(itemId, companyId, itemName, firstSecondHand, description, category,

brandName, rotationPerMin, marketPrice, discount, warranty,

registrationDate, img)

Computers(itemId, companyId, itemName, firstSecondHand, description, category,

brandName, configuration, marketPrice, discount, warranty, registrationDate, img)

Cookers(itemId, companyId, itemName, description, category, brandName, capacityInLiters,

marketPrice, discount, warranty, registrationDate, img)

Stoves(itemId, companyId, itemName, description, category, brandName, marketPrice, discount,

warranty, registrationDate, img)

Geysors(itemId, companyId, itemName, description, category, brandName, marketPrice,

discount, warranty, registrationDate, img)

Irons(itemId, companyId, itemName, description, category, brandName, marketPrice, discount,

warranty, registrationDate, img)

SandwitchMakers(itemId, companyId, itemName, description, category, brandName,

capacityInLiters, marketPrice, discount, warranty, registrationDate, img)

BreadToasters(itemId, companyId, itemName, description, category, brandName,

capacityInLiters, marketPrice, discount, warranty, registrationDate, img)

E. No: 011120440
Page 28 3/14/2009
OnLineElecronics

2.9 Software Engineering Paradigm

Sometimes called the classical life cycle or the waterfall model, the linear sequential model
suggests a systematic approach to software development that begins at the system level and
progresses through analysis, design, coding, testing, and maintenance and support. After a
conventional engineering cycle, the linear sequential model encompasses the following activities.

System Requirements
Review & Validation
User Requirement Specifications

Software Requirements
Software Requirements
Review & Validation

Preliminary Design
Review & Validation
Detailed Functional Specifications

Detailed Design Global Implementation Specifications &


Review & Validation Detailed Implementation Specifications

Code and Debugging


Review & Validation Coding & Debugging

Testing
Testing
Review & Validation

Maintenance
Review & Validation Maintenance

E. No: 011120440
Page 29 3/14/2009
OnLineElecronics

CHAPTER-3

E. No: 011120440
Page 30 3/14/2009
OnLineElecronics

2 System Design

3.1 General: System design refers to the technical specification that will be applied in
implementing the candidate system. This involves input/output, file and processing design.
System design is a solution, a “how to” approach to the creation of new system. This important
phase is composed of several steps. It provides the understandings and procedural details
necessary for implementing the system recommended in feasibility study. Emphasis is on
translating the performance requirements into design specifications.
Design goes through logical and physical stages of development. Logical design reviews the
present physical system; prepares input and output specification; makes edit, security, and control
specifications details the implementation plan; and prepares a logical design walkthrough. The
physical design means out the details of the physical system, plans the system implementation,
devises a test and implementation plan, and specifies any new H/W or S/W.
The design phase focus on the detail implementation of the system recommended in the
feasibility study emphasis is on translating performance specifications into design specifications.
The design phase is a transition from a user-oriented document (system proposal) to a document
oriented to the programmers or database personal.
System design goes through two phases of development: Logical and physical design. A data flow
diagram shows the logical flow of the system and defines the boundaries of the system. For a
candidate systems it describe the inputs (source), outputs (destination), databases (data store), and
procedures (data flows).
In the logical system design it specify the user needs at a level of detail that virtually
determines the information flow into and out of the system and the required data resources. The
design covers the following:
Reviews the current physical system- its data flows, file contain, volumes, frequencies, etc.
Prepare output specifications- that is determines the formats content, and frequency of
report, including terminal specification and locations.
Prepare input specification-formats content, and most of the input functions. This includes
determining the flow of the document from input data stores to the actual input locations.
Prepare edit, security, and control specifications- This includes specifying the rules for edit
correction, backup procedures and the controls that insure processing and file integrity.

E. No: 011120440
Page 31 3/14/2009
OnLineElecronics

Specify the implementation plan.


Prepare a logical design walkthrough- involves the information flow output, inputs controls, and
implementation plan.

3.2 Reviews benefits, costs target dates, and System constraints:


Several development activities are carried out during structured design. They are data base design,
implementation planning, system test preparation, and system interface specification and user
documentation.
3.2.1 Data base design: This activity deals with the design of the physical database. A
key is to determine how the access paths are to be implemented. A physical path is derived from
logical paths.
3.2.2 Program design: In conjunction with the database design is a decision on
programming language to be used and the flowcharting, coding, and debugging procedure prior to
conversion.
3.2.3 System and programs test preparation: Each aspect of the system has separate
test requirement. System testing is done after all programming and testing is completed. The test
cases cover every aspect of the candidate system actual operations, user interface and so on.
3.2.4 System interface specification: This phase specifies for the user how information
should enter and leave the system.

3.3 Design of Modules

3.3.1 : Registration module, which is further sub-divided into two sub- sections:

3.3.1.1 Company Registration: - This is when client i.e. Company visits this site for the
first time. As already discussed earlier Company has to register themselves. This is a
Company registration form where users have to fill up information like his Company name,
address, Email, Tel, Fax, secret question, secret answer etc along with companyId and
password.
We have to test his companyId before registering him, as companyId, which he is
choosing, should not exist in database. CompanyId is a primary key and should be unique.

E. No: 011120440
Page 32 3/14/2009
OnLineElecronics

We have to make connection with the database and check whether companyId already exist
or not. If it exists in database then we have to open the same registration again with all the
filled up fields like his Company name, address, email, secret question, secret answer etc.
else if companyId does not exists in the database, we have to open Bank form. In the Bank
form we take all the details of the company bank account and various others which are
required and then ultimately they get registered.

3.3.1.2 User Registration: - This is the form when client i.e. User visit this site for the first
time. As already discussed earlier User has to register them selves. This is a User
Registration form where user has to fill up information like his username, address, email,
Telephone, fax, secret Question, secret Answer etc along with userId and password.
We have to test his userId before registering him as userId which he is choosing
should not exist in database. UserId is a primary key and should be unique. We have to
make connection with the database and check whether userId already exist or not. If it exist
in data base then we have to open the same registration again with all the filled up fields
like his Company name , address, email , secret question , secret answer etc. else if userId
does not exit in data base we have to open User Introduction form.

3.3.2 : Administration section, which is further sub-divided into three sub- sections:

3.3.2.1 Login verification/Authentication: - In this module we are checking the


authenticity of the person who is using this application. Person who is using this
application should enter correct userId / companyId and password to authenticate him self.
Hence first form that opens up is a Introduction form/ Homepage, where we take
input from the user of this software i.e. userId/companyId and password then we check this
input from our database, if it is correct then we open User Introduction form or the
Company Introduction form as per the login. If the userId/companyId or the password is
incorrect then a message is being displayed.

E. No: 011120440
Page 33 3/14/2009
OnLineElecronics

3.3.2.2 Forget Password: - By this module user can get his password if he has forgotten
his password. For this particular purpose user first has to enter his User Id and we have to
verify his ID i.e. whether he is a member or not. If he is not a member then we have to
redirect him back to Forget password form else we have to ask his/her Secret Question.
He/She has to enter correct Secret Answer to confirm his Password.
If he enters wrong Secret Answer then we have to again redirect him back to Forget
Password form else we display his Password.

3.3.2.3 Change Password: - By this module user can change his password from old
password to new password. He has to enter some information like User Id, old Password,
and new Password and reconfirm password.
Then we have to first verify that new password and reconfirm password matches, If
it does not matches then we have to send user back to change password form else if it
matches then we have to check whether he is a member or not.
This is done through verifying UserId/companyId and Old password if they matches
with our data base then it means he is a member other wise not. If he is not a member then
again we redirect him back to Change password form with an error message else if he is a
member we will change his Old Password to New Password and confirm him the New
Password.

3.3.3 :Maintaining Company section, which is further sub-divided into three sub sections:

3.3.3.1 Product Registration: - In this particular unit the registered companies can register for
new products. The companies have to fill up the bank details i.e. have to pay some amount for the
registration of the products.

3.3.3.2 Product Updation: - In this sub module the companies have the facility to modify some
flexible attributes of products which varies with time. They first have to select the product
(category) and the ItemId for which they want to update. If the ItemId is a valid one then they are
permitted to update. The companies have got the right to change the discount, description, market
price and date of updating.

E. No: 011120440
Page 34 3/14/2009
OnLineElecronics

3.3.3.3 Company Status: - This particular module has got the right to view the product details
and the order details. When companies want to view the product details they just have to select the
particular product and click on the ‘Go’ button.
When they want to view the various customers who have placed their orders to them, then
they just have to select the particular shoppingId and click on the ‘Go’ button .This will list out all
the users who have made a deal with that particular company.

3.3.4 : Maintaining User section, which is further sub-divided into three sub-sections: -

3.3.4.1 Order Registration/My Shopping: - In this particular sub section of the module user can
purchase variety of products. As soon as user opens this page a unique shoppingId is being
generated which will identify the users uniquely.
Then the user has to select the category for which he/she has to do the shopping. After
selecting the category the list of all itemId’s are displayed which has been registered by different
companies for this particular category. Then the user can view the details of different items by
selecting the item which is displayed. He can purchase the item which suits him.

3.3.4.2 Order Updation: - By this module person can update his previous shopping. In
update form he has to enter his ShoppingId and itemId. The program will then verify
weather he/she has entered right shoppingId and itemId or not. If the id is wrong then we
will display error message else if id is right he can drop his order or update by changing the
number of quantity purchased but this could only be possible if the purchase date has not
crossed a day (24 hours).

3.3.4.3 User Status: - My Status will display the status of the User. Last link in this
module is my status. This module will show the status of the User i.e.

• How many products have been purchased by the User?


• Name of different products.
• ItemId of different products registered by the User.

E. No: 011120440
Page 35 3/14/2009
OnLineElecronics

• Total Price.
• Date of purchase.
• The name of the company of which he/she has placed an order.
• Current Status – what is the status of product i.e. whether dispatch has been done or
not.

E. No: 011120440
Page 36 3/14/2009
OnLineElecronics

3.4

E. No: 011120440
Page 37 3/14/2009
OnLineElecronics

E. No: 011120440
Page 38 3/14/2009
OnLineElecronics

E. No: 011120440
Page 39 3/14/2009
OnLineElecronics

E. No: 011120440
Page 40 3/14/2009
OnLineElecronics

E. No: 011120440
Page 41 3/14/2009
OnLineElecronics

E. No: 011120440
Page 42 3/14/2009
OnLineElecronics

E. No: 011120440
Page 43 3/14/2009
OnLineElecronics

E. No: 011120440
Page 44 3/14/2009
OnLineElecronics

E. No: 011120440
Page 45 3/14/2009
OnLineElecronics

E. No: 011120440
Page 46 3/14/2009
OnLineElecronics

Physical and Logical Design

Logical Design: The DFD shows the logical flow of system. It describes the inputs(sources),
outputs(destinations), databases(data stores), and procedures(data flows). Based on this, the logical
system design made which specify the user needs at a level of details that virtually determine the
information flow into and out of system and required data resources. Thus it consists of design of
input, output specifications (formats, contents), files, control specifications and implementation.
Physical Design: Following logical design is physical design. This produces the working
system by defining the design specifications that tell programmers exactly what the candidate
system must do. Thus the physical system design consists of specifying input/output media,
physical storage, design of data structures and data bases and specifying backup procedures.

Table Structures:

CompanyRegistration
Column Name Data Type Length Allow Nulls
companyId Varchar 15 No
companyName Varchar 25 No
Password Varchar 25 No
Category Varchar 15 No
Address varchar 50 No
Telephone Varchar 15 No
No Email Varchar 50 No
securityQuestion Varchar 50 No
securityAnswer Varchar 50 No
registrationDate Datetime 8 No

UserRegistration
Column Name Data Type Length Allow Nulls
userId Varchar 15 No

E. No: 011120440
Page 47 3/14/2009
OnLineElecronics

Password Varchar 25 No
firstName Varchar 15 No
lastName Varchar 15 No
Street Varchar 25 No
State Varchar 25 No
Country Varchar 25 No
Zip Varchar 10 No
Fax Varchar 15 No
Telephone Varchar 15 No
Email Varchar 50 No
securityQuestion Varchar 50 No
securityAnswer Varchar 50 No
Status Varchar 15 No
payMode Varchar 15 No
registrationDate Datetime 8 No

BankDetails
Column Name Data Type Length Allow Nulls
bankId Varchar 15 No
bankName Varchar 25 No
Address Varchar 25 No
accountHolderName Varchar 25 No
accountNo Varchar 20 No
chequeDDNo Varchar 20 No
Amount numeric 5 No

Buyer
Column Name Data Type Length Allow Nulls
shoppingId Varchar 15 No
userId Varchar 15 No
itemId Varchar 15 No
itemName Varchar 25 No
itemPrice Numeric 5 No
itemQuantity Numeric 5 No
shoppingDate Datetime 8 No
companyId Varchar 15 No

AirConditioners
Column Name Data Type Length Allow Nulls

E. No: 011120440
Page 48 3/14/2009
OnLineElecronics

itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand Varchar 10 No
Description Varchar 200 No
Category Varchar 15 No
brandName Varchar 15 No
capacityInTonnes Numeric 5 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty Varchar 15 No
registrationDate Datetime 8 No
Img varchar 100 Yes

BreadToasters
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty Numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Computers
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand Varchar 10 No
Location varchar 15 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
Configuration Varchar 250 No
E. No: 011120440
Page 49 3/14/2009
OnLineElecronics

marketPrice Numeric 5 No
Discount Numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Cookers

Column Name Data Type Length Allow Nulls


itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
capacityInLitres numeric 5 No
marketPrice Numeric 5 No
Discount Numeric 5 No
warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Geysors
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
marketPrice Numeric 5 No
Discount Numeric 5 No
warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Irons
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
Description Varchar 50 No
Category Varchar 15 No
E. No: 011120440
Page 50 3/14/2009
OnLineElecronics

brandName Varchar 15 No
marketPrice Numeric 5 No
Discount Numeric 5 No
warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Mixers
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand varchar 10 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
rotaionPerMin numeric 5 No
capacityInWatt numeric 5 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

MusicSystem
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand varchar 10 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
capacityInWatt numeric 5 No
compatibiltyWith varchar 100 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Refrigerator

E. No: 011120440
Page 51 3/14/2009
OnLineElecronics

Column Name Data Type Length Allow Nulls


itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand varchar 10 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
capacityInLitres numeric 5 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

SandWitchMakers

Column Name Data Type Length Allow Nulls


itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

Stoves
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No

E. No: 011120440
Page 52 3/14/2009
OnLineElecronics

Img Varchar 100 Yes

Television
Column Name Data Type Length Allow Nulls
itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand varchar 10 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
sizeInInches numeric 5 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

WashingMachine

Column Name Data Type Length Allow Nulls


itemId Varchar 15 No
companyId Varchar 15 No
itemName Varchar 25 No
firstSecondHand varchar 10 No
Description Varchar 50 No
Category Varchar 15 No
brandName Varchar 15 No
capacityInLitres numeric 5 No
marketPrice Numeric 5 No
Discount Numeric 5 No
Warranty numeric 5 No
registrationDate Datetime 8 No
Img Varchar 100 Yes

For Various modules logical and physical design made is exhibited in the following section:
1. Registration Module

a.) Registration of Company


Logical design:

E. No: 011120440
Page 53 3/14/2009
OnLineElecronics

companyId: up to 15 char
companyId:
companyName: up to 25 char
companyName:
password: up to 25 char
password:
category: up to 15 char
category:
address: up to 50 char
address:
telephone: up to 15 char
telephone:
email: up to 50 char
email:
securityQuestion: up to 50 char
securityQuestion:
securityAnswer: up to 50 char
securityAnswer:
registrationDate 8 char
registrationDate:

Physical Design:
Input Media: Keyboard Storage: Disk

companyId: max 15 char Not Null


companyName: max to 25 char Not Null
password: max 25 char Not Null
category: max 15 char Not Null
address: max 50 char Not Null
telephone: max 15 char Not Null
email: max 50 char Not Null
securityQuestion: max 50 char Not Null
securityAnswer: max 50 char Not Null
registrationDate: 8 chars Not Null

E. No: 011120440
Page 54 3/14/2009
OnLineElecronics

Bank Form

Logical Design:

bankId:
bankId: up to 15 char bankName:
bankName: up to 25 char address:
address: up to 25 char accountHolderName:
accountHolderName: up to 25 char accountNo:
accountNo: up to 20 char chequeDDNo:
chequeDDNo: up to 20 char amount:
amount: up to 5 numeric char.

Physical Design:
Input Media: Keyboard Storage: Disk

bankId: max 15 char Not Null


bankName: max 25 char Not Null

address: max 25 char Not Null


accountHolderName: max 25 char Not Null
accountNo: max 20 char Not Null
chequeDDNo: max 20 char Not Null
amount: max 5 numeric char. Not Null

E. No: 011120440
Page 55 3/14/2009
OnLineElecronics

Company
Introduction
Form

b.) Registration of User

Logical design:
userId: up to 15 char
userId:
password: up to 25 char
password:
firstName: up to 15 char firstName:
lastName:
lastName: up to 15 char
street:
street: up to 25 char state:
country:
state: up to 25 char
zip:
country: up to 25 char fax:
telephone:
zip: up to 10 char
email:
fax: up to 15 char securityQuestion:
securityAnswer:
telephone: up to 15 char
status:
email: up to 50 char payMode:
registrationDate

securityQuestion: up to 50 char
securityAnswer: up to 50 char
status: up to 15 char
payMode: up to 15 char
registrationDate 8 char

Physical Design:
Input Media: Keyboard Storage: Disk

E. No: 011120440
Page 56 3/14/2009
OnLineElecronics

userId: max 15 char Not Null


password: max 25 char Not Null
firstName: max 15 char Not Null
lastName: max 15 char Not Null
street: max 25 char Not Null
state: max 25 char Not Null
country: max 25 char Not Null
zip: max 10 char Not Null
fax: max 15 char Not Null
telephone: max 15 char Not Null
email: max 50 char Not Null
securityQuestion: max 50 char Not Null
securityAnswer: max 50 char Not Null
status: max 15 char Not Null
payMode: max 15 char Not Null
registrationDate 8 char Not Null

User
Introduction
Form
2. Administration Module:
a.)Login verification/Authentication :
i)Company Authentication:

Logical Design:
companyId: up to 15 char
password: up to 25 char

E. No: 011120440
Page 57 3/14/2009
OnLineElecronics

companyId:

password:

Physical Design:

Input Media: Keyboard Storage: Disk


companyId: max 15 char Not null
password: max 25 char Not Null

Company
Introduction
Form
ii)User Authentication:
Logical Design:
userId: up to 15 char
password: up to 25 char

userId:

password:

E. No: 011120440
Page 58 3/14/2009
OnLineElecronics

Physical Design:

userId: max 15 char Not Null


password: max 25 char Not Null

User
Introduction
Form

b.) Forget Password:


i.) Company
Logical Design
companyId: up to 15 char
securityQuestion: up to 50 char
securityAnswer: up to 50 char

companyId:

securityQuestion:

securityAnswer:

Physical Design
companyId: max 15 char Not Null
securityQuestion: max 50 char Not Null
securityAnswer: max 50 char Not Null

If valid :
securityAnswer then:
Password Retrieved E. No: 011120440
Page 59 3/14/2009
OnLineElecronics

ii.) User
Logical Design
userId: up to 15 char
securityQuestion: up to 50 char
securityAnswer: up to 50 char

userId:

securityQuestion:

securityAnswer:

Physical Design
userId: max 15 char Not Null
securityQuestion: max 50 char Not Null
securityAnswer: max 50 char Not Null

If valid :
securityAnswer then:
Password Retrieved
c.) Change Password:

i.) Company
Logical Design
companyId: up to 15 char
Old Password: up to 25 char
New Password: up to 25 char

E. No: 011120440
Page 60 3/14/2009
OnLineElecronics

companyId:

Old Password:

New Password:

Physical Design
companyId: max 15 char Not Null
Old Password: max 25 char Not Null
New Password: max 25 char Not Null

If valid :
Old Password then:
Password Updated

ii.) User

Logical Design
userId: up to 15 char
Old Password: up to 25 char
New Password: up to 25 char

userId:

Old Password:

New Password:

Physical Design

E. No: 011120440
Page 61 3/14/2009
OnLineElecronics

userId: max 15 char Not Null


Old Password: max 25 char Not Null
New Password: max 25 char Not Null

If valid :
Old Password then:
Password Updated

3. Maintaining Company Section Module:


a.) Product Registration:
b.) Product Updation:
c.) Company Status:
4. Maintaining Company Section Module:
a.) Order Registration.
b.) Order Updation.
c.) User Status.

E. No: 011120440
Page 62 3/14/2009
OnLineElecronics

E. No: 011120440
Page 63 3/14/2009
OnLineElecronics

E. No: 011120440
Page 64 3/14/2009
OnLineElecronics

E. No: 011120440
Page 65 3/14/2009
OnLineElecronics

E. No: 011120440
Page 66 3/14/2009
OnLineElecronics

E. No: 011120440
Page 67 3/14/2009
OnLineElecronics

E. No: 011120440
Page 68 3/14/2009
OnLineElecronics

E. No: 011120440
Page 69 3/14/2009
OnLineElecronics

E. No: 011120440
Page 70 3/14/2009
OnLineElecronics

E. No: 011120440
Page 71 3/14/2009
OnLineElecronics

E. No: 011120440
Page 72 3/14/2009
OnLineElecronics

E. No: 011120440
Page 73 3/14/2009
OnLineElecronics

E. No: 011120440
Page 74 3/14/2009
OnLineElecronics

E. No: 011120440
Page 75 3/14/2009
OnLineElecronics

E. No: 011120440
Page 76 3/14/2009
OnLineElecronics

E. No: 011120440
Page 77 3/14/2009
OnLineElecronics

E. No: 011120440
Page 78 3/14/2009
OnLineElecronics

E. No: 011120440
Page 79 3/14/2009
OnLineElecronics

E. No: 011120440
Page 80 3/14/2009
OnLineElecronics

E. No: 011120440
Page 81 3/14/2009
OnLineElecronics

E. No: 011120440
Page 82 3/14/2009
OnLineElecronics

CHAPTER-4

E. No: 011120440
Page 83 3/14/2009
OnLineElecronics

4.1 frmHomePage
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmHomePage : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Panel pnlDesc;
protected System.Web.UI.WebControls.Label lblNewSignUp;
protected System.Web.UI.WebControls.Label lblExtLogon;
protected System.Web.UI.WebControls.AdRotator AdRotator;
protected System.Web.UI.WebControls.Image Image4;
protected System.Web.UI.WebControls.Label lblLogin;
protected System.Web.UI.WebControls.Label lblUser;
protected System.Web.UI.WebControls.Label lblPassword;
protected System.Web.UI.WebControls.TextBox txtUserID;
protected System.Web.UI.WebControls.TextBox txtPassword;
protected System.Web.UI.WebControls.Button cmdLogon;
protected System.Web.UI.WebControls.Button cmdNewUser;
protected System.Web.UI.WebControls.Button cmdNewCompany;
protected System.Web.UI.WebControls.Panel pnlLogin;
protected System.Web.UI.WebControls.Panel pnlExistingLogon;
protected System.Web.UI.WebControls.Panel pnlNewLogon;
protected System.Web.UI.WebControls.Button cmdCompany;
protected System.Web.UI.WebControls.Button cmdUser;
protected System.Web.UI.WebControls.Button cmdForgotPassword;
protected System.Web.UI.WebControls.Button cmdChangePassword;
protected System.Web.UI.WebControls.Image projectTitle;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


protected System.Web.UI.WebControls.Label lblMessage;
static string flag;

private void Page_Load(object sender, System.EventArgs e)


{
pnlLogin.Visible=false;
lblLogin.Visible=false;
lblUser.Visible=false;
lblPassword.Visible=false;
txtUserID.Visible=false;
txtPassword.Visible=false;
cmdLogon.Visible=false;

E. No: 011120440
Page 84 3/14/2009
OnLineElecronics

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdChangePassword.Click += new
System.EventHandler(this.cmdChangePassword_Click);
this.cmdForgotPassword.Click += new
System.EventHandler(this.cmdForgotPassword_Click);
this.cmdUser.Click += new
System.EventHandler(this.cmdUser_Click);
this.cmdCompany.Click += new
System.EventHandler(this.cmdCompany_Click);
this.cmdNewCompany.Click += new
System.EventHandler(this.cmdNewCompany_Click);
this.cmdNewUser.Click += new
System.EventHandler(this.cmdNewUser_Click);
this.cmdLogon.Click += new
System.EventHandler(this.cmdLogon_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void cmdNewUser_Click(object sender, System.EventArgs e)


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

private void cmdNewCompany_Click(object sender, System.EventArgs e)


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

private void cmdUser_Click(object sender, System.EventArgs e)


{
pnlLogin.Visible=true;
lblLogin.Visible=true;
lblUser.Visible=true;
lblPassword.Visible=true;
txtUserID.Visible=true;
txtPassword.Visible=true;
cmdLogon.Visible=true;
lblUser.Text="UserId";
flag="User";
}

private void cmdCompany_Click(object sender, System.EventArgs e)


{
pnlLogin.Visible=true;
lblLogin.Visible=true;
lblUser.Visible=true;

E. No: 011120440
Page 85 3/14/2009
OnLineElecronics

lblPassword.Visible=true;
txtUserID.Visible=true;
txtPassword.Visible=true;
cmdLogon.Visible=true;

lblUser.Text="CompanyId";
flag="Company";
}

private void cmdForgotPassword_Click(object sender,


System.EventArgs e)
{
Response.Redirect("frmForgetPassword.aspx");
}

private void cmdChangePassword_Click(object sender,


System.EventArgs e)
{
Response.Redirect("frmChangePassword.aspx");
}

private void cmdLogon_Click(object sender, System.EventArgs e)


{
bool IdPresent=false;
SqlConnection co=conx.con;

if(flag=="User")
{
Session["userid"]=txtUserID.Text;
SqlCommand cmdSearch=new SqlCommand("select
userId,password from UserRegistration where
userId=@userid AND password=@password",co);

cmdSearch.Parameters.Add("@userId",txtUserID.Text);
cmdSearch.Parameters.Add("@password",txtPassword.Text);

co.Open();
SqlDataReader dr;
dr=cmdSearch.ExecuteReader();
if(dr.Read())
{
IdPresent=true;
}
else
{
IdPresent=false;
}
dr.Close();
co.Close();

if(IdPresent==true)
{
Response.Redirect("frmUserIntroduction.aspx");
}
else
{
lblMessage.Text="Invalid UserId and Password";

E. No: 011120440
Page 86 3/14/2009
OnLineElecronics

}
}
if(flag=="Company")
{
Session["companyid"]=txtUserID.Text;
SqlCommand cmdSearch=new SqlCommand("select
companyId,password from CompanyRegistration where
companyId=@companyid AND password=@password",co);

cmdSearch.Parameters.Add("@companyId",txtUserID.Text);
cmdSearch.Parameters.Add("@password",txtPassword.Text);

co.Open();
SqlDataReader dr;
dr=cmdSearch.ExecuteReader();
if(dr.Read())
{
IdPresent=true;
}
else
{
IdPresent=false;
}
dr.Close();
co.Close();

if(IdPresent==true)
{
Response.Redirect("frmCompanyIntroduction.aspx");
}
else
{
lblMessage.Text="Invalid CompanyId and Password";

}
}
}
}
}

4.2 frmUserRegistration

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

E. No: 011120440
Page 87 3/14/2009
OnLineElecronics

namespace AnilElectronicsSite
{
public class frmUserRegistration : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button cmdSubmit;
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.TextBox txtFax;
protected System.Web.UI.WebControls.TextBox txtTelephone;
protected System.Web.UI.WebControls.TextBox txtEmail;
protected System.Web.UI.WebControls.DropDownList
ddlistSecurityQuestion;
protected System.Web.UI.WebControls.TextBox txtSecurityAnswer;
protected System.Web.UI.WebControls.TextBox txtPayMode;
protected System.Web.UI.WebControls.TextBox txtStatus;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblStatus;
protected System.Web.UI.WebControls.Label lblPayMode;
protected System.Web.UI.WebControls.Label lblSecurityAnswer;
protected System.Web.UI.WebControls.Label lblSecurityQuestion;
protected System.Web.UI.WebControls.Label lblEmail;
protected System.Web.UI.WebControls.Label lblTelephone;
protected System.Web.UI.WebControls.Label lblFax;
protected System.Web.UI.WebControls.TextBox txtUserID;
protected System.Web.UI.WebControls.TextBox txtPassword;
protected System.Web.UI.WebControls.TextBox txtFirstName;
protected System.Web.UI.WebControls.TextBox txtLastName;
protected System.Web.UI.WebControls.TextBox txtStreet;
protected System.Web.UI.WebControls.TextBox txtState;
protected System.Web.UI.WebControls.TextBox txtCountry;
protected System.Web.UI.WebControls.TextBox txtZip;
protected System.Web.UI.WebControls.Label lblZip;
protected System.Web.UI.WebControls.Label lblCountry;
protected System.Web.UI.WebControls.Label lblState;
protected System.Web.UI.WebControls.Label lblStreet;
protected System.Web.UI.WebControls.Label lblLastName;
protected System.Web.UI.WebControls.Label lblFirstName;
protected System.Web.UI.WebControls.Label lblPassword;
protected System.Web.UI.WebControls.Label lblUserID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label Label1;
clsShopping.ClsShopping conObj=new clsShopping.ClsShopping();

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdSubmit.Click += new
System.EventHandler(this.cmdSubmit_Click);

E. No: 011120440
Page 88 3/14/2009
OnLineElecronics

this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void cmdSubmit_Click(object sender, System.EventArgs e)


{
SqlConnection co=conObj.con;

if(txtUserID.Text==""||txtPassword.Text==""||txtFirstName.Tex
t==""|| txtLastName.Text==""||txtStreet.Text==""||
txtCountry.Text==""||txtZip.Text==""||txtFax.Text==""||txtTel
ephone.Text==""||txtEmail.Text==""||txtSecurityAnswer.Text=="
"||txtPayMode.Text==""||txtDate.Text=="")
{
lblMessage.Text="Fill up all the User Details";
}
else
{
SqlCommand cmdCheck=new SqlCommand("select userId from
UserRegistration where userId=@userid",co);

cmdCheck.Parameters.Add("@userid",txtUserID.Text);
co.Open();
SqlDataReader dr;
try
{
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="This Particular User has
already been registered";
}
else
{
co.Close();
SqlCommand cmdInsertUser=new
SqlCommand("insert into UserRegistration
values(@userid,@password,@first
name,@lastname,@street,@state,@
country,@zip,@fax,@telephone,@e
mail,@securityquestion,@securit
yanswer,@paymode,@status,@date)
",co);

cmdInsertUser.Parameters.Add("@userid",txtU
serID.Text);

cmdInsertUser.Parameters.Add("@password",tx
tPassword.Text );

cmdInsertUser.Parameters.Add("@firstname",t
xtFirstName.Text );

cmdInsertUser.Parameters.Add("@lastname",tx
tLastName.Text );

E. No: 011120440
Page 89 3/14/2009
OnLineElecronics

cmdInsertUser.Parameters.Add("@street",txtS
treet.Text );

cmdInsertUser.Parameters.Add("@state",
txtState.Text );

cmdInsertUser.Parameters.Add("@country",
txtCountry.Text );

cmdInsertUser.Parameters.Add("@zip",
txtZip.Text );

cmdInsertUser.Parameters.Add("@fax",
txtFax.Text );

cmdInsertUser.Parameters.Add("@telephone",
txtTelephone.Text );

cmdInsertUser.Parameters.Add("@email",
txtEmail.Text );

cmdInsertUser.Parameters.Add("@securityques
tion", ddlistSecurityQuestion.S
electedItem.ToString());

cmdInsertUser.Parameters.Add("@securityans
wer", txtSecurityAnswer.Text );

cmdInsertUser.Parameters.Add("@paymode",
txtPayMode.Text );

cmdInsertUser.Parameters.Add("@status",
txtStatus.Text );

cmdInsertUser.Parameters.Add("@date",
txtDate.Text );

try
{
co.Open();
cmdInsertUser.ExecuteNonQuery();
lblMessage.Text="Values has been
inserted Successfully in the
UserRegistration table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert into
the UserRegistration
table"+ex.Message;
}

E. No: 011120440
Page 90 3/14/2009
OnLineElecronics

}
catch(Exception ex)
{
lblMessage.Text="Cannot read from the data
base"+ex.Message;
}
finally
{
co.Close();
}
}
}
}
}

4.3 frmCompanyRegistration

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{

public class frmCompanyRegistration : System.Web.UI.Page


{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtCompanyName;
protected System.Web.UI.WebControls.TextBox txtPassword;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtAddress;
protected System.Web.UI.WebControls.TextBox txtTelephone;
protected System.Web.UI.WebControls.TextBox txtEmail;
protected System.Web.UI.WebControls.DropDownList
ddlistSecurityQuestion;
protected System.Web.UI.WebControls.TextBox txtSecurityAnswer;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblSecurityAnswer;
protected System.Web.UI.WebControls.Label lblSecurityQuestion;
protected System.Web.UI.WebControls.Label lblEmail;
protected System.Web.UI.WebControls.Label lblTelephone;
protected System.Web.UI.WebControls.Label lblAddress;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.Label lblPassword;
protected System.Web.UI.WebControls.Label lblCompanyName;

E. No: 011120440
Page 91 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Label lblCompanyID;


protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{

Response.Redirect("frmBankingDetails.aspx?companyid="+txtComp
anyID.Text+"&companyname="+txtCompanyName.Text+"&passwo
rd="+txtPassword.Text+"&companycategory="+txtCategory.T
ext+"&address="+txtAddress.Text+"&telephone="+txtTeleph
one.Text+"&email="+txtEmail.Text+"&securityquestion="+d
dlistSecurityQuestion.SelectedItem.ToString()+"&securit
yanswer="+txtSecurityAnswer.Text+"&registrationdate="+t
xtDate.Text+"&companycategory="+"companyRegistration");
}
}
}

4.4 frmUserIntroduction

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmUserIntroduction : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.LinkButton lnkMyStatus;
protected System.Web.UI.WebControls.LinkButton lnkUpdateShopping;

E. No: 011120440
Page 92 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.LinkButton lnkMyShopping;


protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label lblTitle;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.lnkMyShopping.Click += new
System.EventHandler(this.lnkMyShopping_Click);
this.lnkUpdateShopping.Click += new
System.EventHandler(this.lnkUpdateShopping_Click);
this.lnkMyStatus.Click += new
System.EventHandler(this.lnkMyStatus_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void lnkMyShopping_Click(object sender, System.EventArgs e)


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

private void lnkUpdateShopping_Click(object sender,


System.EventArgs e)
{
Response.Redirect("frmUpdateShopping.aspx");
}

private void lnkMyStatus_Click(object sender, System.EventArgs e)


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

4.5 frmMyShopping

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

E. No: 011120440
Page 93 3/14/2009
OnLineElecronics

using System.Data.SqlClient;

namespace AnilElectronicsSite
{

public class frmMyShopping : System.Web.UI.Page


{
protected System.Web.UI.WebControls.Label lblUserId;
protected System.Web.UI.WebControls.Button cmdSubmit;
protected System.Web.UI.WebControls.TextBox txtQuantity;
protected System.Web.UI.WebControls.Label lblQuantity;
protected System.Web.UI.WebControls.DataGrid dgItemID;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.DropDownList ddlistCategory;
protected System.Web.UI.WebControls.TextBox txtShoppingId;
protected System.Web.UI.WebControls.Label lblShoppingId;
protected System.Web.UI.WebControls.Repeater rpt;
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Label lblTitle;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


string shoppingId,tablename;
static string btnText,imagebtn;

private void Page_Load(object sender, System.EventArgs e)


{
Session.Timeout=1;
if(Session["userid"]==null)
{
Response.Redirect("HomePage.aspx");
}

shoppingId=Session["userid"].ToString()+
System.DateTime.Now.ToString();

txtShoppingId.Text=shoppingId;
txtShoppingId.Enabled=false;
txtQuantity.Enabled=false;

// Code to add the fields in the Drop Down List Dynamically.

if(Page.IsPostBack ==false)
{
ddlistCategory.Items.Add("AirConditioners");
ddlistCategory.Items.Add("BreadToasters");
ddlistCategory.Items.Add("Computers");
ddlistCategory.Items.Add("Cookers");
ddlistCategory.Items.Add("Geysors");
ddlistCategory.Items.Add("Irons");
ddlistCategory.Items.Add("Mixers");
ddlistCategory.Items.Add("MusicSystem");
ddlistCategory.Items.Add("Refrigerator");
ddlistCategory.Items.Add("SandWitchMakers");
ddlistCategory.Items.Add("Stoves");
ddlistCategory.Items.Add("Television");
ddlistCategory.Items.Add("WashingMachine");

E. No: 011120440
Page 94 3/14/2009
OnLineElecronics

}
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.rpt.ItemCommand += new
System.Web.UI.WebControls.RepeaterCommandEventHan
dler(this.rpt_ItemCommand);
this.cmdSubmit.Click += new
System.EventHandler(this.cmdSubmit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

void bindrpt(string tablename)


{
tablename=ddlistCategory.SelectedItem.Value.ToString();
SqlConnection co=conx.con;
SqlCommand cmd=new SqlCommand("select * from
"+tablename+"",co);
co.Open();
rpt.DataSource=cmd.ExecuteReader();
rpt.DataBind();
co.Close();
}

private void cmdGo_Click(object sender, System.EventArgs e)


{
bindrpt(ddlistCategory.SelectedItem.Value.ToString());
//bindrptimage(ddlistCategory.SelectedItem.Value.ToString());
txtQuantity.Enabled=true;
txtQuantity.Text="";
}

private void rpt_ItemCommand(object source,


System.Web.UI.WebControls.RepeaterCommandEventArgs e)
{
txtQuantity.Enabled=true;
SqlConnection co=conx.con;
tablename=ddlistCategory.SelectedItem.Value.ToString();

if(e.CommandName=="x")
{
LinkButton button=(LinkButton)e.CommandSource;
btnText=button.Text;
SqlDataAdapter adpInsert=new SqlDataAdapter("select *
from "+tablename+" where itemId=@itemid",co);

E. No: 011120440
Page 95 3/14/2009
OnLineElecronics

adpInsert.SelectCommand.Parameters.Add("@itemid",btnTex
t);

DataSet ds=new DataSet();


co.Open();
adpInsert.Fill(ds,tablename);
dgItemID.DataSource=ds.Tables[tablename];
dgItemID.DataBind();
co.Close();
}
}

private void cmdSubmit_Click(object sender, System.EventArgs e)


{

if(txtQuantity.Text=="")
{
lblQuantity.Width=500;
lblQuantity.Text="Please fill up your Quantity";
txtQuantity.Enabled=true;
}
else
{

Response.Redirect("ShoppingCardFrm.aspx?shoppingid
="+txtShoppingId.Text+"&userid="+Session["userid"].ToSt
ring()+"&itemid="+btnText+"&shoppingdate="+System.DateT
ime.Now.ToString()+"&quantity="+txtQuantity.Text+"&tabl
enames="+ddlistCategory.SelectedItem.Value.ToString());
}
}
}
}

4.6 frmShoppingCard

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace OnLineShopping
{
public class ShoppingCardFrm : System.Web.UI.Page

E. No: 011120440
Page 96 3/14/2009
OnLineElecronics

{
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.Label Label5;
protected System.Web.UI.WebControls.Label Label6;
protected System.Web.UI.WebControls.Label Label7;
protected System.Web.UI.WebControls.Label Label8;
protected System.Web.UI.WebControls.Label Label9;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblShoppingID;
protected System.Web.UI.WebControls.Label lblUserID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblItemPrice;
protected System.Web.UI.WebControls.Label lblItemQuantity;
protected System.Web.UI.WebControls.Label lblShoppingDate;
protected System.Web.UI.WebControls.Button cmdPlaceOrder;
protected System.Web.UI.WebControls.Button cmdRollback;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label11;
protected System.Web.UI.WebControls.Label lblTotalPrice;
protected System.Web.UI.WebControls.Label lblMessage;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


int price,quantity,totalprice;

private void Page_Load(object sender, System.EventArgs e)


{
lblShoppingID.Text=Request.Params["shoppingid"].ToString();
lblUserID.Text=Request.Params["userid"].ToString();
lblItemID.Text=Request.Params["itemid"].ToString();

lblShoppingDate.Text=Request.Params["shoppingdate"].ToString(
);
lblItemQuantity.Text=Request.Params["quantity"].ToString();

string tablenames=Request.Params["tablenames"].ToString();
lblMessage.Text=tablenames;
SqlConnection co=conx.con;

SqlCommand cmdDisplay=new SqlCommand("select


itemName,marketPrice,companyId from "+tablenames+"
where itemId=@itemid",co);

cmdDisplay.Parameters.Add("@itemid",lblItemID.Text);
co.Open();
SqlDataReader dr;
dr=cmdDisplay.ExecuteReader();
if(dr.Read())
{
//lblMessage.Text="Read is Executing";
lblItemName.Text=dr.GetString(0);
lblItemPrice.Text=dr.GetDecimal(1).ToString();
lblCompanyID.Text=dr.GetString(2);
}

E. No: 011120440
Page 97 3/14/2009
OnLineElecronics

dr.Close();
co.Close();

price=Convert.ToInt32(lblItemPrice.Text);
quantity=Convert.ToInt32(lblItemQuantity.Text);
totalprice=price*quantity;
lblTotalPrice.Text=totalprice.ToString();
}
if(tablenames=="AirConditioners"||Computers||Irons||
Television||MusicSystem||WashingMachine)
{
SqlCommand cmdDisplay=new SqlCommand("select
brandname,marketPrice,companyId from "+tablenames+"
where itemId=@itemid",co);

cmdDisplay.Parameters.Add("@itemid",lblItemID.Text);
co.Open();
SqlDataReader dr;
dr=cmdDisplay.ExecuteReader();
if(dr.Read())
{
//lblMessage.Text="Read is Executing";
lblItemName.Text=dr.GetString(0);
lblItemPrice.Text=dr.GetDecimal(1).ToString();
lblCompanyID.Text=dr.GetString(2);
}
dr.Close();
co.Close();

price=Convert.ToInt32(lblItemPrice.Text);
quantity=Convert.ToInt32(lblItemQuantity.Text);
totalprice=price*quantity;
lblTotalPrice.Text=totalprice.ToString();
}
if(tablenames=="BreadToasters||Cooker||Oven||Geysor||Mixers
||Stoves"||SandWitchMakers)
{
SqlCommand cmdDisplay=new SqlCommand("select
title,marketPrice,companyId from "+tablenames+" where
itemId=@itemid",co);

cmdDisplay.Parameters.Add("@itemid",lblItemID.Text);
co.Open();
SqlDataReader dr;
dr=cmdDisplay.ExecuteReader();
if(dr.Read())
{
lblItemName.Text=dr.GetString(0);
lblItemPrice.Text=dr.GetDecimal(1).ToString();
lblCompanyID.Text=dr.GetString(2);
}
dr.Close();
co.Close();

price=Convert.ToInt32(lblItemPrice.Text);
quantity=Convert.ToInt32(lblItemQuantity.Text);
totalprice=price*quantity;

E. No: 011120440
Page 98 3/14/2009
OnLineElecronics

lblTotalPrice.Text=totalprice.ToString();
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdRollback.Click += new
System.EventHandler(this.cmdRollback_Click);
this.cmdPlaceOrder.Click += new
System.EventHandler(this.cmdPlaceOrder_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdPlaceOrder_Click(object sender, System.EventArgs e)


{
int i=0;
SqlConnection co=conx.con;
SqlDataAdapter adpPlaceOrder=new SqlDataAdapter("insert into
Buyer values(@shoppingid,@userid,@itemid,
@itemname,@itemprice,@itemquantity,@shoppingdate,
@companyid)",co);

adpPlaceOrder.SelectCommand.Parameters.Add("
@shoppingid", lblShoppingID.Text );

adpPlaceOrder.SelectCommand.Parameters.Add("
@userid",lblUserID.Text );

adpPlaceOrder.SelectCommand.Parameters.Add("
@itemid",lblItemID.Text );

adpPlaceOrder.SelectCommand.Parameters.Add("
@itemname",lblItemName.Text );

adpPlaceOrder.SelectCommand.Parameters.Add("
@itemprice",totalprice );

adpPlaceOrder.SelectCommand.Parameters.Add("
@itemquantity",lblItemQuantity.Text );

adpPlaceOrder.SelectCommand.Parameters.Add("
@shoppingdate",lblShoppingDate.Text );

adpPlaceOrder.SelectCommand.Parameters.Add("
@companyid",lblCompanyID.Text );

co.Open();

E. No: 011120440
Page 99 3/14/2009
OnLineElecronics

i=adpPlaceOrder.SelectCommand.ExecuteNonQuery();
co.Close();
lblMessage.Text="Order has been sanctioned";
if(i==0)
{
lblMessage.Text="Order has been Roll
backed";
}
}

private void cmdRollback_Click(object sender, System.EventArgs e)


{
lblCompanyID.Text="";
lblItemID.Text="";
lblItemName.Text="";
lblItemPrice.Text="";
lblItemQuantity.Text="";
lblShoppingDate.Text="";
lblShoppingID.Text="";
lblTotalPrice.Text="";
lblUserID.Text="";
}
}
}

4.7. frmUpdateShopping

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmUpdateShopping : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Button cmdUpdate;
protected System.Web.UI.WebControls.Label lblCurrentDate;
protected System.Web.UI.WebControls.Label lblQuantity;
protected System.Web.UI.WebControls.TextBox txtQuantity;
protected System.Web.UI.WebControls.RadioButtonList rbtlistSelect;
protected System.Web.UI.WebControls.Label lblSelect;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblShoppingID;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtShoppingID;

E. No: 011120440
Page 100 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Label lblTitle;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


string shopdate,currentdate;

private void Page_Load(object sender, System.EventArgs e)


{
rbtlistSelect.AutoPostBack=true;
txtQuantity.Enabled=false;
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{

InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.rbtlistSelect.SelectedIndexChanged += new
System.EventHandler(this.rbtlistSelect_SelectedIndexCha
nged);
this.cmdUpdate.Click += new
System.EventHandler(this.cmdUpdate_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion
private void rbtlistSelect_SelectedIndexChanged(object sender,
System.EventArgs e)
{
if(rbtlistSelect.SelectedIndex==0)
{
txtQuantity.Enabled=false;
txtQuantity.Text="";
}
else
{
txtQuantity.Enabled=true;
txtQuantity.Text="";
}
}

private void cmdUpdate_Click(object sender, System.EventArgs e)


{
if(rbtlistSelect.SelectedIndex==1)
{
if(txtQuantity.Text=="")
{
txtQuantity.Enabled=true;
lblMessage.Text="Please fill up the Quantity
field";
}
else

E. No: 011120440
Page 101 3/14/2009
OnLineElecronics

{
lblMessage.Text="";
SqlConnection co=conx.con;
SqlDataAdapter adpUpdate=new SqlDataAdapter
("update Buyer set itemQuantity=@quantity where
shoppingId=@shoppingid AND itemId=@itemid",co);

adpUpdate.SelectCommand.Parameters.Add("
@quantity",txtQuantity.Text );

adpUpdate.SelectCommand.Parameters.Add("
@shoppingid",txtShoppingID.Text );

adpUpdate.SelectCommand.Parameters.Add("
@itemid",txtItemID.Text );

try
{
co.Open();
adpUpdate.SelectCommand.ExecuteNonQuery();

lblMessage.Text="Shopping has been


Updated";
}
catch(Exception)
{
lblMessage.Text="ShoppingID or Item ID is
Incorrect";
}
finally
{
co.Close();
}

}
}
else
{
lblMessage.Text="";
SqlConnection co=conx.con;
SqlDataAdapter adpCheckDate=new SqlDataAdapter("select
shoppingDate from Buyer where
shoppingId=@shoppingid AND
itemId=@itemid",co);

adpCheckDate.SelectCommand.Parameters.Add("
@shoppingid",txtShoppingID.Text );

adpCheckDate.SelectCommand.Parameters.Add("
@itemid",txtItemID.Text );

co.Open();
SqlDataReader dr;
dr=adpCheckDate.SelectCommand.ExecuteReader();
if(dr.Read())
{
shopdate=dr.GetDateTime(0).ToString();

E. No: 011120440
Page 102 3/14/2009
OnLineElecronics

}
co.Close();
lblMessage.Text=shopdate;
currentdate=System.DateTime.Now.ToString();

lblCurrentDate.Text=currentdate;

if(shopdate!=currentdate)
{
SqlDataAdapter adpDelete=new SqlDataAdapter
("delete from Buyer where shoppingId=@shoppingid
AND itemId=@itemid",co);

adpDelete.SelectCommand.Parameters.Add("
@shoppingid",txtShoppingID.Text);

adpDelete.SelectCommand.Parameters.Add("
@itemid",txtItemID.Text);

co.Open();
adpDelete.SelectCommand.ExecuteNonQuery();
co.Close();
lblMessage.Text="Your Shopping has been Rolled
back";
}
else
{
lblMessage.Text="You don't have the Right to
Update: A Day is Over......";
}
}
}
}
}
4.8 frmUserStatus

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{

public class frmUserStatus : System.Web.UI.Page


{
protected System.Web.UI.WebControls.DataGrid dgShoppingDetails;
protected System.Web.UI.WebControls.Label lblShoppingDetails;

E. No: 011120440
Page 103 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Button cmdGo;


protected System.Web.UI.WebControls.DropDownList ddlistShoppingID;
protected System.Web.UI.WebControls.Label lblShoppingID;
protected System.Web.UI.WebControls.Label lblTitle;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();

DataSet ds=new DataSet();

private void Page_Load(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;
SqlDataAdapter adpDisplay=new SqlDataAdapter("select
shoppingId from Buyer",co);

if(Page.IsPostBack==false)
{
co.Open();
SqlDataReader dr;
dr=adpDisplay.SelectCommand.ExecuteReader();
while(dr.Read())
{
ddlistShoppingID.Items.Add(dr.GetString(0));
}
dr.Close();
co.Close();
}
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{

InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
lblShoppingDetails.Text="The Details of the
ShoppingID"+ddlistShoppingID.SelectedItem.V
alue.ToString();

SqlConnection co=conx.con;
SqlDataAdapter adpInsert=new SqlDataAdapter("select * from
Buyer where shoppingId=@shoppingID",co);

E. No: 011120440
Page 104 3/14/2009
OnLineElecronics

adpInsert.SelectCommand.Parameters.Add("@shoppingID",
ddlistShoppingID.SelectedItem.Value.ToString());

adpInsert.Fill(ds,"Buyer");
co.Open();
dgShoppingDetails.DataSource=ds.Tables["Buyer"];
dgShoppingDetails.DataBind();
co.Close();
}
}
}

4.9 frmCompanyIntroduction

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmCompanyIntroduction : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.LinkButton lnkStatus;
protected System.Web.UI.WebControls.LinkButton lnkProdUpdation;
protected System.Web.UI.WebControls.LinkButton lnkProdReg;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label lblTitle;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.lnkProdReg.Click += new
System.EventHandler(this.lnkProdReg_Click);
this.lnkProdUpdation.Click += new
System.EventHandler(this.lnkProdUpdation_Click);
this.lnkStatus.Click += new
System.EventHandler(this.lnkStatus_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

E. No: 011120440
Page 105 3/14/2009
OnLineElecronics

private void lnkProdReg_Click(object sender, System.EventArgs e)


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

private void lnkProdUpdation_Click(object sender, System.EventArgs


e)
{
Response.Redirect("frmProductUpdation.aspx");
}

private void lnkStatus_Click(object sender, System.EventArgs e)


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

4.10 frmProductCategories

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{

public class frmProductCategories1 : System.Web.UI.Page


{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Label lblTitle;
protected System.Web.UI.WebControls.ImageButton
imgbtnAirConditioners;
protected System.Web.UI.WebControls.ImageButton
imgbtnBreadToasters;
protected System.Web.UI.WebControls.ImageButton imgbtnMusicSystem;
protected System.Web.UI.WebControls.ImageButton imgbtnRefrigerator;
protected System.Web.UI.WebControls.ImageButton imgbtnComputer;
protected System.Web.UI.WebControls.ImageButton imgbtnCookers;
protected System.Web.UI.WebControls.ImageButton imgbtnGeysors;
protected System.Web.UI.WebControls.ImageButton imgbtnIrons;
protected System.Web.UI.WebControls.ImageButton imgbtnMixers;
protected System.Web.UI.WebControls.ImageButton imgbtnStoves;
protected System.Web.UI.WebControls.ImageButton imgbtnSandWitch;
protected System.Web.UI.WebControls.ImageButton
imgbtnWashingMachine;
protected System.Web.UI.WebControls.ImageButton imgbtnMobile;

E. No: 011120440
Page 106 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.ImageButton imgbtnTelevision;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.imgbtnAirConditioners.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnAirConditione
rs_Click);

this.imgbtnStoves.Click += new System


.Web.UI.ImageClickEventHandler(this.imgbtnStoves_Click);

this.imgbtnBreadToasters.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnBreadToasters
Click);

this.imgbtnMusicSystem.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnMusicSystem_C
lick);

this.imgbtnSandWitch.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnSandWitch_Cli
ck);

this.imgbtnRefrigerator.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnRefrigerator_
Click);
this.imgbtnTelevision.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnTelevision_Cl
ick);

this.imgbtnWashingMachine.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnWashingMachin
e_Click);

this.imgbtnComputer.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnComputer_Clic
k);

this.imgbtnCookers.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnCookers_Click
);

this.imgbtnGeysors.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnGeysors_Click
);

this.imgbtnIrons.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnIrons_Click);

this.imgbtnMixers.Click += new

E. No: 011120440
Page 107 3/14/2009
OnLineElecronics

System.Web.UI.ImageClickEventHandler(this.imgbtnMixers_Click)
;

this.imgbtnMobile.Click += new
System.Web.UI.ImageClickEventHandler(this.imgbtnMobile_Click)
;

this.Load += new System.EventHandler(this.Page_Load);


}
#endregion

private void imgbtnAirConditioners_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmAirConditioners.aspx");
}

private void imgbtnBreadToasters_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmBreadToasters.aspx");
}

private void imgbtnComputer_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmComputer.aspx");
}

private void imgbtnCookers_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmCookers.aspx");
}

private void imgbtnGeysors_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmGeysors.aspx");
}

private void imgbtnIrons_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmIrons.aspx");
}

private void imgbtnMixers_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmMixers.aspx");
}

private void imgbtnMusicSystem_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmMusicSystem.aspx");

E. No: 011120440
Page 108 3/14/2009
OnLineElecronics

private void imgbtnRefrigerator_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmRefrigerator.aspx");
}

private void imgbtnSandWitch_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmSandWitchMaker.aspx");
}

private void imgbtnStoves_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmStoves.aspx");
}

private void imgbtnTelevision_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmTelevision.aspx");
}

private void imgbtnWashingMachine_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("frmWashingMachine.aspx");
}

private void imgbtnMobile_Click(object sender,


System.Web.UI.ImageClickEventArgs e)
{
Response.Redirect("");
}
}
}

4.11 frmAirConditioners

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{

E. No: 011120440
Page 109 3/14/2009
OnLineElecronics

public class frmAirConditioners1 : System.Web.UI.Page


{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtFirstSecondHand;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblFirstSecondHand;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblCapacityInTonnes;
protected System.Web.UI.WebControls.TextBox txtCapacityInTonnes;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{

if(txtBrandName.Text==""||txtCapacityInTonnes.Text
==""||txtCategory.Text==""||txtCompanyID.Text
==""||txtDate.Text==""||txtDescription.Text==""||txtDis
count.Text==""||txtFirstSecondHand.Text==""||txtImageFi
leName.Text==""||txtItemID.Text==""||txtItemName.Text==
""||txtMarketPrice.Text==""||txtWarranty.Text=="")

E. No: 011120440
Page 110 3/14/2009
OnLineElecronics

{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid=
"+txtItemID.Text+"&companyid="+txtCompanyID.Text+"&item
name="+txtItemName.Text+"&firstsecondhand="+txtFirstSec
ondHand.Text+"&description="+txtDescription.Text+"&prod
uctcategory="+txtCategory.Text+"&brandname="+txtBrandNa
me.Text+"&capacityintonnes="+txtCapacityInTonnes.Text+"
&marketprice="+txtMarketPrice.Text+"&discount="+txtDisc
ount.Text+"&warranty="+txtWarranty.Text+"&registrationd
ate="+txtDate.Text+"&image="+imagepath+"&category="+"Ai
rConditioners");
}
}
}
}

4.12 frmBreadToasters

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmBreadToasters : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;

E. No: 011120440
Page 111 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.TextBox txtItemID;


protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{

if(txtBrandName.Text==""||txtCategory.Text==""
||txtCompanyID.Text==""||txtDate.Text==""||txtDescripti
on.Text==""||txtDiscount.Text==""||txtImageFileName.Tex
t==""||txtItemID.Text==""||txtItemName.Text==""||txtMar
ketPrice.Text==""||txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="
+txtItemID.Text+"&companyid="+txtCompanyID.
Text+"&itemname="+txtItemName.Text+"&descry
ption="+txtDescription.Text+"&productcatego
ry="+txtCategory.Text+"&brandname="+txtBran
dName.Text+"&marketprice="+txtMarketPrice.T
ext+"&discount="+txtDiscount.Text+"&warrant
y="+txtWarranty.Text+"&registrationdate="+t
xtDate.Text+"&image="+imagepath+"&category=
"+"BreadToasters");
}

E. No: 011120440
Page 112 3/14/2009
OnLineElecronics

}
}
}

4.13 frmComputers

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmComputer : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtFirstSecondHand;
protected System.Web.UI.WebControls.TextBox txtLocation;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblLocation;
protected System.Web.UI.WebControls.Label lblFirstSecondHand;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblConfiguration;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.TextBox txtConfiguration;
protected System.Web.UI.WebControls.Label Label1;

E. No: 011120440
Page 113 3/14/2009
OnLineElecronics

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{

if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtFirstSecondHand.Tex
t==""||txtImageFileName.Text==""||txtItemID.Text==""||t
xtItemName.Text==""||txtMarketPrice.Text==""||txtWarran
ty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping\
companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="
+txtItemID.Text+"&companyid="+txtCompanyID.Text+"
&itemname="+txtItemName.Text+"&firstsecondhand="+
txtFirstSecondHand.Text+"&location="+txtLocation.
Text+"&description="+txtDescription.Text+"&produc
tcategory="+txtCategory.Text+"&brandname="+txtBra
ndName.Text+"&configuration="+txtConfiguration.Te
xt+"&marketprice="+txtMarketPrice.Text+"&discount
="+txtDiscount.Text+"&warranty="+txtWarranty.Text
+"&registrationdate="+txtDate.Text+"&image="+imag
epath+"&category="+"Computers");
}
}
}
}

4.14 frmCookers

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;

E. No: 011120440
Page 114 3/14/2009
OnLineElecronics

using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmCookers : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblCapacityInLitres;
protected System.Web.UI.WebControls.TextBox txtCapacityInLitres;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)

E. No: 011120440
Page 115 3/14/2009
OnLineElecronics

if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtImageFileName.Text=
=""||txtItemID.Text==""||txtItemName.Text==""||txtMarke
tPrice.Text==""||txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping\
companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.Text+"&
itemname="+txtItemName.Text+"&description="+txtDe
scription.Text+"&productcategory="+txtCategory.Te
xt+"&brandname="+txtBrandName.Text+"&capacityinli
tres="+txtCapacityInLitres.Text+"&marketprice="+t
xtMarketPrice.Text+"&discount="+txtDiscount.Text+
"&warranty="+txtWarranty.Text+"&registrationdate=
"+txtDate.Text+"&image="+imagepath+"&category="+"
Cookers");
}
}
}
}

4.15 frmGeysors

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmGeysors : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;

E. No: 011120440
Page 116 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.TextBox txtImageFileName;


protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{

if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtImageFileName.Text=
=""||txtItemID.Text==""||txtItemName.Text==""||txtMarke
tPrice.Text==""||txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping\
companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.Text+"&
itemname="+txtItemName.Text+"&description="+txtDe
scription.Text+"&productcategory="+txtCategory.Te

E. No: 011120440
Page 117 3/14/2009
OnLineElecronics

xt+"&brandname="+txtBrandName.Text+"&marketprice=
"+txtMarketPrice.Text+"&discount="+txtDiscount.Te
xt+"&warranty="+txtWarranty.Text+"&registrationda
te="+txtDate.Text+"&image="+imagepath+"&category=
"+"Geysors");
}
}
}
}

4.16 frmIrons

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmIrons : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label Label1;

E. No: 011120440
Page 118 3/14/2009
OnLineElecronics

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtImageFileName.Text=
=""||txtItemID.Text==""||txtItemName.Text==""||txtMarke
tPrice.Text==""||txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping\
companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.Text+"&
itemname="+txtItemName.Text+"&description="+txtDe
scription.Text+"&productcategory="+txtCategory.Te
xt+"&brandname="+txtBrandName.Text+"&marketprice=
"+txtMarketPrice.Text+"&discount="+txtDiscount.Te
xt+"&warranty="+txtWarranty.Text+"&registrationda
te="+txtDate.Text+"&image="+imagepath+"&category=
"+"Irons");
}
}
}
}

4.17 frmMixers

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;

E. No: 011120440
Page 119 3/14/2009
OnLineElecronics

using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmMixers : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblRotationPerMinute;
protected System.Web.UI.WebControls.Label lblCapacityInWatt;
protected System.Web.UI.WebControls.TextBox txtCapacityInWatt;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.TextBox txtRotationPerMinute;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription

E. No: 011120440
Page 120 3/14/2009
OnLineElecronics

.Text==""||txtDiscount.Text==""||txtCapacityInWatt.Text
==""||txtImageFileName.Text==""||txtItemID.Text==""||
txtItemName.Text==""||txtMarketPrice.Text==""||
txtWarranty.Text==""||txtRotationPerMinute.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping\
companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.T
ext+"&itemname="+txtItemName.Text+"&descrip
tion="+txtDescription.Text+"&productcategor
y="+txtCategory.Text+"&brandname="+txtBrand
Name.Text+"&rotationperminute="+txtRotation
PerMinute.Text+"&capacityinwatt="+txtCapaci
tyInWatt.Text+"&marketprice="+txtMarketPric
e.Text+"&discount="+txtDiscount.Text+"&war
anty="+txtWarranty.Text+"&registrationdate=
"+txtDate.Text+"&image="+imagepath+"&catego
ry="+"Mixers");
}
}
}
}
4.18 frmMusicSystem

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmMusicSystem : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;

E. No: 011120440
Page 121 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Label lblDiscount;


protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtFirstSecondHand;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblFirstSecondHand;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.TextBox txtCapacityInWatt;
protected System.Web.UI.WebControls.Label lblCapacityInWatt;
protected System.Web.UI.WebControls.Label lblCompatibilityWith;
protected System.Web.UI.WebControls.TextBox txtCompatibilityWith;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.Label Label1;
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtFirstSecondHand.Tex
t==""||txtImageFileName.Text==""||txtItemID.Text==""||t
xtItemName.Text==""||txtMarketPrice.Text==""||txtWarran
ty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.Text+"&

E. No: 011120440
Page 122 3/14/2009
OnLineElecronics

itemname="+txtItemName.Text+"&firstsecondhand="+t
xtFirstSecondHand.Text+"&description="+txtDescrip
tion.Text+"&productcategory="+txtCategory.Text+"&
brandname="+txtBrandName.Text+"&capacityinwatt="+
txtCapacityInWatt.Text+"&compatibilitywith="+txtC
ompatibilityWith.Text+"&marketprice="+txtMarketPr
ice.Text+"&discount="+txtDiscount.Text+"&warranty
="+txtWarranty.Text+"&registrationdate="+txtDate.
Text+"&image="+imagepath+"&category="+"MusicSyste
m");
}
}
}
}

4.19 frmRefrigerator

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmRefrigerator : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtFirstSecondHand;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblFirstSecondHand;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;

E. No: 011120440
Page 123 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Label lblItemID;


protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.TextBox txtCapacityInLitres;
protected System.Web.UI.WebControls.Label lblCapacityInLitres;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);

this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtFirstSecondHand.Tex
t==""||txtImageFileName.Text==""||txtItemID.Text==""||t
xtItemName.Text==""||txtMarketPrice.Text==""||txtWarran
ty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping\
companyimg\"+ItemImage+".gif");
Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.Text+"&
itemname="+txtItemName.Text+"&firstsecondhand="+t
xtFirstSecondHand.Text+"&description="+txtDescrip
tion.Text+"&productcategory="+txtCategory.Text+"&
brandname="+txtBrandName.Text+"&capacityinlitres=
"+txtCapacityInLitres.Text+"&marketprice="+txtMar
ketPrice.Text+"&discount="+txtDiscount.Text+"&war
ranty="+txtWarranty.Text+"&registrationdate="+txt
Date.Text+"&image="+imagepath+"&category="+"Refri
gerator");
}
}
}
}

E. No: 011120440
Page 124 3/14/2009
OnLineElecronics

4.20 frmSandWitchMakers

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmSandWitchMaker : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new

E. No: 011120440
Page 125 3/14/2009
OnLineElecronics

System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtImageFileName.Text=
=""||txtItemID.Text==""||txtItemName.Text==""||txtMarke
tPrice.Text==""||txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.Text+"&
itemname="+txtItemName.Text+"&description="+txtDe
scription.Text+"&productcategory="+txtCategory.Te
xt+"&brandname="+txtBrandName.Text+"&marketprice=
"+txtMarketPrice.Text+"&discount="+txtDiscount.Te
xt+"&warranty="+txtWarranty.Text+"&registrationda
te="+txtDate.Text+"&image="+imagepath+"&category=
"+"SandWitchMakers");
}
}
}
}

4.21 frmStoves

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmStoves : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;

E. No: 011120440
Page 126 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.TextBox txtMarketPrice;


protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtImageFileName.Text=
=""||txtItemID.Text==""||txtItemName.Text==""||txtMarke
tPrice.Text==""||txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="
+txtItemID.Text+"&companyid="+txtCompanyID.Text+"

E. No: 011120440
Page 127 3/14/2009
OnLineElecronics

&itemname="+txtItemName.Text+"&description="+txtD
escription.Text+"&productcategory="+txtCategory.T
ext+"&brandname="+txtBrandName.Text+"&marketprice
="+txtMarketPrice.Text+"&discount="+txtDiscount.T
ext+"&warranty="+txtWarranty.Text+"&registrationd
ate="+txtDate.Text+"&image="+imagepath+"&category
="+"Stoves");
}
}
}
}

4.22 frmTelevision

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmTelevision : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtFirstSecondHand;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblFirstSecondHand;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblSizeInInches;

E. No: 011120440
Page 128 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.TextBox txtSizeInInches;


protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||
txtFirstSecondHand.Text==""||
txtImageFileName.Text==""||txtItemID.Text==""||
txtItemName.Text==""||txtMarketPrice.Text==""||
txtWarranty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.T
ext+"&itemname="+txtItemName.Text+"&firstse
condhand="+txtFirstSecondHand.Text+"&descry
ption="+txtDescription.Text+"&productcatego
ry="+txtCategory.Text+"&brandname="+txtBran
dName.Text+"&sizeininches="+txtSizeInInches
.Text+"&marketprice="+txtMarketPrice.Text+"
&discount="+txtDiscount.Text+"&warranty="+t
xtWarranty.Text+"&registrationdate="+txtDat
e.Text+"&image="+imagepath+"&category="+"Te
levision");
}
}
}
}

E. No: 011120440
Page 129 3/14/2009
OnLineElecronics

4.23 frmWashingMachine

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmWashingMachine : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtCategory;
protected System.Web.UI.WebControls.TextBox txtBrandName;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.TextBox txtImageFileName;
protected System.Web.UI.WebControls.Label lblImageFileName;
protected System.Web.UI.WebControls.Label lblDate;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblBrandName;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.TextBox txtItemID;
protected System.Web.UI.WebControls.TextBox txtCompanyID;
protected System.Web.UI.WebControls.TextBox txtItemName;
protected System.Web.UI.WebControls.TextBox txtFirstSecondHand;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.Label lblImage;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblFirstSecondHand;
protected System.Web.UI.WebControls.Label lblItemName;
protected System.Web.UI.WebControls.Label lblCompanyID;
protected System.Web.UI.WebControls.Label lblItemID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.TextBox txtCapacityInLitres;
protected System.Web.UI.WebControls.Label lblCapacityInLitres;
protected System.Web.UI.WebControls.TextBox txtWarranty;
protected System.Web.UI.WebControls.Label lblWarranty;
protected System.Web.UI.WebControls.Label Label1;

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

E. No: 011120440
Page 130 3/14/2009
OnLineElecronics

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
if(txtBrandName.Text==""||txtCategory.Text==""||
txtCompanyID.Text==""||txtDate.Text==""||txtDescription
.Text==""||txtDiscount.Text==""||txtFirstSecondHand.Tex
t==""||txtImageFileName.Text==""||txtItemID.Text==""||t
xtItemName.Text==""||txtMarketPrice.Text==""||txtWarran
ty.Text=="")
{
lblMessage.Text="Fill up all the details first";
}
else
{
string ItemImage=txtImageFileName.Text ;
string imagepath=(@"C:\Inetpub\wwwroot\OnLineShopping
\companyimg\"+ItemImage+".gif");

Response.Redirect("frmBankingDetails.aspx?itemid="+
txtItemID.Text+"&companyid="+txtCompanyID.T
ext+"&itemname="+txtItemName.Text+"&firstse
condhand="+txtFirstSecondHand.Text+"&descry
ption="+txtDescription.Text+"&productcatego
ry="+txtCategory.Text+"&brandname="+txtBran
dName.Text+"&capacityinlitres="+txtCapacity
InLitres.Text+"&marketprice="+txtMarketPric
e.Text+"&discount="+txtDiscount.Text+"&war
anty="+txtWarranty.Text+"&registrationdate=
"+txtDate.Text+"&image="+imagepath+"&catego
ry="+"WashingMachine");
}
}
}
}

4.24 frmBankingDetails

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

E. No: 011120440
Page 131 3/14/2009
OnLineElecronics

using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmBankingDetails : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button cmdSubmit;
protected System.Web.UI.WebControls.Label lblCheck;
protected System.Web.UI.WebControls.TextBox txtBankID;
protected System.Web.UI.WebControls.TextBox txtBankName;
protected System.Web.UI.WebControls.TextBox txtBankAddress;
protected System.Web.UI.WebControls.TextBox txtAccountHolderName;
protected System.Web.UI.WebControls.TextBox txtAccountNumber;
protected System.Web.UI.WebControls.TextBox txtChequeDDNumber;
protected System.Web.UI.WebControls.TextBox txtAmount;
protected System.Web.UI.WebControls.Label lblAmount;
protected System.Web.UI.WebControls.Label lblChequeDDNumber;
protected System.Web.UI.WebControls.Label lblAccountNumber;
protected System.Web.UI.WebControls.Label lblAccountHolderName;
protected System.Web.UI.WebControls.Label lblBankAddress;
protected System.Web.UI.WebControls.Label lblBankName;
protected System.Web.UI.WebControls.Label lblBankID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label lblTitle;
public static string strCategory,strCompanyCategory;
static int i=0;
// creating the object og the class which is containing the
connection object.
clsShopping.ClsShopping conx=new clsShopping.ClsShopping();

private void Page_Load(object sender, System.EventArgs e)


{
strCategory=Request.Params["category"];
lblCheck.Text=strCategory;
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdSubmit.Click += new
System.EventHandler(this.cmdSubmit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdSubmit_Click(object sender, System.EventArgs e)


{
// variable to check whether values have been inserted into
the bank table.

E. No: 011120440
Page 132 3/14/2009
OnLineElecronics

SqlConnection co=conx.con;

if(strCompanyCategory.Equals("companyRegistration"))
{
// code to To check whether particular Company ID has
been registered earlier. or not. use DataReader.
SqlCommand cmdCheck=new SqlCommand("select companyId
from CompanyRegistration where
companyId=@companyId",co);

cmdCheck.Parameters.Add("@companyid",Request.Params
["companyid"].ToString());

co.Open();
SqlDataReader dr;
try
{
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The Company
ID:"+Request.Params["companyid"].ToString()
+" has already been Registered";
}
else
{
co.Close();
SqlCommand cmdInsert=new SqlCommand("insert
into BankDetails values(@bankid,@bankname,
@address,@accountholdername,@accountno,@che
queddno,@amount)",co);

cmdInsert.Parameters.Add("@bankid",
txtBankID.Text);

cmdInsert.Parameters.Add("@bankname",
txtBankName.Text);

cmdInsert.Parameters.Add("@address",
txtBankAddress.Text);

cmdInsert.Parameters.Add("@account
holdername",
txtAccountHolderName.Text);

cmdInsert.Parameters.Add("@accou
ntno",txtAccountNumber.Text);

cmdInsert.Parameters.Add("@chequ
eddno",txtChequeDDNumber.Text);

//If the Datatype is Decimal we add the


parameters as :

cmdInsert.Parameters.Add("@amount",
System.Data.SqlDbType.Decimal,9).Valu
e=txtAmount.Text.ToString();

E. No: 011120440
Page 133 3/14/2009
OnLineElecronics

try
{
co.Open();
i=cmdInsert.ExecuteNonQuery();
lblMessage.Text="Values has been
inserted successfully in to the
BankDetails table .";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert the
values in the Bank table"+ex.Message;
}
}
}
catch(Exception ex)
{
lblMessage.Text="Cannot read from the
CompanyRegistration";
}
finally
{
co.Close();
}
} // End of entry in the bankDetails of the
CompanyRegistration table

// Code to Insert data into BankDetails Table for various


product table.

// This code will call a method which contains the code to


insert in the BankDetails table
if(strCategory.Equals(strCategory))
{
InsertIntoBank(strCategory);

// Execute this code when data is inserted into the


BankDetails table.

if(i==1)
{
if(strCompanyCategory.Equals("companyRegistration"))
{
SqlCommand cmdCheck=new SqlCommand("select
companyId from CompanyRegistration where
companyId=companyid",co);
cmdCheck.Parameters.Add("@companyid",
Request.Params["companyid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())

E. No: 011120440
Page 134 3/14/2009
OnLineElecronics

{
lblMessage.Text="The
ItemID:"+Request.Params["companyid"].ToStri
ng()+" has already been registered";
}
else
{
SqlCommand cmdCompanyRegistration=new
SqlCommand("insert into
companyRegistration
values(@companyid,@companyname,@passw
ord,@companycategory,@address,@teleph
one,@email,@securityquestion,@securit
yanswer,@registrationdate)",co);

cmdCompanyRegistration.Parameters.Add("@
companyid",Request.Params["companyid"
].ToString());

cmdCompanyRegistration.Parameters.Add
("@companyname",Request.Params["compa
nyname"].ToString());

cmdCompanyRegistration.Parameters.Add("
@password",Request.Params["password"]
.ToString());
cmdCompanyRegistration.Parameters.Add("
@companycategory",Request.Params["com
panycategory"].ToString());

cmdCompanyRegistration.Parameters.Add
("@address",Request.Params["address"]
.ToString());

cmdCompanyRegistration.Parameters.Add
("@telephone",Request.Params["telepho
ne"].ToString());

cmdCompanyRegistration.Parameters.Add
("@email",Request.Params["email"].ToS
tring());

cmdCompanyRegistration.Parameters.Add
("@securityquestion",Request.Params["
securityquestion"].ToString());

cmdCompanyRegistration.Parameters.Add
("@securityanswer",Request.Params["se
curityanswer"].ToString());

cmdCompanyRegistration.Parameters.Add
("@registrationdate",Request.Params["
registrationdate"].ToString());
try
{
co.Open();
cmdCompanyRegistration.

E. No: 011120440
Page 135 3/14/2009
OnLineElecronics

ExecuteNonQuery();

lblMessage.Text="Values has been


inserted successfully in the
BankDetails and
CompanyRegistration table";
}
catch(Exception)
{
lblMessage.Text="Cannot insert values
in the CompanyRegistration
table";
}
finally
{
co.Close();
}
}
}
if(strCategory.Equals("AirConditioners"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from AirConditioners where
itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",Request.
Params["itemid"].ToString());
SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request
.Params["itemid"].ToString()+" has
already been registered"+"The
database ItemID="+dr.GetString(0);
}
else
{
co.Close();
SqlCommand cmdAirConditioners=new
SqlCommand("insert into
AirConditioners values(@itemid,
@companyid,@itemname,@firstsecondhand
,@description,@productcategory,@brand
name,@capacityintonnes,@marketprice,@
discount,@warranty,@registrationdate,
@image)",co);

cmdAirConditioners.Parameters.Add
("@itemid",Request.Params["itemid"].T
oString());

cmdAirConditioners.Parameters.Add
("@companyid",Request.Params["company
id"].ToString());

E. No: 011120440
Page 136 3/14/2009
OnLineElecronics

cmdAirConditioners.Parameters.Add
("@itemname",Request.Params["itemname
"].ToString());

cmdAirConditioners.Parameters.Add
("@firstsecondhand",Request.Params["f
irstsecondhand"].ToString());

cmdAirConditioners.Parameters.Add
("@description",Request.Params["descr
iption"].ToString());
cmdAirConditioners.Parameters.Add
("@productcategory",Request.Params["p
roductcategory"].ToString());

cmdAirConditioners.Parameters.Add
("@brandname",Request.Params["brandna
me"].ToString());

cmdAirConditioners.Parameters.Add
("@capacityintonnes",System.Data.SqlD
bType.Decimal,5).Value=Request.Params
["capacityintonnes"];

cmdAirConditioners.Parameters.Add
("@marketprice",System.Data.SqlDbType
.Decimal,5).Value=Request.Params["mar
ketprice"];

cmdAirConditioners.Parameters.Add
("@discount",System.Data.SqlDbType.De
cimal,5).Value=Request.Params["discou
nt"];

cmdAirConditioners.Parameters.Add
("@warranty",Request.Params["warranty
"].ToString());

cmdAirConditioners.Parameters.Add
("@registrationdate",Convert.
ToDateTime(Request.Params["registrati
ondate"]));
cmdAirConditioners.Parameters.Add
("@image",Request.Params["image"
].ToString());

try
{
co.Open();

i=cmdAirConditioners.
ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
AirConditioners table";
}
catch(Exception ex)

E. No: 011120440
Page 137 3/14/2009
OnLineElecronics

{
lblMessage.Text="Cannot insert values
in the AirConditioners
table"+ex.Message;
}
finally
{
co.Close();
}
}
}
if(strCategory.Equals("BreadToasters"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from BreadToasters where
itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",Request
.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The
ItemID:"+Request.Params["itemid"].ToS
tring()+" has already been
registered";
}
else
{
co.Close();

lblMessage.Text="Bread Toaster is
entering"+"Value of i is : "+i;

SqlCommand cmdBreadToasters=new
SqlCommand("insert into BreadToasters
values(@itemid,@companyid,@itemname,@
description,@category,@brandname,@mar
ketprice,@discount,@warranty,@registr
ationdate,@image)",co);

cmdBreadToasters.Parameters.Add("@itemid
",Request.Params["itemid"].ToString()
);

cmdBreadToasters.Parameters.Add
("@companyid",Request.Params["company
id"].ToString());

cmdBreadToasters.Parameters.Add
("@itemname",Request.Params["itemname
"].ToString());

cmdBreadToasters.Parameters.Add

E. No: 011120440
Page 138 3/14/2009
OnLineElecronics

("@description",Request.Params["descr
iption"].ToString());

cmdBreadToasters.Parameters.Add
("@category",Request.Params["productc
ategory"].ToString());

cmdBreadToasters.Parameters.Add
("@brandname",Request.Params["brandna
me"].ToString());

cmdBreadToasters.Parameters.Add
("@marketprice",System.Data.SqlDbType
.Decimal,9).Value=Request.Params["mar
ketprice"];

cmdBreadToasters.Parameters.Add
("@discount",System.Data.SqlDbType.De
cimal,9).Value=Request.Params["discou
nt"];

cmdBreadToasters.Parameters.Add
("@warranty",System.Data.SqlDbType.De
cimal,9).Value=Request.Params["warran
ty"];

cmdBreadToasters.Parameters.Add
("@registrationdate",Convert.ToDateTi
me(Request.Params["registrationdate"]
));

cmdBreadToasters.Parameters.Add
("@image",Request.Params["image"].ToS
tring());

try
{
co.Open();
i=cmdBreadToasters.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
BreadToasters table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the BreadToasters
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert into the BreadToasters
table

E. No: 011120440
Page 139 3/14/2009
OnLineElecronics

if(strCategory.Equals("Computers"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Computers where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The
ItemID:"+Request.Params["itemid"].ToS
tring()+" has already been
registered";
}
else
{
co.Close();
SqlCommand cmdComputers=new
SqlCommand("insert into Computers
values(@itemid,@companyid,@itemname,@
firstsecondhand,@location,@descriptio
n,@category,@brandname,@configuration
,@marketprice,@discount,@warranty,@re
gistrationdate,@image)",co);

cmdComputers.Parameters.Add
("@itemid",Request.Params["itemid"].T
oString());

cmdComputers.Parameters.Add
("@companyid",Request.Params["company
id"].ToString());

cmdComputers.Parameters.Add
("@itemname",Request.Params["itemname
"].ToString());

cmdComputers.Parameters.Add
("@firstsecondhand",Request.Params["f
irstsecondhand"].ToString());

cmdComputers.Parameters.Add
("@location",Request.Params["location
"].ToString());

cmdComputers.Parameters.Add
("@description",Request.Params["descr
iption"].ToString());

cmdComputers.Parameters.Add
("@category",Request.Params["productc
ategory"].ToString());

E. No: 011120440
Page 140 3/14/2009
OnLineElecronics

cmdComputers.Parameters.Add
("@brandname",Request.Params["brandna
me"].ToString());

cmdComputers.Parameters.Add
("@configuration",Request.Params["con
figuration"].ToString());

cmdComputers.Parameters.Add
("@marketprice",System.Data.SqlDbType
.Decimal,9).Value=Request.Params["mar
ketprice"];

cmdComputers.Parameters.Add
("@discount",System.Data.SqlDbType.De
cimal,9).Value=Request.Params["discou
nt"];

cmdComputers.Parameters.Add
("@warranty",System.Data.SqlDbType.De
cimal,9).Value=Request.Params["warran
ty"];

cmdComputers.Parameters.Add
("@registrationdate",Convert.ToDateTi
me(Request.Params["registrationdate"]
));
cmdComputers.Parameters.Add
("@image",Request.Params["image"].ToS
tring());

try
{
co.Open();
i=cmdComputers.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
BreadToasters table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the BreadToasters
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert into the BreadToasters
table

if(strCategory.Equals("Cookers"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Cookers where itemId=@itemid",co);

E. No: 011120440
Page 141 3/14/2009
OnLineElecronics

cmdCheck.Parameters.Add("@itemid",Request.Params
["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+
Request.Params["itemid"].ToString()+"
has already been registered";
}
else
{
co.Close();
SqlCommand cmdCookers=new
SqlCommand("insert into Cookers
values(@itemid,@companyid,@itemname,@
description,@category,@brandname,@cap
acityinlitres,@marketprice,@discount,
@warranty,@registrationdate,@image)",
co);

cmdCookers.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdCookers.Parameters.Add("@companyid",
Request.Params["companyid"].ToString
());

cmdCookers.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdCookers.Parameters.Add("@description",
Request.Params["description"].ToStrin
g());

cmdCookers.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdCookers.Parameters.Add("@brandname",
Request.Params["brandname"].ToString(
));

cmdCookers.Parameters.Add("@capacity
inlitres",Request.Params["capacityinl
itres"].ToString());

cmdCookers.Parameters.Add("@market
price",System.Data.SqlDbType.Decimal,
9).Value=Request.Params["marketprice"
];

cmdCookers.Parameters.Add("@discount",

E. No: 011120440
Page 142 3/14/2009
OnLineElecronics

System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["discount"];

cmdCookers.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

cmdCookers.Parameters.Add("@registration
date",Convert.ToDateTime(Request.Para
ms["registrationdate"]));

cmdCookers.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdCookers.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the Cookers
table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Cookers table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert into the Cookers table

if(strCategory.Equals("Geysors"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Geysors where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request
.Params["itemid"].ToString()+" has
already been registered";
}
else
{
co.Close();
SqlCommand cmdGeysors=new SqlCommand
("insert into Geysors values
(@itemid,@companyid,@itemname,@descri

E. No: 011120440
Page 143 3/14/2009
OnLineElecronics

ption,@category,@brandname,@marketpri
ce,@discount,@warranty,@registrationd
ate,@image)",co);

cmdGeysors.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdGeysors.Parameters.Add("@companyid",
Request.Params["companyid"].ToString(
));

cmdGeysors.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdGeysors.Parameters.Add("@description",
Request.Params["description"].ToStrin
g());

cmdGeysors.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdGeysors.Parameters.Add("@brandname",
Request.Params["brandname"].ToString(
));
cmdGeysors.Parameters.Add("@marketprice",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["marketprice"];

cmdGeysors.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["discount"];

cmdGeysors.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

cmdGeysors.Parameters.Add("@registration
date",Convert.ToDateTime(Request.Para
ms["registrationdate"]));

cmdGeysors.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdGeysors.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
Geysors table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Geysors

E. No: 011120440
Page 144 3/14/2009
OnLineElecronics

table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert into the Geysors table

if(strCategory.Equals("Irons"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Irons where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:
"+Request.Params["itemid"].ToString()
+" has already been registered";
}
else
{
co.Close();
SqlCommand cmdIrons=new SqlCommand("insert
into Irons values(@itemid,@companyid
,@itemname,@description,@category,@br
andname,@marketprice,@discount,@warra
nty,@registrationdate,@image)",co);

cmdIrons.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdIrons.Parameters.Add("@companyid",
Request.Params["companyid"].ToString(
));

cmdIrons.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdIrons.Parameters.Add("@description",
Request.Params["description"].ToStrin
g());

cmdIrons.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdIrons.Parameters.Add("@brandname",
Request.Params["brandname"].ToString(
));

E. No: 011120440
Page 145 3/14/2009
OnLineElecronics

cmdIrons.Parameters.Add("@marketprice",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["marketprice"];

cmdIrons.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["discount"];

cmdIrons.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

cmdIrons.Parameters.Add("@registration
date",Convert.ToDateTime(Request.Para
ms["registrationdate"]));

cmdIrons.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdIrons.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
Irons table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Irons table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert into the Irons table

if(strCategory.Equals("Mixers"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Mixers where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request.
Params["itemid"].ToString()+" has
already been registered";
}

E. No: 011120440
Page 146 3/14/2009
OnLineElecronics

else
{
co.Close();
SqlCommand cmdMixers=new SqlCommand("insert
into Mixers values(@itemid,@companyid
,@itemname,@firstsecondhand,@descript
ion,@category,@brandname,@rotationper
minute,@capacityinwatt,@marketprice,@
discount,@warranty,@registrationdate,
@image)",co);

cmdMixers.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdMixers.Parameters.Add("@companyid",
Request.Params["companyid"].ToString(
));

cmdMixers.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdMixers.Parameters.Add("@first
secondhand",Request.Params["firstseco
ndhand"].ToString());

cmdMixers.Parameters.Add("@description",
Request.Params["description"].ToStrin
g());

cmdMixers.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdMixers.Parameters.Add("@brandname",
Request.Params["brandname"].ToString(
));

cmdMixers.Parameters.Add("@rotation
perminute",Request.Params["rotationpe
rminute"].ToString());

cmdMixers.Parameters.Add("@capacity
inwatt",Request.Params["capacityinwat
t"].ToString());

cmdMixers.Parameters.Add("@marketprice",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["marketprice"];

cmdMixers.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["discount"];

cmdMixers.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

E. No: 011120440
Page 147 3/14/2009
OnLineElecronics

cmdMixers.Parameters.Add("@registration
date",Convert.ToDateTime(Request.Para
ms["registrationdate"]));

cmdMixers.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdMixers.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
Mixers table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Mixers
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert into the Irons table

if(strCategory.Equals("MusicSystem"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from MusicSystem where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The
ItemID:"+Request.Params["itemid"].ToS
tring()+" has already been
registered";
}
else
{
co.Close();
SqlCommand cmdMusicSystem=new
SqlCommand("insert into MusicSystem
values(@itemid,@companyid,@itemname,@
firstsecondhand,@description,@categor
y,@brandname,@capacityinwatt,@compati
bilitywith,@marketprice,@discount,@wa
rranty,@registrationdate,@image)",co)

E. No: 011120440
Page 148 3/14/2009
OnLineElecronics

cmdMusicSystem.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdMusicSystem.Parameters.Add("@companyid",
Request.Params["companyid"].ToString(
));

cmdMusicSystem.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdMusicSystem.Parameters.Add("@first
secondhand",Request.Params["firstseco
ndhand"].ToString());

cmdMusicSystem.Parameters.Add("@descrip
tion",Request.Params["description"].T
oString());

cmdMusicSystem.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdMusicSystem.Parameters.Add("@brandname",
Request.Params["brandname"].ToString(
));

cmdMusicSystem.Parameters.Add("@capacity
inwatt",Request.Params["capacityinwat
t"].ToString());

cmdMusicSystem.Parameters.Add("@compat
ibilitywith",Request.Params["compatib
ilitywith"].ToString());

cmdMusicSystem.Parameters.Add("@market
price",System.Data.SqlDbType.Decimal,
9).Value=Request.Params["marketprice"
];

cmdMusicSystem.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).
Value=Request.Params["discount"];

cmdMusicSystem.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

cmdMusicSystem.Parameters.Add("@regis

trationdate",Convert.ToDateTime(
Request.Params["registrationdate"]));

cmdMusicSystem.Parameters.Add("@image",
Request.Params["image"].ToString());

E. No: 011120440
Page 149 3/14/2009
OnLineElecronics

try
{
co.Open();
i=cmdMusicSystem.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
Music System table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Music System
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert in MusicSystem table

if(strCategory.Equals("Refrigerator"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Refrigerator where
itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+
Request.Params["itemid"].ToString()+"
has already been registered";
}
else
{
co.Close();
SqlCommand cmdRefrigerator=new SqlCommand
("insert into Refrigerator values(
@itemid,@companyid,@itemname,@firstse
condhand,@description,@category,@bran
dname,@capacityinlitres,@marketprice,
@discount,@warranty,@registrationdate
,@image)",co);

cmdRefrigerator.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdRefrigerator.Parameters.Add("@company
id",Request.Params["companyid"].ToStr
ing());

E. No: 011120440
Page 150 3/14/2009
OnLineElecronics

cmdRefrigerator.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdRefrigerator.Parameters.Add("@first
secondhand",Request.Params["firstseco
ndhand"].ToString());

cmdRefrigerator.Parameters.Add("@des
cription",Request.Params["description
"].ToString());

cmdRefrigerator.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdRefrigerator.Parameters.Add("@brand
name",Request.Params["brandname"].ToS
tring());

cmdRefrigerator.Parameters.Add("@capacity
inlitres",Request.Params["capacityinw
att"].ToString());

cmdRefrigerator.Parameters.Add("@compatib
ilitywith",Request.Params["compatibil
itywith"].ToString());
cmdRefrigerator.Parameters.Add("@market
price",System.Data.SqlDbType.Decimal,
9).Value=Request.Params["marketprice"
];

cmdRefrigerator.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["discount"];
cmdRefrigerator.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

cmdRefrigerator.Parameters.Add("@regist
rationdate",Convert.ToDateTime(Reques
t.Params["registrationdate"]));

cmdRefrigerator.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdRefrigerator.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
Refrigerator table";
}
catch(Exception ex)
{

E. No: 011120440
Page 151 3/14/2009
OnLineElecronics

lblMessage.Text="Cannot insert values


in the Refrigerator
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert in Refrigerator table

if(strCategory.Equals("SandWitchMakers"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from SandWitchMakers where
itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request
.Params["itemid"].ToString()+" has
already been registered";
}
else
{
co.Close();
SqlCommand cmdSandWitchMakers=new
SqlCommand ("insert into
SandWitchMakers values(@itemid,
@companyid,@itemname,@description,@ca
tegory,@brandname,@marketprice,@disco
unt,@warranty,@registrationdate,@imag
e)",co);

cmdSandWitchMakers.Parameters.Add("
@itemid",Request.Params["itemid"].ToS
tring());

cmdSandWitchMakers.Parameters.Add("
@companyid",Request.Params["companyid
"].ToString());

cmdSandWitchMakers.Parameters.Add("
@itemname",Request.Params["itemname"]
.ToString());

cmdSandWitchMakers.Parameters.Add("
@description",Request.Params["descrip
tion"].ToString());

E. No: 011120440
Page 152 3/14/2009
OnLineElecronics

cmdSandWitchMakers.Parameters.Add("
@category",Request.Params["productcat
egory"].ToString());

cmdSandWitchMakers.Parameters.Add("
@brandname",Request.Params["brandname
"].ToString());

cmdSandWitchMakers.Parameters.Add("
@marketprice",System.Data.SqlDbType.D
ecimal,9).Value=Request.Params["marke
tprice"];

cmdSandWitchMakers.Parameters.Add("
@discount",System.Data.SqlDbType.Deci
mal,9).Value=Request.Params["discount
"];

cmdSandWitchMakers.Parameters.Add("
@warranty",System.Data.SqlDbType.Deci
mal,9).Value=Request.Params["warranty
"];

cmdSandWitchMakers.Parameters.Add("
@registrationdate",Convert.ToDateTime
(Request.Params["registrationdate"]))
;

cmdSandWitchMakers.Parameters.Add("
@image",Request.Params["image"].ToStr
ing());

try
{
co.Open();
i=cmdSandWitchMakers.
ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
SandWitchMakers table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the SandWitchMakers
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert in SandWitchMakers table

if(strCategory.Equals("Stoves"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId

E. No: 011120440
Page 153 3/14/2009
OnLineElecronics

from Stoves where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request
.Params["itemid"].ToString()+" has
already been registered";
}
else
{
co.Close();
SqlCommand cmdStoves=new SqlCommand("insert
into Stoves values(@itemid,
@companyid, @itemname,@description,
@category,@brandname,@marketprice,@di
scount,@warranty,@registrationdate,@i
mage)",co);

cmdStoves.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdStoves.Parameters.Add("@companyid",
Request.Params["companyid"].ToString(
));

cmdStoves.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdStoves.Parameters.Add("@description",
Request.Params["description"].
ToString());

cmdStoves.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdStoves.Parameters.Add("@brandname",
Request.Params["brandname"].ToString(
));

cmdStoves.Parameters.Add("@marketprice",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["marketprice"];

cmdStoves.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["discount"];

cmdStoves.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).

E. No: 011120440
Page 154 3/14/2009
OnLineElecronics

Value=Request.Params["warranty"];

cmdStoves.Parameters.Add("@regist
rationdate",Convert.ToDateTime(Reques
t.Params["registrationdate"]));

cmdStoves.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdStoves.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
Stoves table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Stoves
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert in Stoves table

if(strCategory.Equals("Television"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from Television where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request
.Params["itemid"].ToString()+" has
already been registered";
}
else
{
co.Close();
SqlCommand cmdTelevision=new SqlCommand
("insert into Television values
(@itemid,@companyid,@itemname,@firsts
econdhand,@description,@category,@bra
ndname,@sizeininches,@marketprice,@di
scount,@warranty,@registrationdate,@i
mage)",co);

E. No: 011120440
Page 155 3/14/2009
OnLineElecronics

cmdTelevision.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

cmdTelevision.Parameters.Add("@companyid",
Request.Params["companyid"].ToString(
));

cmdTelevision.Parameters.Add("@itemname",
Request.Params["itemname"].ToString()
);

cmdTelevision.Parameters.Add("@first
secondhand",Request.Params["firstseco
ndhand"].ToString());

cmdTelevision.Parameters.Add("@descr
iption",Request.Params["description"]
.ToString());

cmdTelevision.Parameters.Add("@category",
Request.Params["productcategory"].ToS
tring());

cmdTelevision.Parameters.Add("@brandname",
Request.Params["brandname"].
ToString());
cmdTelevision.Parameters.Add("@sizein
inches",Request.Params["sizeininches"
].ToString());

cmdTelevision.Parameters.Add("@market
price",System.Data.SqlDbType.Decimal,
9).Value=Request.Params["marketprice"
];

cmdTelevision.Parameters.Add("@discount",
System.Data.SqlDbType.Decimal,9).
Value=Request.Params["discount"];

cmdTelevision.Parameters.Add("@warranty",
System.Data.SqlDbType.Decimal,9).Valu
e=Request.Params["warranty"];

cmdTelevision.Parameters.Add("@registrat
iondate",Convert.ToDateTime(Request
.Params["registrationdate"]));

cmdTelevision.Parameters.Add("@image",
Request.Params["image"].ToString());

try
{
co.Open();
i=cmdTelevision.ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the

E. No: 011120440
Page 156 3/14/2009
OnLineElecronics

Television table";
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert values
in the Television
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert in Television table

if(strCategory.Equals("WashingMachine"))
{
SqlCommand cmdCheck=new SqlCommand("select itemId
from WashingMachine where
itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",
Request.Params["itemid"].ToString());

SqlDataReader dr;
co.Open();
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The ItemID:"+Request.
Params["itemid"].ToString()+" has
already been registered";
}
else
{
co.Close();
SqlCommand cmdWashingMachine=new SqlCommand
("insert into WashingMachine
values(@itemid,@companyid,@itemname,@
firstsecondhand,@description,@categor
y,@brandname,@capacityinlitres,@marke
tprice,@discount,@warranty,@registrat
iondate,@image)",co);

cmdWashingMachine.Parameters.Add("
@itemid",Request.Params["itemid"].ToS
tring());

cmdWashingMachine.Parameters.Add("
@companyid",Request.Params["companyid
"].ToString());

cmdWashingMachine.Parameters.Add("
@itemname",Request.Params["itemname"]
.ToString());

cmdWashingMachine.Parameters.Add("

E. No: 011120440
Page 157 3/14/2009
OnLineElecronics

@firstsecondhand",Request.Params["fir
stsecondhand"].ToString());

cmdWashingMachine.Parameters.Add("
@description",Request.Params["descrip
tion"].ToString());

cmdWashingMachine.Parameters.Add("
@category",Request.Params["productcat
egory"].ToString());

cmdWashingMachine.Parameters.Add("
@brandname",Request.Params["brandname
"].ToString());

cmdWashingMachine.Parameters.Add("
@capacityinlitres",Request.Params["ca
pacityinwatt"].ToString());

cmdWashingMachine.Parameters.Add("
@compatibilitywith",Request.Params["c
ompatibilitywith"].ToString());

cmdWashingMachine.Parameters.Add("
@marketprice",System.Data.SqlDbType.D
ecimal,9).Value=Request.Params["marke
tprice"];

cmdWashingMachine.Parameters.Add("
@discount",System.Data.SqlDbType.Deci
mal,9).Value=Request.Params["discount
"];

cmdWashingMachine.Parameters.Add("
@warranty",System.Data.SqlDbType.Deci
mal,9).Value=Request.Params["warranty
"];

cmdWashingMachine.Parameters.Add("
@registrationdate",Convert.ToDateTime
(Request.Params["registrationdate"]))
;

cmdWashingMachine.Parameters.Add("
@image",Request.Params["image"].ToStr
ing());

try
{
co.Open();
i=cmdWashingMachine.
ExecuteNonQuery();
lblMessage.Text="Values has been
successfully inserted in the
WashingMachine table";
}
catch(Exception ex)

E. No: 011120440
Page 158 3/14/2009
OnLineElecronics

{
lblMessage.Text="Cannot insert values
in the WashingMachine
table"+ex.Message;
}
finally
{
co.Close();
}
}
}// End of the code to insert in WashingMachine table

}
}

// This is outside the button click event.This method insert the


details into the BankDetails table.
public void InsertIntoBank(string tableName)
{

SqlConnection co=conx.con;
SqlCommand cmdCheck=new SqlCommand("select itemId from
"+tableName+" where itemId=@itemid",co);

cmdCheck.Parameters.Add("@itemid",Request.Params["itemid"]
.ToString());
co.Open();
SqlDataReader dr;
try
{
dr=cmdCheck.ExecuteReader();
if(dr.Read())
{
lblMessage.Text="The Item ID:"+Request.
Params["itemid"].ToString()+" has already
been Registered";
}
else
{
co.Close();
SqlCommand cmdInsert=new SqlCommand("insert into
BankDetails values(@bankid,@bankname,
@address ,@accountholdername,@accountno,@
chequeddno,@amount)",co);

cmdInsert.Parameters.Add("@bankid",
txtBankID.Text);

cmdInsert.Parameters.Add("@bankname",
txtBankName.Text);

cmdInsert.Parameters.Add("@address",
txtBankAddress.Text);

cmdInsert.Parameters.Add("@account
holdername",txtAccountHolderName.Text);

E. No: 011120440
Page 159 3/14/2009
OnLineElecronics

cmdInsert.Parameters.Add("@accountno",
txtAccountNumber.Text);

cmdInsert.Parameters.Add("@chequeddno",
txtChequeDDNumber.Text);

//If the Datatype is Decimal we add the


parameters as :
cmdInsert.Parameters.Add("@amount",
System.Data.SqlDbType.Decimal,9).Value=txtA
mount.Text.ToString();

try
{
co.Open();
i=cmdInsert.ExecuteNonQuery();
lblMessage.Text="Values has been inserted
successfully in to the BankDetails
table ."+i;

// return i;
}
catch(Exception ex)
{
lblMessage.Text="Cannot insert the values
in the Bank table"+ex.Message;
}
}
}
catch(Exception ex)
{
lblMessage.Text="Cannot read from the
"+tableName+ex.Message;
}
finally
{
co.Close();
}
}// End of the method InsertIntoBank.
}
}

4.25 frmProductUpdation

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

E. No: 011120440
Page 160 3/14/2009
OnLineElecronics

using System.Data.SqlClient;
4.25 frmProductUpdation
namespace AnilElectronicsSite
{
public class frmProductUpdation : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lblUpdate;
protected System.Web.UI.WebControls.Button cmdUpdate;
protected System.Web.UI.WebControls.TextBox txtDiscount;
protected System.Web.UI.WebControls.TextBox txtDescription;
protected System.Web.UI.WebControls.TextBox txtMarketPrice;
protected System.Web.UI.WebControls.TextBox txtDate;
protected System.Web.UI.WebControls.Label lbDate;
protected System.Web.UI.WebControls.Label lblMarketPrice;
protected System.Web.UI.WebControls.Label lblDescription;
protected System.Web.UI.WebControls.Label lblDiscount;
protected System.Web.UI.WebControls.Label lblItemId;
protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.TextBox txtItemId;
protected System.Web.UI.WebControls.DropDownList ddlistCategory;
protected System.Web.UI.WebControls.Label lblCategory;
protected System.Web.UI.WebControls.Label lblTitle;
protected System.Web.UI.WebControls.Label lblCompanyID;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();

string companyID,tablename,itemID;

private void Page_Load(object sender, System.EventArgs e)


{
lblUpdate.Visible=false;

// Session variable defined to access the CompanyId which the


the Company has logged in as the
// Companies can update only his own products.He cannot
update the products of the other Companies.

companyID=Session["companyid"].ToString();
lblCompanyID.Text=companyID;

if(Page.IsPostBack==false)
{
ddlistCategory.Items.Add("AirConditioners");
ddlistCategory.Items.Add("BreadToasters");
ddlistCategory.Items.Add("Computers");
ddlistCategory.Items.Add("Cookers");
ddlistCategory.Items.Add("Geysors");
ddlistCategory.Items.Add("Irons");
ddlistCategory.Items.Add("Mixers");
ddlistCategory.Items.Add("MusicSystem");
ddlistCategory.Items.Add("Refrigerator");
ddlistCategory.Items.Add("SandWitchMakers");
ddlistCategory.Items.Add("Stoves");
ddlistCategory.Items.Add("Television");
ddlistCategory.Items.Add("WashingMachine");

E. No: 011120440
Page 161 3/14/2009
OnLineElecronics

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdUpdate.Click += new
System.EventHandler(this.cmdUpdate_Click);
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;
itemID=txtItemId.Text;
co.Open();
tablename=ddlistCategory.SelectedItem.Value.ToString();

SqlDataAdapter adpItemId=new SqlDataAdapter("select


itemId,description,marketPrice,discount,registrationDat
e from "+tablename+" where itemId=@itemid AND
companyId=@companyid",co);

adpItemId.SelectCommand.Parameters.Add("@itemid",itemID);
adpItemId.SelectCommand.Parameters.Add("@companyid",
companyID);
SqlDataReader dr;
dr=adpItemId.SelectCommand.ExecuteReader();
if(dr.Read())
{
lblCompanyID.Text="This CompanyID and ItemID exists";
txtDiscount.Text=dr.GetDecimal(3).ToString();
txtDescription.Text=dr.GetString(1);
txtMarketPrice.Text=dr.GetDecimal(2).ToString();
txtDate.Text=dr.GetDateTime(4).ToString();
}
else
{
txtDate.Text="";
txtDescription.Text="";
txtDiscount.Text="";
txtMarketPrice.Text="";
lblUpdate.Visible=false;
lblUpdate.Text="";
lblCompanyID.Text="This CompanyID and ItemID doesn't
exists";
}

E. No: 011120440
Page 162 3/14/2009
OnLineElecronics

dr.Read();
co.Close();
}

private void cmdUpdate_Click(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;
tablename=ddlistCategory.SelectedItem.Value.ToString();
SqlDataAdapter adpUpdate=new SqlDataAdapter("update
"+tablename+" set description=@Description,
marketPrice=@MarketPrice,discount=@Discount where
itemId=@ItemID",co);

adpUpdate.SelectCommand.Parameters.Add("
@Description",txtDescription.Text);
adpUpdate.SelectCommand.Parameters.Add("
@MarketPrice",txtMarketPrice.Text);

adpUpdate.SelectCommand.Parameters.Add("
@Discount",txtDiscount.Text);

adpUpdate.SelectCommand.Parameters.Add("
@ItemID",txtItemId.Text);

co.Open();
adpUpdate.SelectCommand.ExecuteNonQuery();
lblUpdate.Visible=true;
lblUpdate.Text="Updation Successfull";

}
}
}

4.26 frmCompanyStatus

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace AnilElectronicsSite
{
public class frmCompanyStatus : System.Web.UI.Page
{

protected System.Web.UI.WebControls.LinkButton lnkBack;


protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.LinkButton lnkOrderDetails;
protected System.Web.UI.WebControls.LinkButton lnkProductDetails;

E. No: 011120440
Page 163 3/14/2009
OnLineElecronics

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.lnkOrderDetails.Click += new
System.EventHandler(this.lnkOrderDetails_Click);
this.lnkProductDetails.Click += new
System.EventHandler(this.lnkProductDetails_Click);
this.Load += new System.EventHandler(this.Page_Load);
}

#endregion

private void lnkProductDetails_Click(object sender,


System.EventArgs e)
{
Response.Redirect("frmProductDetails.aspx");
}

private void lnkOrderDetails_Click(object sender, System.EventArgs


e)
{
Response.Redirect("frmOrderDetails.aspx");
}
}
}

4.27 frmProductDetails

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmProductDetails : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid dgCategory;

E. No: 011120440
Page 164 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Button cmdGo;


protected System.Web.UI.WebControls.DropDownList ddlistCategory;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label lblCompanyId;
protected System.Web.UI.WebControls.Label lblTitle;
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Label lblTableName;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


string companyID,tablename;
DataSet ds=new DataSet();

private void Page_Load(object sender, System.EventArgs e)


{
//We receive the Session variable defined on the Home Page to
store the CompanyId.
companyID=Session["companyid"].ToString();

lblCompanyId.Text=companyID;

// Ensures that the page has been posted for the first time.
if(!Page.IsPostBack)
{
ddlistCategory.Items.Add("AirConditioners");
ddlistCategory.Items.Add("BreadToasters");
ddlistCategory.Items.Add("Computers");
ddlistCategory.Items.Add("Cookers");
ddlistCategory.Items.Add("Geysors");
ddlistCategory.Items.Add("Irons");
ddlistCategory.Items.Add("Mixers");
ddlistCategory.Items.Add("MusicSystem");
ddlistCategory.Items.Add("Refrigerator");
ddlistCategory.Items.Add("SandWitchMakers");
ddlistCategory.Items.Add("Stoves");
ddlistCategory.Items.Add("Television");
ddlistCategory.Items.Add("WashingMachine");
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.ddlistCategory.SelectedIndexChanged += new
System.EventHandler(this.ddlistCategory_SelectedIndexCh
anged);

this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);

this.Load += new System.EventHandler(this.Page_Load);

E. No: 011120440
Page 165 3/14/2009
OnLineElecronics

}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
companyID=Session["companyid"].ToString();
tablename=ddlistCategory.SelectedItem.Value.ToString();
SqlConnection co=conx.con;
SqlDataAdapter adpDisplay=new SqlDataAdapter("select * from
"+tablename+" where companyId=@companyid",co);

adpDisplay.SelectCommand.Parameters.Add("@companyid",
companyID);

adpDisplay.Fill(ds,tablename);
co.Open();
dgCategory.DataSource=ds.Tables[tablename];
dgCategory.DataBind();
co.Close ();
}

private void ddlistCategory_SelectedIndexChanged(object sender,


System.EventArgs e)
{
tablename=ddlistCategory.SelectedItem.ToString();
lblTableName.Text=tablename;
}
}
}

4.28 frmOrderDetails

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmOrderDetails : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton lnkBack;
protected System.Web.UI.WebControls.Label Label1;

E. No: 011120440
Page 166 3/14/2009
OnLineElecronics

protected System.Web.UI.WebControls.Label lblCompanyId;


protected System.Web.UI.WebControls.Button cmdGo;
protected System.Web.UI.WebControls.Label lblShoppingID;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.DataGrid dgDisplay;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


DataSet ds=new DataSet();
protected System.Web.UI.WebControls.DropDownList ddlistCategory;
string companyID;

private void Page_Load(object sender, System.EventArgs e)


{
companyID=Session["companyid"].ToString();
lblCompanyId.Text=companyID;

if(!Page.IsPostBack)
{
SqlConnection co=conx.con;
SqlCommand cmdAddInDDList=new SqlCommand ("select
distinct (shoppingId) from Buyer",co);

if(Page.IsPostBack==false)
{
co.Open();
SqlDataReader dr;
dr=cmdAddInDDList.ExecuteReader();
while(dr.Read())
{
ddlistCategory.Items.Add(dr.GetString(0));
}
dr.Close();
co.Close();
}
}
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdGo.Click += new
System.EventHandler(this.cmdGo_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdGo_Click(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;
co.Open();
SqlDataAdapter adpOrderDetails=new SqlDataAdapter("select *

E. No: 011120440
Page 167 3/14/2009
OnLineElecronics

from OrderDetails where shoppingId=@shoppingid AND


companyId=@companyid",co);

adpOrderDetails.SelectCommand.Parameters.Add("@
shoppingid",ddlistCategory.SelectedItem.ToString());

adpOrderDetails.SelectCommand.Parameters.Add("@
companyid",companyID);

adpOrderDetails.Fill(ds,"OrderDetails");
dgDisplay.DataSource=ds.Tables["OrderDetails"];
dgDisplay.DataBind();
co.Close();
}
}
}

4.29 frmForgotPassword

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmForgetPassword : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lblSecQ;
protected System.Web.UI.WebControls.Label lblSecA;
protected System.Web.UI.WebControls.Label lblOkMessage;
protected System.Web.UI.WebControls.Button cmdOk;
protected System.Web.UI.WebControls.TextBox txtPassword;
protected System.Web.UI.WebControls.Label lblPassword;
protected System.Web.UI.WebControls.TextBox txtSecAns;
protected System.Web.UI.WebControls.TextBox txtSecQues;
protected System.Web.UI.WebControls.Button cmdSearch;
protected System.Web.UI.WebControls.DropDownList ddlid;
protected System.Web.UI.WebControls.TextBox txtID;
protected System.Web.UI.WebControls.Label lblTitle;
protected System.Web.UI.WebControls.Label lblwhich;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();


private void Page_Load(object sender, System.EventArgs e)
{
lblSecA.Visible=false;
lblSecQ.Visible=false;
txtSecAns.Visible=false;

E. No: 011120440
Page 168 3/14/2009
OnLineElecronics

txtSecQues.Visible=false;
lblPassword.Visible=false;
txtPassword.Visible=false;
lblOkMessage.Visible=false;
cmdOk.Visible=false;
}

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.ddlid.SelectedIndexChanged += new
System.EventHandler(this.ddlid_SelectedIndexChanged);

this.cmdSearch.Click += new
System.EventHandler(this.cmdSearch_Click);
this.cmdOk.Click += new
System.EventHandler(this.cmdOk_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void ddlid_SelectedIndexChanged(object sender,


System.EventArgs e)
{
txtID.Text="";
if( ddlid.SelectedItem.Value.ToString ()=="Company ID")
//if(ddlid.SelectedIndex==1)
{
cmdSearch.Enabled=true;
lblwhich.Text="company";
}
if(ddlid.SelectedItem.Value.ToString ()=="User ID")
//if(ddlid.SelectedIndex==2)
{
cmdSearch.Enabled=true;
lblwhich.Text="user";
}
}

private void cmdSearch_Click(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;
if(lblwhich.Text=="user")
{
SqlCommand cmd=new SqlCommand("select
userID,securityQuestion from UserRegistration where
userId=@userid",co);

cmd.Parameters.Add("@userid",txtID.Text);
SqlDataReader dr;
co.Open();

E. No: 011120440
Page 169 3/14/2009
OnLineElecronics

dr=cmd.ExecuteReader();
if(dr.Read())
{
txtSecQues.Visible=true;
lblSecQ.Visible=true;
lblSecA.Visible=true;
txtSecAns.Visible=true;
cmdOk.Visible=true;
txtSecQues.Text=dr.GetString (1);
}
else
{
Response.Write("Not a Proper User_ID");
}
dr.Close();
co.Close();
}
if(lblwhich.Text=="company")
{
SqlCommand cmd=new SqlCommand("select
companyId,securityQuestion from
CompanyRegistration where
companyId=@companyid",co);

cmd.Parameters.Add("@companyid",txtID.Text);
SqlDataReader dr;
co.Open();
dr=cmd.ExecuteReader();
if(dr.Read())
{
txtSecQues.Visible=true;
lblSecQ.Visible=true;
lblSecA.Visible=true;
txtSecAns.Visible=true;
cmdOk.Visible=true;
txtSecQues.Text=dr.GetString (1);
}
else
{
Response.Write("\n\n\nNot a Proper User_ID");
}
dr.Close();
co.Close();
}
txtSecAns.Text="";
}

private void cmdOk_Click(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;

if(lblwhich.Text=="user")
{
SqlCommand cmd=new SqlCommand("select
password,securityAnswer from UserRegistration
where securityAnswer=@securityanswer",co);

E. No: 011120440
Page 170 3/14/2009
OnLineElecronics

cmd.Parameters.Add("@securityanswer",txtSecAns.Text);
SqlDataReader dr;
co.Open();
dr=cmd.ExecuteReader();

if(dr.Read())
{
lblPassword.Visible=true;
txtPassword.Visible=true;
txtPassword.Text=dr.GetString(0);
Response.Write("");
}
else
{
lblOkMessage.Visible=true;
lblOkMessage.Text="Incorrect Answer";
}
dr.Close();
co.Close();

}
if(lblwhich.Text=="company")
{
SqlCommand cmd=new SqlCommand("select
password,securityAnswer from CompanyRegistration
where securityAnswer=@securityanswer",co);

cmd.Parameters.Add("@securityanswer",txtSecAns.Text);
SqlDataReader dr;
co.Open();
dr=cmd.ExecuteReader();

if(dr.Read())
{
lblPassword.Visible=true;
txtPassword.Visible=true;
txtPassword.Text=dr.GetString(0);
Response.Write("");
}
else
{
lblOkMessage.Visible=true;
lblOkMessage.Text="Incorrect Answer";
}
dr.Close();
co.Close();

}
}
}

E. No: 011120440
Page 171 3/14/2009
OnLineElecronics

4.30 frmChangePassword

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

namespace AnilElectronicsSite
{
public class frmChangePassword : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button cmdSubmit;
protected System.Web.UI.WebControls.TextBox txtID;
protected System.Web.UI.WebControls.TextBox txtOldPassword;
protected System.Web.UI.WebControls.TextBox txtNewPassword;
protected System.Web.UI.WebControls.Label lblNewPassword;
protected System.Web.UI.WebControls.Label lblOldPassword;
protected System.Web.UI.WebControls.Label lblID;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.RadioButtonList rblistSelect;
protected System.Web.UI.WebControls.Label lblTitle;

clsShopping.ClsShopping conx=new clsShopping.ClsShopping();

#region Web Form Designer generated code


override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()


{
this.cmdSubmit.Click += new
System.EventHandler(this.cmdSubmit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

private void cmdSubmit_Click(object sender, System.EventArgs e)


{
SqlConnection co=conx.con;
if(rblistSelect.SelectedItem.ToString()=="User")
{
SqlCommand cmdPasswordUpdate=new SqlCommand("select
userId,password from UserRegistration where
userId=@userid AND password=@password",co);

E. No: 011120440
Page 172 3/14/2009
OnLineElecronics

cmdPasswordUpdate.Parameters.Add("@userid",txtID.Text);

cmdPasswordUpdate.Parameters.Add("@password",
txtOldPassword.Text);

SqlDataReader dr;
co.Open();
dr=cmdPasswordUpdate.ExecuteReader();
if(dr.Read())
{
// we are closing the DataReader and the
Connection here because the page is redirected.
dr.Close();
co.Close();

Response.Redirect("frmConfirmPassword.aspx?id="
+txtID.Text+"&newpassword="+txtNewPassword.
Text+"&table="+"UserRegistration");
}
else
{
lblMessage.Text="Enter your valid UserID and
Password";
dr.Close();
co.Close();
}
}
if(rblistSelect.SelectedItem.ToString()=="Company")
{
SqlCommand cmdPasswordUpdate=new SqlCommand("select
companyId,password from CompanyRegistration
where companyId=@companyid AND
password=@password",co);

cmdPasswordUpdate.Parameters.Add("@companyid"
,txtID.Text);

cmdPasswordUpdate.Parameters.Add("@password"
,txtOldPassword.Text);

SqlDataReader dr;
co.Open();
dr=cmdPasswordUpdate.ExecuteReader();
if(dr.Read())
{
dr.Close();
co.Close();

Response.Redirect("frmConfirmPassword.aspx?id
="+txtID.Text+"&newpassword="+txtNewPasswor
d.Text+"&table="+"CompanyRegistration");
}
else
{
lblMessage.Text="Enter your valid CompanyID and
Password";

E. No: 011120440
Page 173 3/14/2009
OnLineElecronics

dr.Close();
co.Close();
}
}
}
}
}

4.31 AdRotator Xml File


<Advertisements>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/ac2.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>One of the best Air Conditioner</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
<Caption>This is the caption for Ad#1</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/bt1.jpg</ImageUrl>
<NavigateUrl>http://www.wingtiptoys.com</NavigateUrl>
<AlternateText>One of the best Bread Toasters</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic2</Keyword>
<Caption>This is the caption for Ad#2</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/comp1.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>One of the best Computers</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
<Caption>This is the caption for Ad#1</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/cook9.jpg</ImageUrl>
<NavigateUrl>http://www.wingtiptoys.com</NavigateUrl>
<AlternateText>One of the best Cookers</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic2</Keyword>
<Caption>This is the caption for Ad#2</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/f5.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>One of the best Refrigerator</AlternateText>
<Impressions>80</Impressions>

E. No: 011120440
Page 174 3/14/2009
OnLineElecronics

<Keyword>Topic1</Keyword>
<Caption>This is the caption for Ad#1</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/Iron1.jpg</ImageUrl>
<NavigateUrl>http://www.wingtiptoys.com</NavigateUrl>
<AlternateText>One of the best Irons</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic2</Keyword>
<Caption>This is the caption for Ad#2</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/mix5.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>One of the best Mixers</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
<Caption>This is the caption for Ad#1</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/ms9.jpg</ImageUrl>
<NavigateUrl>http://www.wingtiptoys.com</NavigateUrl>
<AlternateText>One of the best Music System</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic2</Keyword>
<Caption>This is the caption for Ad#2</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/oven4.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>One of the best Oven</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
<Caption>This is the caption for Ad#1</Caption>
</Ad>

<Ad>
<ImageUrl>http://localhost/AnilElectronicsSite/images/tv1.jpg</ImageUrl>
<NavigateUrl>http://www.wingtiptoys.com</NavigateUrl>
<AlternateText>One of the best Televisions</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic2</Keyword>
<Caption>This is the caption for Ad#2</Caption>
</Ad>

</Advertisements>

E. No: 011120440
Page 175 3/14/2009
OnLineElecronics

4.32 Class Library(ClsShopping)

using System;
using System.Data.SqlClient;
using System.Data;

namespace clsShopping
{
public class ClsShopping
{
// The Connection string has been defined in this class
// library and its reference has been added in the project.

public SqlConnection con=new SqlConnection("data


source=ANIL;database=OnLineElectronics;user
id=sa;password=anidhil");

public ClsShopping()
{

}
}
}

E. No: 011120440
Page 176 3/14/2009
OnLineElecronics

CHAPTER-5

E. No: 011120440
Page 177 3/14/2009
OnLineElecronics

5. TESTING & IMPLEMENTATION

5.1: Testing Strategies


A strategy for software testing integrates software test case methods into a well-planned
series of steps that result in the successful construction of software. The strategy provides a road
map that describes the steps to be conducted as part of testing, when these steps are planned and
then undertaken, and how much effort, time, and resources will be required. Therefore, any testing
strategy must incorporate test planning, test case design, test execution, and resultant adapt
collection and evaluation.
A software testing strategy should be flexible enough to promote a customized testing
approach. At the same time, it must be rigid enough to promote reasonable planning and
management tracking as the project progresses.
The software engineering process may be viewed as the spiral illustration. Initially, system
engineering defines the role of software and leads to software requirements analysis, where the
information domain, function, behavior, performance, constraints, and validation criteria for
software are established. Moving inwards along the spiral, we come to design and finally to
coding. To develop computer software, we spiral inward along streamlines that decrease the level
of abstraction on each turn.
A strategy for software testing may also be viewed in the context of the spiral. Unit testing
begins at the vortex of the spiral and concentrates on each unit of the software as implemented in
source code. Testing progresses by moving outwards along the spiral to integration testing, where
the focus is on design and the construction of the software architecture. Testing another turn
outward on the spiral, we encounter validation testing, where requirements established as part of
software requirements analysis are validated against the software that has been constructed.
Finally, we arrive at system testing, where the software and other system elements are tested as a
whole. To test computer software, we spiral out along streamlines that broaden the scope of testing
with each turn. Considering the process from a procedural point of view, testing within the context
of software engineering is actually a series of four steps that are implemented sequentially.
Initially, tests focus on each component individually, ensuring that it functions properly as a unit.
Hence, the name unit testing. Unit testing makes heavy use of White-box testing techniques,

E. No: 011120440
Page 178 3/14/2009
OnLineElecronics

exercising specific paths in a module’s control structure to ensure complete coverage and
maximum error detection. Next, components must be assembled or integrated to form the complete
software package. Integration testing addresses the issues associated with the dual problems of
verification and program construction. Black-box test case design techniques are most prevalent
during integration, although a limited amount of White-box testing may be used to ensure coverage
of major control paths. After the software has been integrated (constructed), a set of high-order
tests are conducted. Validation testing provides final assurance that software meets all functional,
behavioral, and performance requirements. Black-box testing techniques are used exclusively
during validation.

High-order
Requirements tests

Integration test
Design

Code Unit
Test

Testing
“direction”

Software Testing Steps

The last high-order testing step falls outside the boundary of software engineering and into
the broader context of computer system engineering. Software, once validated, must be combined
with other system elements (e.g. , hardware, people, databases). System testing verifies that all
elements mesh properly and that overall system function/performance is achieved.

E. No: 011120440
Page 179 3/14/2009
OnLineElecronics

Unit Testing: Unit testing focuses verification efforts on the smallest unit of software design- the
software component or module. Using the component-level design description as a guide,
important control paths are tested to uncover errors within the boundary of the module. The
relative complexity of tests and uncovered errors is limited by the constrained scope established
for unit testing. The unit test is white-box oriented, and the step cab be conducted in parallel for
multiple components.

Unit Test Consederations: The module interface is tested to ensure that information properly
flows into and out of the program unit under test. The local data structure is examined to ensure
that data store temporarily maintains its integrity during all steps in an algorithm’s execution.
Boundary conditions are tested to ensure that the module operates properly at boundaries
established to limit or restrict processing. All independent paths through the control structure are
exercised to ensure that all statements in a module have been executed at least once. And finally,
all error handling paths are tested.

E. No: 011120440
Page 180 3/14/2009
OnLineElecronics

Interface
Local data structure boundary
Conditions Independent path Error
handling paths.

Module
…………
…………
…………
…………

Test
cases

Tests of data flow across a module interface are required before any other test is initiated. If
data do not enter and exit properly, all other tests are moot. In addition, local data structure
should be ascertained during unit testing.
Selective testing of execution paths is an essential task during the unit test. Test
cases should be designed to uncover errors due to erroneous computations, incorrect
comparisons, or improper control flow. Basis path and loop testing are effective techniques
for uncovering a broad array of path errors.
Among the more common errors in computation are:

1. Misunderstood or incorrect arithmetic precedence.


2. Mixed mode operations.

E. No: 011120440
Page 181 3/14/2009
OnLineElecronics

3. Incorrect initialization.
4. Precision inaccuracy.
5. Incorrect symbolic representation of an expression.

Test Cases should uncover errors such as:


1. Comparison of different data types.
2. Incorrect logical operators or precedence.
3. Exception of equality when precision error makes equality unlikely.
4. Incorrect comparison of variables.
5. Improper or nonexistent loop termination.
6. Failure to exit when divergent iteration is encountered.
7. Improperly modified loop variables.

Integration Testing: Integration testing is a systematic technique for constructing the program
structure while at the same time conducting tests to uncover errors associated with interfacing. The
objective is to take unit tested components and build a program structure that has been dictated by
design.
There is often a tendency to attempt nonincremental integration; that is, to construct the
program using a “big bang” approach. All components are combined in advance. The entire
program is tested as a whole. And chaos usually results! A set of errors is encountered. Correction
is difficult because isolation of causes is complicated by vast expanse of the entire program. Once
these errors are corrected new ones appear and the process continues in a seemingly endless loop.
Incremental integration is the antithesis of the big bang approach. The program is
constructed and tested in small increments, where errors are easier to isolate and correct; interfaces
are more likely to be tested completely; and a systematic test approach may be applied.
The various integration testing are as follows:
a.) Top- Down integration.
b.) Bottom-Up integration.
c.) Regression Testing
d.) Smoke Testing.

E. No: 011120440
Page 182 3/14/2009
OnLineElecronics

Validation Testing: At the culmination of integration testing, software is completely assembled


as a package, interfacing errors have been uncovered and corrected, and final series of software
test-validation testing – may begin. Validation can be defined in many ways, but a simple
definition is that validation succeeds when software functions in a manner that can be reasonably
expected by the customer. At this point a battle-hardened software developer might protest: “Who
or What is the arbiter of reasonable expectations?”
Software validation is achieved through a series of black-box tests that demonstrate
conformity with requirements. A test plan outlines the classes of tests to be conducted and test
procedure defines specific test cases that will be used to demonstrate conformity with
requirements. Both the plan and procedure are designed to ensure that all functional requirements
are satisfied, all behavioral characteristics are achieved, all performance requirements are attained,
documentation is correct, and human- engineered and other requirements are met.
After each validation test case has been conducted, one of two possible conditions exists:

1. The function or performance characteristics conform to specification and are


accepted.
2. A deviation from specification is uncovered and a deficiency list is created.
Deviation or errors discovered at this stage in a project can rarely be corrected prior
to scheduled delivery. It is often to negotiate with the customer to establish a
method for resolving deficiencies.

Alpha & Beta Testing: It is virtually impossible for a software developer to foresee how the
customer will really use a program. Instructions for use may be misinterpreted; strange
combinations of data may be regularly used; output that seemed clear to the tester may be
unintelligible to a user in the field.
When custom software is built for one customer, a series of acceptance
tests are conducted to enable the customer to validate all requirements. Conducted by the end user
rather than software engineers, an acceptance test can range from an informal “test drive” to a
planned and systematically executed series of tests. In fact, acceptance testing can be conducted
over a period of weeks or months, thereby uncovering cumulative errors that might degrade the
system over time.

E. No: 011120440
Page 183 3/14/2009
OnLineElecronics

The alpha test is conducted at the developer’s site by a customer. The software is used in a
natural setting with the developer “looking over the shoulder” of the user and recording errors and
usage problems. Alpha tests are conducted in a controlled environment.
The beta test is conducted at one or more customer sites by the end-user of the software.
Unlike alpha testing, the developer is generally not present. Therefore, the beta test is a “live”
application of the software in an environment that cannot be controlled by the developer. The
customer records all problems that are encountered during beta testing and reported during beta
tests, software engineers make modifications and then prepare for release of the software product
to the entire customer base.

System Testing: Software is incorporated with other system element (e.g. hardware, people,
information), and a series of system integration and validation test are conducted. These test fall
outside the scope of the software process and are not conducted solely by software engineers.
However, steps are taken during software design and testing van greatly improves the portability of
successful software integration in the larger system.
A classic system testing problem is “finer-pointing”. This occurs when an error is
uncovered, and each system element developer blames the other for the problem. Rather than
indulging in such nonsense, the software engineer should anticipate potential interfacing problems
and:
a.) Design error-handling paths that test all information coming from other
elements of the system.
b.) Conduct a series of tests that stimulate bad data or other potential errors at the
software interface.
c.) Record the results of tests to use as “evidence” if finger-pointing does occur.
d.) Participate in planning and design of system tests to ensure that software is
adequately tested.

System testing is actually a series of different tests whose primary purpose is to fully
exercise the computer-based system. Although each test has a different purpose, al work to verify
that system elements have been properly integrated and perform allocated functions.

E. No: 011120440
Page 184 3/14/2009
OnLineElecronics

Types of System Tests are as follows:

a.) Recovery Testing.


b.) Security Testing.
c.) Stress Testing.
d.) Performance Testing.

5.2 Testing Web Based Applications


Testing is the process of exercising software with the intent of finding errors. This
fundamental philosophy does not change for WebApps. In fact, because Web-based systems and
applications reside on a network and interoperate with many different operating systems, browsers,
hardware platforms, and communications protocol, search for errors represents a significant
challenge for web-based engineers.
The approach for Web-based testing adopts the basic principles for all software testing and
applies a strategy and tactics that have recommended for object-oriented systems.
1. The Content model for WebApp is reviewed to uncover errors: This “testing” activity is
similar in many respects to copy editing a written document. Infact, a large Web-site might
enlist the services of a professional copy editor to uncover typographical errors,
grammatical mistakes, errors in content consistency, errors in graphical representations, and
cross-referencing errors.
2. The Design model for the WebApp is reviewed to uncover navigation errors:Use-cases,
derived as part of the analysis activity, allow a Web engineer to exercise each usage
scenario against the architectural and navigation design. In essence, these nonexecutable
tests help uncover errors in navigation. In addition, the navigation links are reviewed to
ensure that they correspond with those specified in each SNU for each user role.
3. Selected processing components and Web pages are unit tested: When WebApps are
considered, the concept of the unit changes. Each Web page encapsulates content,
navigation links, and processing elements. It is not always possible or practical to test each
of these characteristics individually. In many cases, the smallest testable unit is the web
page. Unlike unit testing of conventional software, which tends to focus on the algorithmic

E. No: 011120440
Page 185 3/14/2009
OnLineElecronics

detail of a module and the data that flow across the module interface, page-level testing for
WebApps is driven by the content, processing, and links encapsulated by the We page.
4. The architecture is constructed and integration test are conducted: The strategy for
integration testing depends on the architecture that has been chosen for WebApp. If the
WebApp has been designed with a linear, grid, or simple hierarchical structure, it is
possible to integrate Web pages in much the same way as we integrate modules for
conventional software. However, if a mixed hierarchy or network(Web) architecture is
used, integration testing is similar to the approach used for OO systems. Thread-based
testing can be used to integrate the set of Web pages required to respond to a user event.
Each thread is integrated and tested individually. Regression testing is applied to ensure
that no side effects occur. Cluster testing integrates a set of collaborating pages. Test cases
are derived to uncover errors in the collaborations.
5. The assembled WebApp is tested for overall functionality and content delivery: Like
conventional validation, the validation of Web-based system and applications focus on
user-visible actions and user-recognizable output from the system. To assist in the
derivation of validation test, the tester should draw upon use-cases. The use-cases provides
a scenario that has a high likelihood of uncovering errors in user interaction requirements.
6. The WebApp is implemented in a variety of different environmental configurations and is
tested for compatibility with each configuration: A cross-reference matrix that defines all
probable operating systems, browsers, hardware platforms, and communications protocols
is created. Tests are then conducted to uncover errors associated with each possible
configuration.
7. The WebApp is tested by a controlled and monitored population of end users: A population
of users that encompasses every possible user role is chosen. The WebApp is exercised by
these users and the results of their interaction with the system are evaluated for content and
navigation errors, usability concerns, compatibility concerns, and WebApp reliability and
performance.
Because many WebApps evolve continuously, testing process is an ongoing activity,
conducted by Web support staff who use regression tests derived from the tests developed when
the WebApps was first engineered.

E. No: 011120440
Page 186 3/14/2009
OnLineElecronics

5.3 Implementation

A crucial phase in the system life cycle is the successful implementation of the new system design.
Implementation includes all those activities that take place to convert from the old system to the
new. The new system may be totally new, replacing an existing manual or automated system.
Even the best systems can be weakened if the analysts managing the implementation do not
attend to every important detail.

5.3.1 Design of Test Data:

Test Data:The design of test data for software and other engineered products can be as challenging
as the initial design of the product itself. Yet, for reasons that we have already discussed, software
engineers often treat testing as an afterthought, developing test cases that may “feel right” but have
little assurance of being complete. Recalling the objectives of testing, we must design tests that
have the highest likelihood of finding the most common errors with a minimum amount of time
and effort.
A rich variety of test case design methods have evolved for software. These methods
provide the developer with a systematic approach to testing. More important, methods provide a
mechanism that can help to ensure the completeness of tests and provide the highest likelihood for
uncovering errors in software.
Any engineered products can be tested in one of the two ways:
1. Knowing the specified function thata producthas been designed to perform, tests can be
conducted that demonstrates each function is fully operational while at the same time
searchin for errors in each function
2. Knowing the internal workings of a product, tests cab be conducted to ensure that “all gears
mesh”, that is, internal operations are performed according to specifications and all internal
components have been adequately excersied.

1. companyId: This is a data whose size has been defined 15 varhar.We will test the data by
entering data of more than 15 characters.
Valid Data: C000000001,C000002,C00000000000001,C123131415166.
Invalid Data: C000000000000001,121314151512525243.

E. No: 011120440
Page 187 3/14/2009
OnLineElecronics

2. userId: This is a data whose size has been defined 15 varhar.We will test the data by
entering data of more than 15 characters.
Valid Data: U000000001,U000002,U00000000000001,U123131415166.
Invalid Data: U000000000000001,121314151512525243.

3. itemId: This is a data whose size has been defined 15 varhar.We will test the data by
entering data of more than 15 characters.
Valid Data: I000000001,I000002,I00000000000001,I1123131415166.
Invalid Data: I000000000000001,I21314151512525243.

4. password: This field has been defined as 25 varchar. Therefore again it will be cjecked for
by entering more than 25 characters.
Valid Data: anidhil,anil,12131415,121313141414115151516616.
Invalid Data: 15783465785655321314151512525243.

5. registrationDate: This is a date field which is checked for by entering any other value e.g.
string as simply interger values in some other format.
Valid Data: 12/6/2005,3/7/2004
Invalid Data: 3ghhg,56236236,444/4/4000000

6. capacityInTonnes: This is a numeric field which can be checked for by entering some
string value.
Valid Data: 2,5,1.
Invalid Data: 157243,dgfdgg.

7. marketPrice: This is a numeric field which can be checked for by entering some string
value.
Valid Data: 4115151516,160000,999999999.
Invalid Data: anidhil,anil, gfrtyrtrt,6/72005,12131314141
8. discount: This is a numeric field which can be checked for by entering some string value.

E. No: 011120440
Page 188 3/14/2009
OnLineElecronics

Valid Data: 12131415,4116.


Invalid Data: 1151252524,fghfgfg,7/6/2000.

9. firstSecondHand: This is a data whose size has been defined 10 varhar.We will test the
data by entering data of more than 10 characters.

Valid Data: First,Second.


Invalid Data: 15512525243,First Hand Product, Second Hand Product.

10. amount: This is a numeric field which can be checked for by entering some string value.
Valid Data: 230000000,160000000,646474747.
Invalid Data: anidhil,anil,1411515151,4/6/2004.

11. bankId: This is a string(varchar) field of size 15 which can be checked for by enetering
some string having more characters than 15.
Valid Data: B00000002,B00000000004,anidhil.
Invalid Data: 157834657854433,B0000000000000005.

12. address: This is a again a varchar(25) field which can be checked for by entering some
characters more than its predefined size.
Valid Data: 121-D,Sec-52,Noida
Invalid Data: 157834ygftyefggeyfgegfyfgeyfgfy512525243,5/7/2005

13. img: This field will store the full address of the particular image and we have to check this
by ensuring that the field size doesn’t exceeds its size.
Valid Data: anidhil,anil,12131415,121313141414115151516616.
Invalid Data: 15783465785655321314151512525243.

14. itemPrice: This is a field which has been defined numeric(9) therefore to create a test data
we can enter string or numeric value greater than 9 digits.
Valid Data: 12131415,1213131414.

E. No: 011120440
Page 189 3/14/2009
OnLineElecronics

Invalid Data: anidhil,anil,14151512525243.

15. itemName: This is a string(varchar) field of size 15 which can be checked for by enetering
some string having more characters than 15.
Valid Data: Octavia, AirConditioner.
Invalid Data: 157851512525243,dcydgfdyagdhasvd,5/7/2005.

16. capacityInWatt: This is a numeric field which can be checked for by entering some string
value and also entering string values.
Valid Data: 12131414,4000,999999999.
Invalid Data: anidhil,anil,1213hghg1415,12151516616,3/9/2004

17. compatibilityWth: It is a field whose size has been defined 100 therefore to create a test
data we can enter a data of more than 100 character.
Valid Data: Computers,VCD’s,Television,etc.
Invalid Data: Data more than 100 characters.

18. description: It is a field whose size has been defined 200 therefore to create a test data we
can enter a data of more than 200 character.
Valid Data: Data less than or equal to 200 characters.
Invalid Data: Data more than 200 characters.

19. brandName: It is a field whose size has been defined 100 therefore to create a test data we
can enter a data of more than 15 character.
Valid Data: Soni, Sumsung, Videocon,Telerama,Whirlpool.
Invalid Data: aniddsvfdsdfdhil,fsdfsdfsdanil,4/7/2005,12131314141y8.

20. warranty: This is a field which has been defined numeric(9) therefore to create a test data
we can enter string or numeric value greater than 9 digits.
Valid Data: 12,3,4.
Invalid Data: anidhil,anil,1/5/2007,121dfg16616.

E. No: 011120440
Page 190 3/14/2009
OnLineElecronics

21. category: This is a string(varchar) field of size 15 which can be checked for by enetering
some string having more characters than 15.
Valid Data: anidhil,anil,12131415, A Category.
Invalid Data: 1578346d3dfgdf25243,4/4/2004.

22. capacityInLitres: This is a field which has been defined numeric(9) therefore to create a
test data we can enter string or numeric value greater than 9 digits.
Valid Data: 400,999999999,185.
Invalid Data: anidhil,anil,121gdf31415,12131314146

23. sizeInInches: This is a field which has been defined numeric(9) therefore to create a test
data we can enter string or numeric value greater than 9 digits.
Valid Data: 14141,200,15,25,30.
Invalid Data: anidhil,anil,12131415,12131314

5.5 Training

Even well-designed and technically elegant systems can succeed or fail because of the way
they are operated and used. The quality of training received by the personnel involved with the
system in various capacities helps or hinders. Those who will be associated with or affected by the
system must know in detail that:-
• What their roles will be
• How they can use the system
• What the system will or will not do.
• Both systems operators and users need training.
Training Systems Operators

Running of the system successfully depend on the personnel working in the computer
centre. They are responsible for providing the necessary support. Their training must ensure that
they are able to handle all possible operations.

E. No: 011120440
Page 191 3/14/2009
OnLineElecronics

The operators’ training should include:-


• A knowledge of what constitutes normal operation and use, what common malfunctions
may occur, how to recognize them, and what steps to take when they arise.
• Operators should be given a troubleshooting list which :
• Identifies possible problems and remedies for them,
Names and telephones numbers of individuals to contact when unexpected or unusual problems
arise.
• Familiarization with run procedures, which involves working through the sequence of
activities needed to use a new system on an ongoing basis.

User Training
User training may involve:
• Equipment use, say a microcomputer is in use, and then in these cases, users must be
instructed first in how to operate the equipment.
• It must instruct individuals in troubleshooting the system, determining whether a problem
that arises is caused by the equipment or software or by something they have done in using
the system. Including a troubleshooting guide in system documentation.
• User training deals with the operation of the system itself. Training in data coding
emphasizes the methods to be followed in capturing data from transactions or preparing
data needed for decision support activities.
• Users will have to prepare disks, load paper into printers, or change ribbons on printers. In
other words user training must include some time devoted to systems maintenance
activities.

5.6 Post Implementation Review

After the system is implemented and conversion is complete, a review should be conducted
to determine whether the system is meeting expectations and where improvements are needed.

E. No: 011120440
Page 192 3/14/2009
OnLineElecronics

A post implementation review measures the systems’ performance against pre-defined


requirements. It determines how well the system continues to meet performance specifications.
A post –implementation review is an evaluation of a system in terms of the extent to which
the system accomplishes stated objectives and actual project costs exceed initial estimates. It is
usually a review of major problems that need converting and those that surfaced during the
implementation phase.
The post implementation study begins with the review team, which gathers and reviews
requests for evaluation. Unexpected change in the system that affects the user or system
performance is a primary factor that prompts system review. Once request is filed, the user is asked
how well the system is functioning to specifications or how well the measured benefits have been
realized. Suggestions regarding changes and improvements are also asked for.

CHAPTER-6

E. No: 011120440
Page 193 3/14/2009
OnLineElecronics

6. Security & Project Management

6.1 System Security

E. No: 011120440
Page 194 3/14/2009
OnLineElecronics

Just when the computer age will arise is no longer a question here but its impact is every
where. Every system must provide built in feature for security and integrity, privacy and
confidentiality. This determines the file structure, data structure and access procedures.

As far as our system is concerned from S/w point of view every data entry, updating, and
deleting and transaction processes (forms) are protected from unauthorized user by using
password. System asks for a password before opening the main web page. If the given password is
illegal it does not give permission to see the existing data as well as entering new data.

6.2 Project Management

6.2.1 Pert Chart: Pert Chart (program evaluation and review technique), is the scheduling
project that can be applied to software development. This technique is used to allow software
planner to determine the critical path the chain of tasks that determines the duration of the project.
Establish most likely time estimates for individual tasks by applying statically modes.
Calculate boundary times that defines a time “window“for a particular task.
Boundary time calculation can be vary in software project scheduling, boundary time
calculations lead to a determination of critical path and provide the manager with a quantitative
method for evaluating progress as tasks are completed.
There are some important boundary times that may be discerned from a PERT are as
follows:-
• The earliest time that a task can begin when all preceding tasks are complete in the shortest
time.
• The latest time for task initiation before the minimum project completion time is delayed.
• The earliest finish the sum of the earliest start and the task duration.
• The latest finish – the sum of the earliest added to task duration.
• The total float- the amount of surplus time or leeway allowed in scheduling tasks so that
the network critical path is maintained on schedule.

Project Phases Days Activity


Feasibility Study 6 A
E. No: 011120440
Page 195 3/14/2009
OnLineElecronics

System Analysis 10 B
System Design 15 C
Database Design 7 D
Coding & Design 80 E
System Integration 6 F
System Testing 10 G
System Implementation 3 H
User Training 10 I
Post-Implementation Review 7 J
Total Days 154

15 6
C D F G

10 7 80 10

6 7
A B E H
3
start finish

6.2.2 Gantt Chart:


The Gantt chart is the standard format for displaying a schedule graphically. It consists of a
horizontal bar chart with time as the horizontal axis and either resources, jobs, or orders as the
vertical axis. Individual operations are displayed as horizontal bars in the chart, indicating the time
at which the job begins and ends. Many variations on the Gantt chart exist to display additional
kinds of information. Gantt charts can be drawn physically on paper, but nowadays are usually
implemented through computer software.
A Gantt chart is a horizontal bar chart developed as a production control tool in 1917 by
Henry L. Gantt, an American engineer and social scientist. Frequently used in project management,
a Gantt chart provides a graphical illustration of a schedule that helps to plan, coordinate, and track
specific tasks in a project. Gantt charts may be simple versions created on graph paper or more
complex automated versions created using project management applications such as Microsoft
project or Excel.

E. No: 011120440
Page 196 3/14/2009
OnLineElecronics

A Gantt chart is constructed with a horizontal axis representing the total time span of the
project, broken down into increments (for example, days, weeks, or months) and a vertical axis
representing the tasks that make up the project (for example, if the project is outfitting your
computer with new software, the major tasks involved might be: conduct research, choose
software, install software). Horizontal bars of varying lengths represent the sequences, timing, and
time span for each task. Using the same example, you would put "conduct research" at the top of
the verticle axis and draw a bar on the graph that represents the amount of time you expect to
spend on the research, and then enter the other tasks below the first one and representative bars at
the points in time when you expect to undertake them. The bar spans may overlap, as, for example,
you may conduct research and choose software during the same time span. As the project
progresses, secondary bars, arrowheads, or darkened bars may be added to indicate completed
tasks, or the portions of tasks that have been completed. A vertical line is used to represent the
report date.

Gantt charts give a clear illustration of project status, but one problem with them is that
they don't indicate task dependencies - you cannot tell how one task falling behind schedule affects
other tasks. The PERT chart, another popular project management charting method, is designed to
do this. Automated Gantt charts store more information about tasks, such as the individuals
assigned to specific tasks, and notes about the procedures. They also offer the benefit of being easy
to change, which is helpful. Charts may be adjusted frequently to reflect the actual status of project
tasks as, almost nevitably, they diverge from the original plan.

E. No: 011120440
Page 197 3/14/2009
OnLineElecronics

DURATION IN WEEKS

0 2 4 6 8 10 12 14 16 18
ANALYSIS

DESIGN
CODING

TESTING
IMPLEMENTATION

DOCUMENTATION
DOCUMENTAT

TIMELINE CHART (GANTT CHART)

CHAPTER-7

E. No: 011120440
Page 198 3/14/2009
OnLineElecronics

7. SYSTEM MAINTENANCE

Once the system is delivered and installed, there is a brief warranty period during which time
the sales unit is responsible for maintenance.The last part of the system development life cycle is
system maintenance which is actually the implementation of the post-implementation review plan.

E. No: 011120440
Page 199 3/14/2009
OnLineElecronics

When systems are installed, they are generally used for long periods. However, this period of use
brings with it the need to continually maintain the system.
The study on the maintenance requirement for the information system revealed that:
a) 60-90 per cent of the overall cost of software during the life of a system is spent on
maintenance.
b) In documented cases, the cost of maintenance, when measured on the basis of writing each
instruction in coding form, is more than 50 times the cost of developing a system.
c) The software demand is increasing at faster rate than supply. Many programmers are
devoting more time on systems maintenance than on new software development. There is a
backlog of new development work.

The maintenance can be classified as corrective, adaption or perfective.Corrective maintenance


means repairing, processing or performance failures or making alteration s because of previously
ill-defined problems.Adaption maintenance means changing the program functions. Enhancing the
performance or modifying the programs according to user’s additional or changing needs are
included in perfective maintenance.Maintenance covers a wide range of activities including
correcting coding and design errors, updating documentation and test data and upgrading user
support.

The keys to reduce the need for maintenance while making it possible to carry on with
essential tasks more efficiently are as follows:
a) More accurately defining the user’s requirement during systems development.
b) Preparation of system documentation in a better way.
c) Using more effective ways for designing processing logic and communicating it to
project team members.
d) Making better use of existing tools and techniques.
e) Managing the systems engineering process effectively.

An addition factor in the success of the maintenance programmer is the work


environment. Maintenance programmers have generally been paid less amount and receive less
recognition than other programmers. Maintenance demands more orientation and training than any

E. No: 011120440
Page 200 3/14/2009
OnLineElecronics

other programming activities, especially for entry-level programmers. The environment must
recognize the needs of the maintenance programmer for tools, methods and training.

E. No: 011120440
Page 201 3/14/2009
OnLineElecronics

CHAPTER-8

E. No: 011120440
Page 202 3/14/2009
OnLineElecronics

8. FUTURE SCOPE

1. This model can be enhanced and applied to similar product categories of special operations
like Automobiles,Property,Books etc. and other B2C Ecommerce websites.
2. Initially it is text based which can be enhanced to support multimedia and hypermedia
application. The items can be displayed in the audio and video format.
3. A Web based application needs provision to support scalability to cater to growth.The
Architecture should support the constant continuous growth of operation.
4. Dynamic and periodic updations of data information flow ,operations of data information
flows,operation required.
5. Security features, fraudulent transactions to be properly taken care off .Theft or misuse of
any kind should be averted and system should have built in feature for prevention of such
things and protection.
6. Faster processing of information as compared to the current system with high accuracy and
reliability.
7. Automatic and error free report generation as per the specified format.
8. Automatic calculation and generation of correct and precise Bills-thus reducing much of
the workload on the accounting staff and the errors arising due to manual calculations.
9. Better vigilance of the Salesmen and tracking of carats is now possible.
10. Better sales management is foreseen with the a few enhancements in this application.

A future application of this system lies in the fact that the proposed system would remain
relevant in the future. In case there be any additions or deletion of the products, addition or
deletion of any salesman in the any type of modification in future can be implemented easily. The
data collected by the DMSP will be useful because it has been developed on the basic structure of
the distribution management. All these result in high client-satisfaction, hence, more and more
business for the company that will scale the company business to new heights in the forthcoming
future.

E. No: 011120440
Page 203 3/14/2009
OnLineElecronics

BIBLIOGRAPHY

The books which I refered during the development of this project where of great
help to me. It assisted me a lot and rather gave me the condifence to perform such a work. The
name of some of these books are listed below :

1. ASP.Net 1.1 with Visual C#.Net 2003 (Beginning,Professional)


by Wrox.
(Wiley Publishing,Inc.)

2. C#.Net 2003 (Beginning,Professional)


by Wrox.
(Wiley Publishing,Inc.)

3. C#.Net
by E.Balagurusamy
(Tata McGraw-Hill Publishing Company Ltd.)

4. ASP.Net 1.1 with C#.Net 2003


by Orelly.

5. C#.Net
by Patrick Naugton Herbert Schildt
(Tata MacGraw-Hill Publishing Company Ltd.)

6. XML(Sikkim Manipal University)

7. HTML

from Maran Graphics& IDG Books INDIA.


8. Software Engineering(Fifth Edition)
by Roger S. Pressman,Ph.D.
(MC Graw Hill)

I am very greatful to the writers of these books which has been of great help to me. I
am really very thankful to them.

E. No: 011120440
Page 204 3/14/2009

Das könnte Ihnen auch gefallen