Anda di halaman 1dari 73

1

1.INTRODUCTION
1.1 SYNOPSIS
This project handles the rating process of the website. There are so many
websites around the world which distribute the information given by their owners. It
is an effective and easy way to reach the information to the people. There are different
types of websites and their pages are with attractive information and design. Rating is
a method to know the people mentality about the pages in the website and it also helps
the website holder about viewers response.
1.2 PROJECT DESCRIPTION
In This project handles the rating process of the website. There are so many
websites around the world which distribute the information given by their owners. It
is an effective and easy way to reach the information to the people.
There are different types of websites and their pages are with attractive
information and design. Rating is a method to know the people mentality about the
pages in the website and it also helps the website holder about viewers response.
There should be different kind of rating depending upon the sites. If an e-
commerce site the rating should be defined according to the users wish or if it is an
organiation site means rating should be differ.
!ere we are using a techni"ue which directly interacts with viewers by
developing a site which gets the viewers response through hit count and rating from
users of different sites. #nd also we can act as a dealership for advertisements in these
websites.
This project contains $ive modules%-
&
Display the Rating
Administati!n
C"st!me Registati!n
Ad P!sting
Rep!ts
Display the Rating# $
This module contain the home page of our site which displays our client rating
informations to the viewers and also it counts the number of visitors to our sites daily.
This count is stored into the database. !ere we using session state mechanism to
know e'act counts. The rating of other sites i.e.( our client sites are displayed from
their database with the respective permission. This module contains the links for
posting #ds( customer registration( contact address etc.
Administati!n# $
This module handles the administration work among the website development
and maintenance. The maintenance deals with the customer maintenance and their
advertisements. The admin module review the rating values periodically( according to
the ranking the amount of advertisement will be increased.
The #dministrator can view the customer details( Rating( advertisement details
in separate forms. The admin has rights to choose the #ds that to be posted. #dmin
module enables to delete the e'pired datas from our database.
C"st!me Registati!n# $
This module contains a form to get the customer details that is stored in
database. These details are maintained confidentially because in that form we get the
customer credit card number. This number is encrypted and transfers to the server. )o
there is no hackers problem.


Ad P!sting# $
*
This module is an important module for our website. In this module the
customer can post advertisements to our client sites through us( so we get commission
amount. The posted #d file must be an document file or te't file. +o other format is
allowed to post. These files are stored in our server database and then it send to our
clients for advertisements.
Rep!t# $
This module is developed using an inbuilt tool i.e.( ,rystal Reports. -ith this we
produce enhanced reports. -e using such type of charts to produce the reports in
friendly manner i.e.( we can take the report in printed manner. )ome of these reports
are displayed to the viewers to know our progress.
S"ggesti!n %aintenan&e# $
This module contain a feed back form which gets the viewer .s suggestion
about the website. This suggestion will be displayed on the separate bo' or page as
per user re"uest.
This project features%-
1. T,/0I/ and $T/ ,onnections.
&. )tored /rocedures
*. 1ser ,ontrols
2. ,lient side validation
3. )ession state maintenance

2.SYSTE% STUDY AND ANA'YSIS
2
2.1 E(isting System
The e'isting sites in the Internet are contains just a feedback forms. The
viewers can enter their suggestions and opinions among the site. It is posted to the
admin of the sites.( the admin or other staffs regarding to the maintenance of the site
can response according to the feedback. 4ut the feedback system is difficult for users
to fill the forms. 1sers dont want to waste their times during browsing by doing like
this type of activities.
In the e'isting #d posting methods if a customer want to post they ads they
want to register in google and also in that web page. )o its difficult to find which web
sites are allows posting customer ads. ,ustomer cant easily find good web site to
post they ads.
2.2 P!p!sed System
The proposed system provides another way of pulsing the viewers thought
about the websites. !ere we provide a form contain a group of options. That contains
the status of the websites like poor to e'cellent.
In that the users can vote their opinion. It is simple than e'isting system. These
data are sent to the database and the admin can know the thoughts of the viewers and
he can post the vote result to the page. This helps the viewers to know the status of the
site. In this project there is another module of knowing how many users are view the
website per day. 1sing this site the customers can post their #ds to our site or our
client sites.
This project enables providing the client site rating by adding them in to our
site. This is done by the client site admin. They simply register their 1R5 address
and web server name in our registration form.
3
2.) SYSTE% ANA'YSIS
)ystem #nalysis is the process of gathering and interpreting facts( diagnosing
the problems and using the information to recommend improvements on the system.
It is a problem solving activity that re"uires intensive communication between the
system users and system developers.
)ystem analysis or study is an important phase of any system development
process. The system is studied to the minutest detail and analyed. The system
analyst plays the role of an interrogator and dwells deep into the working of the
present system.
The system is viewed as a whole and inputs to the system are identified. The
output from the organiation is traced through various phases of the processing of
inputs.
)ystem analysis is concerned with becoming aware of the problem(
identifying the relevant and decisional variables( analying and synthesiing the
various factors and determining an optimal or atleast a satisfactory solution or
program of action.
). SYSTE% CON*I+URATION
).1 ,ARD-ARE SPECI*ICATION
6
The hardware used for the development of the project is%
/R7,8))7R % /8+TI19 III :66 9!
R#9 % 1&: 9; ); R#9
97+IT7R % 13< ,757R
!#R; ;I)= % &> ?4
$57//@ ;RIA8 % 1.22 94
,; ;RIA8 % 5? 3&B
=8@47#R; % )T#+;#R; 1>& =8@)
971)8 % * 41TT7+)
).2 SO*T-ARE SPECI*ICATION
The software used for the development of the project is%
7/8R#TI+? )@)T89 % -indows B/ /rofessional
8+AIR7+98+T % Aisual )tudio .+8T &>>3
.+8T $R#98-7R= % Aersion 1.1
5#+?1#?8 % ,C.+8T
4#,=8+; % )D5 )8RA8R &>>>
).) SO*T-ARE DESCRIPTION
).).1 *EATURES O* ASP.NET
E
T,E .NET *RA%E-OR.
The .+8T $ramework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet.
O/JECTI0ES O*. NET *RA%E-OR.#
1. To provide a consistent object-oriented programming environment whether object
codes is stored and e'ecuted locally on Internet-distributed( or e'ecuted remotely.
&. To provide a code-e'ecution environment to minimies software deployment and
guarantees safe e'ecution of code.
*. 8liminates the performance problems.
2. There are different types of application( such as -indows-based applications and
-eb-based applications.
3. To make communication on distributed environment to ensure that code be
accessed by the .+8T $ramework can integrate with any other code.
CO%PONENTS O*. NET *RA%E-OR.
a1 T,E CO%%ON 'AN+UA+E RUNTI%E 2C'R1#
The common language runtime is the foundation of the .+8T $ramework. It
manages code at e'ecution time( providing important services such as memory
management( thread management( and remoting and also ensures more security and
robustness. The concept of code management is a fundamental principle of the
runtime. ,ode that targets the runtime is known as managed code( while code that
does not target the runtime is known as unmanaged code.
31 *EATURES O* T,E CO%%ON 'AN+UA+E RUNTI%E#
:
The common language runtime manages memoryF thread e'ecution( code
e'ecution( code safety verification( compilation( and other system services these are
all run on ,5R.
)ecurity.
Robustness.
/roductivity.
/erformance.
SECURITY#

The runtime enforces code access security. The security features of the
runtime thus enable legitimate Internet-deployed software to be e'ceptionally feature
rich. -ith regards to security( managed components are awarded varying degrees of
trust( depending on a number of factors that include their origin to perform file-access
operations( registry-access operations( or other sensitive functions.
RO/USTNESS#
The runtime also enforces code robustness by implementing a strict type- and
code-verification infrastructure called the common type systemG,T)H. The ,T)
ensures that all managed code is self-describing. The managed environment of the
runtime eliminates many common software issues.
PRODUCTI0ITY#
The runtime also accelerates developer productivity. $or e'ample(
programmers can write applications in their development language of choice( yet take
full advantage of the runtime( the class library( and components written in other
languages by other developers.
PER*OR%ANCE#
I
The runtime is designed to enhance performance. #lthough the common
language runtime provides many standard runtime services( managed code is never
interpreted. # feature called just-in-time GJITH compiling enables all managed code to
run in the native machine language of the system on which it is e'ecuting.
$inally( the runtime can be hosted by high-performance( server-side
applications( such as 9icrosoftK )D5 )erverL and Internet Information )ervices
GII)H.
&1 T,E .NET *RA%E -OR. C'ASS 'I/RARY#
It is a comprehensive( object-oriented collection of reusable types used to
develop applications ranging from traditional command-line or graphical user
interface G?1IH applications to applications based on the latest innovations provided
by #)/.+8T( such as -eb $orms and B95 -eb services.

The .+8T $ramework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the e'ecution of managed
code( thereby creating a software environment that can e'ploit both managed and
unmanaged features. The .+8T $ramework not only provides several runtime hosts(
but also supports the development of third-party runtime hosts.
Internet 8'plorer is an e'ample of an unmanaged application that hosts the
runtime Gin the form of a 9I98 type e'tensionH. 1sing Internet 8'plorer to host the
runtime to enables embeds managed components or -indows $orms controls in
!T95 documents.
1>
).).2 A/OUT ASP.NET
#)/.+8T is the ne't version of #ctive )erver /ages G#)/HF it is a unified -eb
development platform that provides the services necessary for developers to build
enterprise-class -eb applications. -hile #)/.+8T is largely synta' compatible( it
also provides a new programming model and infrastructure for more secure( scalable(
and stable applications.
#)/.+8T is a compiled( +8T-based environment( we can author applications in
any .+8T compatible language( including Aisual 4asic .+8T( ,C( and J)cript .+8T.
#dditionally( the entire .+8T $ramework is available to any #)/.+8T application.
;evelopers can easily access the benefits of these technologies( which include the
managed common language runtime environment G,5RH( type safety( inheritance( and
so on.
#)/.+8T has been designed to work seamlessly with -@)I-@? !T95
editors and other programming tools( including 9icrosoft Aisual )tudio .+8T. +ot
only does this make -eb development easier( but it also provides all the benefits that
these tools have to offer( including a ?1I that developers can use to drop server
controls onto a -eb page and fully integrated debugging support.
;evelopers can choose from the following two features when creating an
#)/.+8T application. -eb $orms and -eb services( or combine these in any way
they see fit. 8ach is supported by the same infrastructure that allows you to use
authentication schemes( cache fre"uently used data( or customie your applicationMs
configuration( to name only a few possibilities.
-eb $orms allows us to build powerful forms-based -eb pages. -hen
building these pages( we can use #)/.+8T server controls to create common 1I
elements( and program them for common tasks. These controls allow we to rapidly
build a -eb $orm out of reusable built-in or custom components( simplifying the
code of a page.
11
#n B95 -eb service provides the means to access server functionality
remotely. 1sing -eb services( businesses can e'pose programmatic interfaces to their
data or business logic( which in turn can be obtained and manipulated by client and
server applications. B95 -eb services enable the e'change of data in client-server or
server-server scenarios( using standards like !TT/ and B95 messaging to move data
across firewalls. B95 -eb services are not tied to a particular component technology
or object-calling convention. #s a result( programs written in any language( using any
component model( and running on any operating system can access B95 -eb
services.8ach of these models can take full advantage of all #)/.+8T features( as
well as the power of the .+8T $ramework and .+8T $ramework common language
runtime.
#ccessing databases from #)/.+8T applications is an often-used techni"ue
for displaying data to -eb site visitors. #)/.+8T makes it easier than ever to access
databases for this purpose. It also allows us to manage the database from your code .
#)/.+8T provides a simple model that enables -eb developers to write logic
that runs at the application level. ;evelopers can write this code in the global.asp'
te't file or in a compiled class deployed as an assembly. This logic can include
application-level events( but developers can easily e'tend this model to suit the needs
of their -eb application.
#)/.+8T provides easy-to-use application and session-state facilities that are
familiar to #)/ developers and are readily compatible with all other .+8T $ramework
#/Is. #)/.+8T offers the I!ttp!andler and I!ttp9odule interfaces.
Implementing the I!ttp!andler interface gives you a means of interacting
with the low-level re"uest and response services of the II) -eb server and provides
functionality much like I)#/I e'tensions( but with a simpler programming model.
Implementing the I!ttp9odule interface allows you to include custom events that
participate in every re"uest made to your application.
1&
#)/.+8T takes advantage of performance enhancements found in the .+8T
$ramework and common language runtime. #dditionally( it has been designed to offer
significant performance improvements over #)/ and other -eb development
platforms. #ll #)/.+8T code is compiled( rather than interpreted( which allows early
binding( strong typing( and just-in-time GJITH compilation to native code( to name only
a few of its benefits. #)/.+8T is also easily factorable( meaning that developers can
remove modules Ga session module( for instanceH that are not relevant to the
application they are developing.
#)/.+8T provides e'tensive caching services Gboth built-in services and
caching #/IsH. #)/.+8T also ships with performance counters that developers and
system administrators can monitor to test new applications and gather metrics on
e'isting applications. -riting custom debug statements to your -eb page can help
immensely in troubleshooting your applicationMs code. !owever( it can cause
embarrassment if it is not removed. The problem is that removing the debug
statements from your pages when your application is ready to be ported to a
production server can re"uire significant effort.
#)/.+8T offers the Trace,onte't class( which allows us to write custom
debug statements to our pages as we develop them. They appear only when you have
enabled tracing for a page or entire application. 8nabling tracing also appends details
about a re"uest to the page( or( if you so specify( to a custom trace viewer that is
stored in the root directory of your application.
The .+8T $ramework and #)/.+8T provide default authoriation and
authentication schemes for -eb applications. we can easily remove( add to( or replace
these schemes( depending upon the needs of our application .
1*
).).) DATA ACCESS -IT, ADO.NET
#s you develop applications using #;7.+8T( you will have different
re"uirements for working with data. @ou might never need to directly edit an B95
file containing data - but it is very useful to understand the data architecture in
#;7.+8T.
#;7.+8T offers several advantages over previous versions of #;7%
Interoperability
9aintainability
/erformance
)calability
INTEROPERA/I'ITY#
#;7.+8T applications can take advantage of the fle'ibility and broad
acceptance of B95. 4ecause B95 is the format for transmitting datasets across the
network( any component that can read the B95 format can process data. The
receiving component need not be an #;7.+8T component.

The transmitting component can simply transmit the dataset to its destination
without regard to how the receiving component is implemented. The destination
component might be a Aisual )tudio application or any other application implemented
with any tool whatsoever. The only re"uirement is that the receiving component be
able to read B95. )7( B95 was designed with e'actly this kind of interoperability
in mind.
%AINTAINA/I'ITY#

In the life of a deployed system( modest changes are possible( but substantial(
#rchitectural changes are rarely attempted because they are so difficult. #s the
performance load on a deployed application server grows( system resources can
become scarce and response time or throughput can suffer.
12
$aced with this problem( software architects can choose to divide the serverMs
business-logic processing and user-interface processing onto separate tiers on separate
machines.

In effect( the application server tier is replaced with two tiers( alleviating the
shortage of system resources. If the original application is implemented in #;7.+8T
using datasets( this transformation is made easier. #;7.+8T data components in
Aisual )tudio encapsulate data access functionality in various ways that help you
program more "uickly and with fewer mistakes.
PER*OR%ANCE#
#;7.+8T datasets offer performance advantages over #;7 disconnected
record sets. In #;7.+8T data-type conversion is not necessary.
SCA'A/I'ITY#
#;7.+8T accommodates scalability by encouraging programmers to conserve
limited resources. #ny #;7.+8T application employs disconnected access to dataF it
does not retain database locks or active database connections for long durations.
).).4 *EATURES O* S5' SER0ER 2666
The 75#/ )ervices feature available in )D5 )erver version E.> is now called
)D5 )erver &>>> #nalysis )ervices. The term 75#/ )ervices has been replaced with
the term #nalysis )ervices. #nalysis )ervices also includes a new data mining
component.
The Repository component available in )D5 )erver version E.> is now called
9icrosoft )D5 )erver &>>> 9eta ;ata )ervices. References to the component now
use the term 9eta ;ata )ervices. The term repository is used only in reference to the
repository engine within 9eta ;ata )ervices.
13
)D5-)8RA8R database consist of si' type of objects(
They are(
1. TA/'E
2. 5UERY
). *OR%
4. REPORT
7. %ACRO
1. TA/'E#
# database is a collection of data about a specific topic.
0IE-S O* TA/'E#
-e can work with a table in two types(
;esign Aiew
;atasheet Aiew
Design 0ie8 To build or modify the structure of a table we work in the
table design view. -e can specify what kind of data will be hold.
Datasheet 0ie8 To add( edit or analyses the data itself we work in tables
datasheet view mode.
2. 5UERY#
# "uery is a "uestion that has to be asked the data. #ccess gathers data that
answers the "uestion from one or more table. The data that make up the answer is
either dynaset Gif you edit itH or a snapshotGit cannot be editedH.
8ach time we run "uery( we get latest information in the dynaset.#ccess either
displays the dynaset or snapshot for us to view or perform an action on it (such as
deleting or updating.
16
). *OR%S#
# form is used to view and edit information in the database record by
record .# form displays only the information we want to see in the way we want to
see it. $orms use the familiar controls such as te'tbo'es and checkbo'es. This makes
viewing and entering data easy.
0ie8s !9 *!m#
-e can work with forms in several primarily there are two views(
They are(
Design 0ie8
*!m 0ie8
Design 0ie8
To build or modify the structure of a form( we work in forms design view. -e
can add control to the form that are bound to fields in a table or "uery( includes
te'tbo'es( option buttons( graphs and pictures.
*!m 0ie8
The form view which display the whole design of the form.
4. REPORT#
# report is used to vies and print information from the database. The report
can ground records into many levels and compute totals and average by checking
values from many records at once. #lso the report is attractive and distinctive because
we have control over the sie and appearance of it.
7. %ACRO #
# macro is a set of actions. 8ach action in macros does something. )uch as
opening a form or printing a report .-e write macros to automate the common tasks
the work easy and save the time.
1E
4.SYSTE% DESI+N
;esign is the first step in the development phase for any engineering product or
system. It may be defined as the /rocess of applying various techni"ues and principles
for the purpose of defining a device( a process or a system in sufficient detail to permit
its physical realiation.
-hen designing the system the points taken care are
Identify the user re"uirement
Identification of the inputs and arriving at the user defined output screens
)ystem specification
Aiew of the future implications of the project
The most creative and challenging phase of a system development life cycle is
system design. It refers to the technical specifications that will be applied in
implementing the candidate system. The design phase is a translation from user-
oriented document to the programmers.
The potential objects are thoroughly analyed. ,lass hierarchies are
identified to check whether the system is behaving the way it has to. There after the
classes are individually tested and subse"uently they are integrated to form the overall
system.
The different phases of designs are#
Input ;esign
7utput ;esign
;atabase ;esign
1:
4.1 INPUT DESI+N
9any users are logon to the website. 8ach and every user has a login
identification and password. 8ach time when a user wants to access the website he has
to go through the admin validation. The registration utility should allow user to
register them within this website.
The input design forms such as
+ew user Registration $orm.
,lient Registration $orm.
4.2 OUTPUT DESI+N#
on receiving the re"uest from client the server sends the response to
client. A -E/SITE RUNS O0ER -E/ SER0ER T,AT IS T,E SER0ER
SO*T-ARE /E,IND T,E -OR'D -IDE -E/. IT 'ISTENS *OR
RE5UESTS *RO% A C'IENT: SUC, AS A /RO-SER 'I.E NETSCAPE OR
%ICROSO*T;S INTERNET E<P'ORER.
-,EN IT +ETS ONE: IT PROCESSES T,AT RE5UEST AND
RETURNS SO%E DATA. T,IS DATA USUA''Y TA.ES T,E *OR% O* A
*OR%ATTED PA+E -IT, TE<T AND +RAP,ICS. the various output forms
are%
Rating $orm.
4ar chart $orm etc.
4.) DATA/ASE DESI+N#
This system has been designed with database connection for storing the
information about the website. The backend is )D5 )8RA8R &>>> and the data base
contains many tables some of them are%
,ustomer details
Issue details
1I
7. DATA *'O- DIA+RA%
The ;$; also known as the bubble chart. It is a simple graphical formalism
that can be used to represent a system in terms of the input data to the system( various
processing carried out on these data and the output data generated by the system.
The main reason why this ;$; techni"ue is so popular is probably because of
the fact that ;$; is a very simple formalism- it is simple to understand and use. #
;$; model uses a very limited number of primitive symbols to represent the
functions performed by a system and the data flow among these systems.
)tarting with a set of high level functions that a system performance of ;$;
model in hierarchically it represent various sub functions. The ;ata $low
diagramming techni"ue also follows a simple set of intuitive concepts and rules.
;ata flow diagram G;$;H is used to show how data flows through the system
and the processes that transform the input data into output. ;ata flow diagrams are a
way of e'pressing system re"uirements in a graphical manner. ;$; represents one of
the most ingenious tools used for structured analysis.
# ;$; model uses a very limited number of primitive symbols to represent
the functions performed by a system and the data flow among these systems. ;ata
flow diagram G;$;H is used to show how data flows through the system and the
processes that transform the input data into output. ;ata flow diagrams are a way of
e'pressing system re"uirements in a graphical manner. ;$; represents one of the
most ingenious tools used for structured analysis.
&>
-e3 Rating D*D#$
*ig"e 1# 0ie8ing the &lients ate th!"gh !" 8e3 site.
view
getting
the rating
*ig"e 2# P!st the Ads 3y C"st!me t! Clients th!"gh !" site.
,ustomer
,lient&
-eb Rating )ite
G;isplay RatingH
,lient*
,lient 1
,ustomer
-eb Rating )ite
G/ost #d $ormH
;atabase
)tore the ad files
,lient1 ,lient&
&1
=. DATA DESI+N
=.1 ADD *I'E
=.2 ADD POSTIN+
=.) SU++ESTION
&&
=.4 C'IENT RE+ISTRATION
=.7 CUSTO%ER RE+ISTRATION
&*
>. SYSTE% TESTIN+
!ere different types of testing are involved. These are named by
1nit testing
Integaration testing
Aalidation testing
>.1 UNIT TESTIN+
1nit Testing focuses on verifying the effort on the smallest unit of software-
module. The relative comple'ity of test and uncovered error is limited by the
constraint scope established for unit testing.
The module interface is tested to ensure that the information flows properly
into and out of the program unit under test. The local data structure is e'amined to
ensure that the data stored temporarily maintains its integrity during all steps in the
algorithm e'ecution.
&2
The unit testing in the system is done at various levels such as
Aerification of the username and password.
Aalidation of the database.
Typing the input format in the forms such as e-mail address and password
confirmation etc...
The individual modules are also tested using this test.
>.2 INTE+RATION TESTIN+
;ata can be tested across an interface. 7ne module can have an effect on
other. )o( all the sub-modules are tested and desired result is attained. Integration
Testing is a systematic techni"ue for constructing a program structure while
conducting tests to uncover errors associated with interfacing.
The objective is to take unit test modules and build a program that has been
dictated by design. $or e'ample the registration module is integrated with database
and also with admin module.
>.) 0A'IDATION TESTIN+
Aalidation testing is where re"uirements established as a part of software
re"uirement analysis is validated against the software that has been constructed This
test provides the final assurance that the software meets all functional( behavioral and
performance re"uirements. The errors( which were not uncovered during integration
testing( are found out and corrected during this phase.
&3
;ata can be tested across an interface. 7ne module can have an effect on
other. )o( all the sub-modules are tested and desired result is attained.
Aalidation Testing is a systematic techni"ue for constructing a program
structure while conducting tests to uncover errors associated with interfacing.
Aalidation testing is where re"uirements established as a part of software
re"uirement analysis is validated against the software that has been constructed.
The module interface is tested to ensure that the information flows properly
into and out of the program unit under test. The local data structure is e'amined to
ensure that the data stored temporarily maintains its integrity
?. SYSTE% I%P'E%ENTATION
Implementation is the most crucial stage in achieving a successful system and
giving the users confidence that the new system is workable and effective.
Implementation of a modified application to replace an e'isting one. This type of
conversation is relatively easy to handle( provide there are no major changes in the
system.
8ach program is tested individually at the time of development using the data
and has verified that this program linked together in the way specified in the programs
specification( the computer system and its environment is tested to the satisfaction of
the user.
The system that has been developed is accepted and proved to be satisfactory
for the user. #nd so the system is going to be implemented very soon. # simple
operating procedure is included so that the user can understand the different functions
clearly and "uickly.
&6
Initially as a first step the e'ecutable form of the application is to be
created and loaded in the common server machine which is accessible to all the user
and the server is to be connected to a network. The final stage is to document the
entire system which provides components and the operating procedures of the system.
8.1 SCOPE FOR FUTURE DEVELOPMENT
8very application has its own merits and demerits. The project has
covered almost all the re"uirements. $urther re"uirements and improvements can
easily be done since the coding is mainly structured or modular in nature. ,hanging
the e'isting modules or adding new modules can append improvements. $urther
enhancements can be made to the application( so that the web site functions very
attractive and useful manner than the present one.
@. CONC'USION
The input and output datas are validated and verified. Testing and the
implementation are done successfully. The constraints are met and overcome
successfully. The result is concurrent.
The user manuals for the system are provided by the to assist the employee of
the Rating site to perform efficiently in the softwares which runs the system. #nd the
online help also provided.
The system is user friendly( so the user can easily handle the system without
any guidance. The project has been left for chance of future enhancement to meet the
future technologies.
&E
16. SCREEN 'AYOUT
,O%E PA+E
&:
C'IENT RE+ISTRATION
&I
*>
,1)T798R R8?I)TR#TI7+
*1
)149IT T!8 )1??8)TI7+)
*&
#;9I+ AI8- ,1)T798R) )1??8)TI7+)
**
/#@98+T ;8T#I5)
#;A8RTI)898+T 8+TR@
*2
#;9I+ 57?I+
*3
*6
#;9I+I)TR#T7R AI8-I+? ;8T#I5)
*E
#;9I+ AI8- ,5I8+T ;8T#I5)
*:
#;9I+ AI8- ,1)T798R ;8T#I5
*I
#;9I+ AI8- #;A8RTI)898+T ;8T#I5)
2>
11. SOURCE CODE
ADD DETAI'S
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or ad$detail.
!summary"
public class ad$detail % System.Web.UI.&age
{
protected System.Web.UI.WebControls.Data'rid Data'rid(;
public SqlConnection scon;
public SqlCommand scmd;
public SqlData)eader sdr;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
i# ,4Is&ost5ac61
binddata,1;
7
pri*ate *oid binddata,1
{
scon 8 new SqlConnection,9ser*er8.;uid8sa;
Database8webratesys91;
password8sa;
scon.:pen,1;
scmd 8 new SqlCommand,9Select ; #rom 0dd$&osting9.
scon1;
sdr 8 scmd./<ecute)eader,1;
Data'rid(.DataSource 8 sdr;
Data'rid(.Data5ind,1;
sdr.Close,1;
scon.Close,1;
21
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.Data'rid(.SelectedInde<C3anged B8 new
System./*entHandler,t3is.Data'rid($SelectedInde<C3anged1;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid Data'rid($SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
7
7
7
AD%IN ,O%E
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 webratesys
{
!summary"
Summary description #or admin$3ome.
!summary"
public class admin$3ome % System.Web.UI.&age
{
protected System.Web.UI.WebControls.Hyper+in6 Hyper+in6(;
protected System.Web.UI.WebControls.Hyper+in6 Hyper+in6C;
protected System.Web.UI.WebControls.Hyper+in6 Hyper+in6D;
protected System.Web.UI.WebControls.Hyper+in6 Hyper+in6E;
protected System.Web.UI.WebControls.Hyper+in6 Hyper+in6F;
2&
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
7
7
AD%IN 'O+IN
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or admin$login.
!summary"
public class admin$login % System.Web.UI.&age
{
protected System.Web.UI.WebControls.5utton 5utton(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<C;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
public SqlConnection con;
public SqlCommand cmd;
protected System.Web.UI.WebControls.+abel +abel(;
public SqlData)eader dr;
2*
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
con 8 new SqlConnection,9Ser*er8.; uid8sa;
Database8webratesys91;
password8sa;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
string s;
con.:pen,1;
s 8 9Select ; #rom adminlogin W3ere uname8G9 B
@e<t5o<(.@e<t B 9G and passwrd 8G9 B @e<t5o<C.@e<t B 9G9;
cmd 8 new SqlCommand,s. con1;
dr 8 cmd./<ecute)eader,1;
dr.)ead,1;
i# ,dr.Has)ows1
{
dr.Close,1;
con.Close,1;
)esponse.)edirect,9admin$3ome.asp<91;
7
+abel(.@e<t 8 9User ?ot #ound9;
+abel(.Hisible8true;
dr.Close,1;
con.Close,1;
7
7
7
22
AD0ERTISE%ENT
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 webratesys
{
!summary"
Summary description #or ad*ertisement.
!summary"
public class ad*ertisement % System.Web.UI.&age
{
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istD;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<D;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<E;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+ist(;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istE;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istF;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istI;
protected System.Web.UI.WebControls.5utton 5utton(;
public SqlConnection scon;
protected System.Web.UI.WebControls.+abel +abel(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
public SqlCommand scmd;
public SqlData0dapter da;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istC;
public DataSet ds ;
public Date@ime c$date;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
scon 8 new SqlConnection,9Ser*er8.; uid8sa;
Database8webratesys91;
&ut user code to initiali2e t3e page 3ere
i#,4Is&ost5ac61
{
#illsite,1;
7

7
pri*ate *oid #illsite,1
23
{
scon.:pen,1;
SqlData)eader dr;
string a;
a 8 9Select url #rom Client$)eg9;
scmd 8 new SqlCommand,a.scon1;
dr 8 scmd./<ecute)eader,1;
w3ile ,dr.)ead,11
{
DropDown+istC.Items.0dd,Con*ert.@oString,drJKL11;

7
dr.Close,1;
scon.Close,1;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{
Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"

!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.DropDown+istD.SelectedInde<C3anged B8 new
System./*entHandler,t3is.DropDown+istD$SelectedInde<C3anged1;
t3is.DropDown+ist(.SelectedInde<C3anged B8 new
System./*entHandler,t3is.DropDown+ist($SelectedInde<C3anged1;
t3is.DropDown+istI.SelectedInde<C3anged B8 new
System./*entHandler,t3is.DropDown+istI$SelectedInde<C3anged1;
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
string e(;
e( 8 Con*ert.@oString,DropDown+istE.SelectedHalue1B
99 B Con*ert.@oString,DropDown+ist(.SelectedHalue1 B 99 B
Con*ert.@oString,DropDown+istF.SelectedHalue1;
Date@ime d;
d 8 Con*ert.@oDate@ime,e(1;
d.@oS3ortDateString,1;
@e<t5o<D.@e<t 8
Con*ert.@oString,Con*ert.@oDouble,@e<t5o<D.@e<t1 ;
Con*ert.@oDouble,DropDown+istI.SelectedHalue11;
26
scon.:pen,1;
string str;
str89Insert into 0dd$&osting,JsiteL.J+engt3L.
J@otal$0mtL.JCreditCard?oL. JDurationL.
Jreg$dateL1*alues,Msi.Mlen.Mta.Mcno.Mdu. Mda19;
scmd8new SqlCommand ,str.scon1;
scmd.&arameters.0dd,9Msi9.System.Data.SqlDb@ype.HarC3ar1.Halue8DropDo
wn+istC.SelectedHalue;
scmd.&arameters.0dd,9Mlen9.
System.Data.SqlDb@ype.Int1.Halue 8 DropDown+istD.SelectedHalue;
scmd.&arameters.0dd,9Mta9.System.Data.SqlDb@ype.>loat1.Halue8
@e<t5o<(.@e<t;
scmd.&arameters.0dd,9Mcno9.System.Data.SqlDb@ype.5igInt1.Halue8@e<t5o
<E.@e<t;
scmd.&arameters.0dd,9Mdu9.System.Data.SqlDb@ype.5igInt1.Halue8DropDow
n+istI.SelectedHalue;
scmd.&arameters.0dd,9Mda9.
System.Data.SqlDb@ype.SmallDate@ime1.Halue 8 d;

scmd./<ecute?onNuery,1;
scon.Close,1;
)esponse.)edirect,9post#ile.asp<91;
7
pri*ate *oid DropDown+ist($SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
7
pri*ate *oid DropDown+istD$SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
@e<t5o<D.@e<t 8
Con*ert.@oString,Con*ert.@oDouble,DropDown+istD.SelectedHalue1 ; .
OF1;
7
pri*ate *oid DropDown+istI$SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
#illccn,1;
@e<t5o<(.@e<t 8
Con*ert.@oString,Con*ert.@oDouble,@e<t5o<D.@e<t1 ;
Con*ert.@oDouble,DropDown+istI.SelectedHalue11;
7
2E
7
7
C'IENT RE+ISTRATION
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 webratesys
{
!summary"
Summary description #or ad*ertisement.
!summary"
public class ad*ertisement % System.Web.UI.&age
{
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istD;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<D;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<E;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+ist(;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istE;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istF;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istI;
protected System.Web.UI.WebControls.5utton 5utton(;
public SqlConnection scon;
protected System.Web.UI.WebControls.+abel +abel(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
public SqlCommand scmd;
public SqlData0dapter da;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+istC;
public DataSet ds ;
public Date@ime c$date;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
scon 8 new SqlConnection,9Ser*er8.; uid8sa;
Database8webratesys91;
&ut user code to initiali2e t3e page 3ere
i#,4Is&ost5ac61
{
@e<t5o<E.Hisible 8true;
2:
#illsite,1;
7
#ill,1;
c$date 8 System.Date@ime.?ow;
c$date.@oS3ortDateString,1;
7
pri*ate *oid #illsite,1
{
scon.:pen,1;
SqlData)eader dr;
string a;
a 8 9Select url #rom Client$)eg9;
scmd 8 new SqlCommand,a.scon1;
dr 8 scmd./<ecute)eader,1;
w3ile ,dr.)ead,11
{
DropDown+istC.Items.0dd,Con*ert.@oString,drJKL11;

7
dr.Close,1;
scon.Close,1;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.DropDown+istD.SelectedInde<C3anged B8 new
System./*entHandler,t3is.DropDown+istD$SelectedInde<C3anged1;
t3is.DropDown+ist(.SelectedInde<C3anged B8 new
System./*entHandler,t3is.DropDown+ist($SelectedInde<C3anged1;
t3is.DropDown+istI.SelectedInde<C3anged B8 new
System./*entHandler,t3is.DropDown+istI$SelectedInde<C3anged1;
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
string e(;
2I
e( 8 Con*ert.@oString,DropDown+istE.SelectedHalue1B
99 B Con*ert.@oString,DropDown+ist(.SelectedHalue1 B 99 B
Con*ert.@oString,DropDown+istF.SelectedHalue1;
Date@ime d;
d 8 Con*ert.@oDate@ime,e(1;
d.@oS3ortDateString,1;
@e<t5o<D.@e<t 8
Con*ert.@oString,Con*ert.@oDouble,@e<t5o<D.@e<t1 ;
Con*ert.@oDouble,DropDown+istI.SelectedHalue11;
scon.:pen,1;
string str;
str89Insert into 0dd$&osting,JsiteL.J+engt3L.
J@otal$0mtL.JCreditCard?oL. JDurationL.
Jreg$dateL1*alues,Msi.Mlen.Mta.Mcno.Mdu. Mda19;
scmd8new SqlCommand ,str.scon1;
scmd.&arameters.0dd,9Msi9.System.Data.SqlDb@ype.HarC3ar1.Halue8DropDo
wn+istC.SelectedHalue;
scmd.&arameters.0dd,9Mlen9.
System.Data.SqlDb@ype.Int1.Halue 8 DropDown+istD.SelectedHalue;
scmd.&arameters.0dd,9Mta9.System.Data.SqlDb@ype.>loat1.Halue8
@e<t5o<(.@e<t;
scmd.&arameters.0dd,9Mcno9.System.Data.SqlDb@ype.5igInt1.Halue8@e<t5o
<E.@e<t;
scmd.&arameters.0dd,9Mdu9.System.Data.SqlDb@ype.5igInt1.Halue8DropDow
n+istI.SelectedHalue;
scmd.&arameters.0dd,9Mda9.
System.Data.SqlDb@ype.SmallDate@ime1.Halue 8 d;

scmd./<ecute?onNuery,1;
scon.Close,1;
)esponse.)edirect,9post#ile.asp<91;
7
protected *oid #illccn,1
{
scon.:pen ,1;
string str(89select creditcardno #rom add$posting
w3ere creditcardno8G9B @e<t5o<E.@e<t B9G9;
scmd8new SqlCommand ,str(.scon1;
da8new SqlData0dapter ,scmd1;
da.>ill ,ds1;
@e<t5o<E.@e<t 8Con*ert.@oString
,ds.@ablesJ9add$posting9L1;

7
3>
protected *oid #ill,1
{

scmd.&arameters.0dd,9Mcno9.System.Data.SqlDb@ype.5igInt1.Halue8@e<t5o
<E.@e<t;
scmd./<ecute?onNuery,1;
scon.Close,1;
7
pri*ate *oid DropDown+ist($SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
7
pri*ate *oid DropDown+istD$SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
@e<t5o<D.@e<t 8
Con*ert.@oString,Con*ert.@oDouble,DropDown+istD.SelectedHalue1 ; .
OF1;
7
pri*ate *oid DropDown+istI$SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
#illccn,1;
@e<t5o<(.@e<t 8
Con*ert.@oString,Con*ert.@oDouble,@e<t5o<D.@e<t1 ;
Con*ert.@oDouble,DropDown+istI.SelectedHalue11;
7
7
7
C'IENT DETAI'S
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or cln$detail.
!summary"
31
public class cln$detail % System.Web.UI.&age
{
protected System.Web.UI.WebControls.Data'rid Data'rid(;
public SqlConnection scon;
public SqlCommand scmd;
public SqlData)eader sdr;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
i# ,4Is&ost5ac61
binddata,1;
7
pri*ate *oid binddata,1
{
scon 8 new SqlConnection,9ser*er8.;uid8sa;
Database8webratesys91;
password8sa;
scon.:pen,1;
scmd 8 new SqlCommand,9Select ; #rom Client$)eg9.
scon1;
sdr 8 scmd./<ecute)eader,1;
Data'rid(.DataSource 8 sdr;
Data'rid(.Data5ind,1;
sdr.Close,1;
scon.Close,1;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.Data'rid(.SelectedInde<C3anged B8 new
System./*entHandler,t3is.Data'rid($SelectedInde<C3anged1;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
3&
pri*ate *oid Data'rid($SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
7
7
7
CUSTO%ER DETAI'S
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or cus$detail.
!summary"
public class cus$detail % System.Web.UI.&age
{
public SqlConnection scon;
public SqlCommand scmd;
public SqlData)eader sdr;
protected System.Data.SqlClient.SqlData0dapter
sqlData0dapter(;
protected System.Data.SqlClient.SqlCommand
sqlSelectCommand(;
protected System.Data.SqlClient.SqlCommand
sqlInsertCommand(;
protected System.Data.SqlClient.SqlConnection
sqlConnection(;
protected webratesys.DataSet( dataSet((;
protected System.Web.UI.WebControls.Data'rid Data'rid(;
public string s;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
i# ,4Is&ost5ac61
binddata,1;
7
pri*ate *oid binddata,1
{
scon 8 new SqlConnection,9ser*er8.;uid8sa;
Database8webratesys91;
3*
password8sa;
scon.:pen,1;
scmd 8 new SqlCommand,9Select ; #rom cust$reg(9.
scon1;
sdr 8 scmd./<ecute)eader,1;
Data'rid(.DataSource 8 sdr;
Data'rid(.Data5ind,1;
sdr.Close,1;
scon.Close,1;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.sqlData0dapter( 8 new
System.Data.SqlClient.SqlData0dapter,1;
t3is.sqlInsertCommand( 8 new
System.Data.SqlClient.SqlCommand,1;
t3is.sqlConnection( 8 new
System.Data.SqlClient.SqlConnection,1;
t3is.sqlSelectCommand( 8 new
System.Data.SqlClient.SqlCommand,1;
t3is.dataSet(( 8 new webratesys.DataSet(,1;
,,System.ComponentModel.ISupportInitiali2e1
,t3is.dataSet((11.5eginInit,1;
t3is.Data'rid(.SelectedInde<C3anged B8 new
System./*entHandler,t3is.Data'rid($SelectedInde<C3anged1;

sqlData0dapter(

t3is.sqlData0dapter(.InsertCommand 8
t3is.sqlInsertCommand(;
t3is.sqlData0dapter(.SelectCommand 8
t3is.sqlSelectCommand(;
t3is.sqlData0dapter(.@ableMappings.0dd)ange,new
System.Data.Common.Data@ableMappingJL {
new System.Data.Common.Data@ableMapping,9@able9.
9Cust$)eg(9. new System.Data.Common.DataColumnMappingJL {
32
new
System.Data.Common.DataColumnMapping,9CID9. 9CID91.
new
System.Data.Common.DataColumnMapping,9Uname9. 9Uname91.
new
System.Data.Common.DataColumnMapping,9&asswd9. 9&asswd91.
new
System.Data.Common.DataColumnMapping,9comp?ame9. 9comp?ame91.
new
System.Data.Common.DataColumnMapping,90ddr9. 90ddr91.
new
System.Data.Common.DataColumnMapping,9&no9. 9&no91.
new System.Data.Common.DataColumnMapping,9/mail9. 9/mail917171;

t3is.sqlInsertCommand(.Command@e<t 8 9I?S/)@ I?@:
Cust$)eg(,Uname. &asswd. comp?ame. 0ddr. &no. /mail1 H0+U/S ,MUname.
9 B
9M&asswd. Mcomp?ame. M0ddr. M&no. M/mail1;
S/+/C@ CID. Uname. &asswd. comp?ame. 09 B
9ddr. &no. /mail >):M Cust$)eg(9;
t3is.sqlInsertCommand(.Connection 8
t3is.sqlConnection(;
t3is.sqlInsertCommand(.&arameters.0dd,new
System.Data.SqlClient.Sql&arameter,9MUname9.
System.Data.SqlDb@ype.HarC3ar. CK. 9Uname911;
t3is.sqlInsertCommand(.&arameters.0dd,new
System.Data.SqlClient.Sql&arameter,9M&asswd9.
System.Data.SqlDb@ype.HarC3ar. CK. 9&asswd911;
t3is.sqlInsertCommand(.&arameters.0dd,new
System.Data.SqlClient.Sql&arameter,9Mcomp?ame9.
System.Data.SqlDb@ype.HarC3ar. CF. 9comp?ame911;
t3is.sqlInsertCommand(.&arameters.0dd,new
System.Data.SqlClient.Sql&arameter,9M0ddr9.
System.Data.SqlDb@ype.HarC3ar. EK. 90ddr911;
t3is.sqlInsertCommand(.&arameters.0dd,new
System.Data.SqlClient.Sql&arameter,9M&no9.
System.Data.SqlDb@ype.5igInt. P. 9&no911;
t3is.sqlInsertCommand(.&arameters.0dd,new
System.Data.SqlClient.Sql&arameter,9M/mail9.
System.Data.SqlDb@ype.HarC3ar. DK. 9/mail911;
33

t3is.sqlConnection(.ConnectionString 8 9wor6station
id85C@F;pac6et si2e8EKQI;user id8sa;initial
catalog8webratesys;persis9 B
9t security in#o8>alse9;


t3is.sqlSelectCommand(.Command@e<t 8 9S/+/C@ CID.
Uname. &asswd. comp?ame. 0ddr. &no. /mail >):M Cust$)eg(9;
t3is.sqlSelectCommand(.Connection 8
t3is.sqlConnection(;

t3is.dataSet((.DataSet?ame 8 9DataSet(9;
t3is.dataSet((.+ocale 8 new
System.'lobali2ation.CultureIn#o,9enAUS91;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
,,System.ComponentModel.ISupportInitiali2e1
,t3is.dataSet((11./ndInit,1;
7
=endregion
pri*ate *oid Data'rid($SelectedInde<C3anged,ob-ect
sender. System./*ent0rgs e1
{
7
7
7
CUSTO%ER 'O+IN
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or cus$login.
!summary"
public class cus$login % System.Web.UI.&age
{
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<C;
protected System.Web.UI.WebControls.5utton 5utton(;
public SqlConnection con;
public SqlCommand cmd;
protected System.Web.UI.WebControls.+abel +abel(;
protected System.Web.UI.WebControls.+abel +abelC;
public SqlData)eader dr;
36
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
con 8 new SqlConnection,9Ser*er8.; uid8sa;
Database8webratesys91;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"

!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
string s;
con.:pen,1;
s 8 9Select ; #rom Cust$)eg( W3ere uname8G9 B
@e<t5o<(.@e<t B 9G and passwd 8G9 B @e<t5o<C.@e<t B 9G9;
cmd 8 new SqlCommand,s. con1;
dr 8 cmd./<ecute)eader,1;
dr.)ead,1;
i# ,dr.Has)ows1
{
dr.Close,1;
con.Close,1;
)esponse.)edirect,9ad*ertisement.asp<91;
7
+abelC.@e<t 8 9User ?ot #ound9;
+abelC.Hisible8true;
dr.Close,1;
con.Close,1;
7
7
7
CUSTO%ER RE+ISTRATION
3E
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or customer$reg.
!summary"
public class customer$reg % System.Web.UI.&age
{
protected System.Web.UI.WebControls.5utton 5uttonC;
protected System.Web.UI.WebControls.5utton 5utton(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<O;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<I;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<F;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<E;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<D;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<C;
protected
System.Web.UI.WebControls.)equired>ieldHalidator
)equired>ieldHalidator(;
protected
System.Web.UI.WebControls.)equired>ieldHalidator
)equired>ieldHalidatorC;
protected System.Web.UI.WebControls.CompareHalidator
CompareHalidator(;
protected
System.Web.UI.WebControls.)equired>ieldHalidator
)equired>ieldHalidatorD;
protected
System.Web.UI.WebControls.)equired>ieldHalidator
)equired>ieldHalidatorF;
protected
System.Web.UI.WebControls.)egular/<pressionHalidator
)egular/<pressionHalidator(;
protected System.Web.UI.WebControls.HalidationSummary
HalidationSummary(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
public SqlConnection scon;
protected System.Web.UI.WebControls.+abel +abel(;
public SqlCommand scmd;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
scon 8 new SqlConnection,9ser*er8.;uid8sa;
Database8webratesys91;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{
Initiali2eComponent,1;
3:
base.:nInit,e1;
7
!summary"
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
try
{
scon.:pen,1;
string s;
s8 9Insert into Cust$)eg(,JUnameL. J&asswdL.
Jcomp?ameL. J0ddrL. J&noL. J/mailL1 Halues,Mun. Mpd. Mcn. Mad. Mpn.
Mem19;
scmd 8 new SqlCommand,s. scon1;
scmd.&arameters.0dd,9Mun9.
System.Data.SqlDb@ype.HarC3ar1.Halue 8 @e<t5o<(.@e<t;
scmd.&arameters.0dd,9Mpd9.
System.Data.SqlDb@ype.HarC3ar1.Halue 8 @e<t5o<C.@e<t;
scmd.&arameters.0dd,9Mcn9.
System.Data.SqlDb@ype.HarC3ar1.Halue 8 @e<t5o<E.@e<t;
scmd.&arameters.0dd,9Mad9.
System.Data.SqlDb@ype.HarC3ar1.Halue 8 @e<t5o<F.@e<t;
scmd.&arameters.0dd,9Mpn9.
System.Data.SqlDb@ype.5igInt1.Halue 8 @e<t5o<I.@e<t;
scmd.&arameters.0dd,9Mem9.
System.Data.SqlDb@ype.HarC3ar1.Halue 8 @e<t5o<O.@e<t;
scmd./<ecute?onNuery,1;
scon.Close,1;
)esponse.)edirect,9complete.asp<91;
7
catc3, /<ception e<1
{
+abel(.Hisible8 true;
+abel(.@e<t 8 e<.Message.@oString,1;
7
7
7
7
DE*AU'T PA+E
using System;
using System.Collections;
using System.ComponentModel;
3I
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 webratesys
{
!summary"
Summary description #or $de#ault.
!summary"
public class $de#ault % System.Web.UI.&age
{
SqlConnection con;
SqlCommand cmd;
DataSet ds;
SqlData0dapter da;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<C;
protected System.Web.UI.WebControls.+abel +abel(;
protected System.Web.UI.WebControls.5utton 5utton(;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
con8new SqlConnection
,9ser*er8.;uid8sa;database8webratesys91;
con.:pen,1;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"
)equired met3od #or Designer support A do not modi#y
t3e contents o# t3is met3od wit3 t3e code editor.
!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
6>
cmd8new SqlCommand ,9select ; #rom cust$reg( w3ere
uname8G9B @e<t5o<(.@e<tB9G and passwd8G9B @e<t5o<C.@e<tB9G9.con1;
da8new SqlData0dapter ,cmd1;
ds8new DataSet ,1;
da.>ill,ds.9cust$reg(91;
int count(;
count(8ds.@ablesJ9cust$reg(9L.)ows.Count;
i#,count("K1
{
)esponse.)edirect ,9ad*ertisement.asp<91;
7
else
{
+abel(.@e<t89In *alid User9;
7
7
7
7
POST
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Rml;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.:leDb;
using System.Data.SqlClient;
using System.I:;
using System.Diagnostics ;
namespace webratesys
{
!summary"
Summary description #or post.
!summary"
public class post % System.Web.UI.&age
{
protected System.Web.UI.WebControls.+abel lbl>ile;
protected System.Web.UI.WebControls.5utton cmdSend;
protected System.Web.UI.HtmlControls.HtmlInput>ile
#ilMy>ile;
protected System.Web.UI.WebControls.Image Image(;
protected System.Web.UI.WebControls.+abel +abel(;
protected System.Web.UI.WebControls.+abel lblIn#o;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
C3ec6 i# >ileID was passed to t3is page as a
parameter
i#, )equest.NueryStringJ9>ileID9L 48 null 1
{
61
'et t3e #ile out o# database and return it
to requesting client
S3ow@3e>ile,Con*ert.@oIntDC,)equest.NuerySt
ringJ9>ileID9L11;
7
7
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
pri*ate *oid Initiali2eComponent,1
{
t3is.cmdSend.Clic6 B8 new
System./*entHandler,t3is.cmdSend$Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
pri*ate *oid cmdSend$Clic6,ob-ect sender.
System./*ent0rgs e1
{
C3ec6 to see i# #ile was uploaded
i#, #ilMy>ile.&osted>ile 48 null 1
{
'et a re#erence to &osted>ile ob-ect
Http&osted>ile my>ile 8 #ilMy>ile.&osted>ile;
'et si2e o# uploaded #ile
int n>ile+en 8 my>ile.Content+engt3;
ma6e sure t3e si2e o# t3e #ile is " K
i#, n>ile+en " K 1
{
0llocate a bu##er #or reading o# t3e
#ile
byteJL myData 8 new byteJn>ile+enL;
)ead uploaded #ile #rom t3e Stream
my>ile.InputStream.)ead,myData. K.
n>ile+en1;
Create a name #or t3e #ile to store
string str>ilename 8
&at3.'et>ile?ame,my>ile.>ile?ame1;
Write data into a #ile
Write@o>ile,Ser*er.Map&at3,str>ilename1. re# myData1;
Store it in database
int n>ileID 8 Write@oD5,str>ilename.
my>ile.Content@ype. re# myData1;
Set labelGs te<t
6&
lblIn#o.@e<t 8
9>ilename% 9 B str>ilename B
9!br"9 B
9Si2e% 9 B n>ile+en.@oString,1 B
9!p"9;
)egisterStartupScript
,9Sample9.9!SC)I&@ +0?'U0'/8G-a*ascriptG"alert,GSou 0re Success#ully
Uploaded445ac6 to HomeG1;!SC)I&@"91;
)esponse.)edirect ,9done.3tml91;
7
7
7
Writes #ile to current #older
pri*ate *oid Write@o>ile,string str&at3. re# byteJL
5u##er1
{
Create a #ile
>ileStream new>ile 8 new >ileStream,str&at3.
>ileMode.Create1;
Write data to t3e #ile
new>ile.Write,5u##er. K. 5u##er.+engt31;
Close #ile
new>ile.Close,1;
7
'enerates database connection string
pri*ate string 'etConnectionString,1
{
return 9ser*er8.;user id8sa; password8sa;
Database8webratesys9;
7
Writes #ile to t3e database
pri*ate int Write@oD5,string str?ame. string str@ype. re#
byteJL 5u##er1
{
int n>ileID 8 K;
Create connection
SqlConnection dbConn 8 new
SqlConnection,'etConnectionString,11;
Create 0dapter
SqlData0dapter db0dapt 8 new SqlData0dapter,9S/+/C@
; >):M 0dd$>ile9. dbConn1;
We need t3is to get an ID bac6 #rom t3e database
db0dapt.MissingSc3ema0ction 8
MissingSc3ema0ction.0ddWit3Tey;
Create and initiali2e Command5uilder
SqlCommand5uilder dbC5 8 new
SqlCommand5uilder,db0dapt1;
:pen Connection
dbConn.:pen,1;
?ew DataSet
DataSet dbSet 8 new DataSet,1;
6*
&opulate DataSet wit3 data
db0dapt.>ill,dbSet. 90dd$>ile91;
'et re#erence to our table
Data@able db@able 8 dbSet.@ablesJ90dd$>ile9L;
Create new row
Data)ow db)ow 8 db@able.?ew)ow,1;
Store data in t3e row
db)owJ9>ile?ame(9L 8 str?ame;
db)owJ9>ileSi2e9L 8 5u##er.+engt3;
db)owJ9Content@ype9L 8 str@ype;
db)owJ9>ileData9L 8 5u##er;
0dd row bac6 to table
db@able.)ows.0dd,db)ow1;
Update data source
db0dapt.Update,dbSet. 9tbl>ile91;
'et new>ileID
i#, 4db)ow.Is?ull,9>ileID91 1
n>ileID 8 ,int1db)owJ9>ileID9L;
Close connection
dbConn.Close,1;
)eturn >ileID
return n>ileID;
7
)ead #ile out o# t3e database and returns it to client
pri*ate *oid S3ow@3e>ile,int >ileID1
{
De#ine SN+ select statement
string SN+ 8 9S/+/C@ >ileSi2e. >ileData.
Content@ype >):M 0dd$>ile WH/)/ >ileID 8 9
B >ileID.@oString,1;
Create Connection ob-ect
SqlConnection dbConn 8 new
SqlConnection,'etConnectionString,11;
Create Command :b-ect
SqlCommand dbComm 8 new SqlCommand,SN+. dbConn1;
:pen Connection
dbConn.:pen,1;
/<ecute command and recei*e Data)eader
SqlData)eader db)ead 8 dbComm./<ecute)eader,1;
)ead row
db)ead.)ead,1;
Clear )esponse bu##er
)esponse.Clear,1;
Set Content@ype to t3e Content@ype o# our #ile
)esponse.Content@ype 8
,string1db)eadJ9Content@ype9L;
Write data out o# database into :utput Stream
62
)esponse.:utputStream.Write,,byteJL1db)eadJ9>ileData9L. K.
,int1db)eadJ9>ileSi2e9L1;
Close database connection
dbConn.Close,1;
/nd t3e page
)esponse./nd,1;
7
)eads t3e name o# current web page
pri*ate string 'etMy?ame,1
{
'et t3e script name
string strScript 8
)equest.Ser*erHariablesJ9SC)I&@$?0M/9L;
'et position o# last slas3
int n&os 8 strScript.+astInde<:#,991;
'et e*eryt3ing a#ter slas3
i#, n&os " A( 1
strScript 8 strScript.Substring,n&os B (1;
return strScript;
7
pri*ate *oid +in65utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
)esponse.)edirect ,9de#ault.asp<91;
7
7
7
POST*I'E
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Rml;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
63
using System.Data.SqlClient;
using System.I:;
using System.Diagnostics ;
namespace webratesys
{
!summary"
Summary description #or post#ile.
!summary"
public class post#ile % System.Web.UI.&age
{
protected System.Web.UI.HtmlControls.HtmlInput>ile
#ilMy>ile;
protected System.Web.UI.WebControls.+abel lblIn#o;
protected System.Web.UI.WebControls.5utton 5utton(;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
pri*ate *oid Initiali2eComponent,1
{
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
C3ec6 to see i# #ile was uploaded
i#, #ilMy>ile.&osted>ile 48 null 1
{
'et a re#erence to &osted>ile ob-ect
Http&osted>ile my>ile 8 #ilMy>ile.&osted>ile;
'et si2e o# uploaded #ile
int n>ile+en 8 my>ile.Content+engt3;
ma6e sure t3e si2e o# t3e #ile is " K
i#, n>ile+en " K 1
{
66
0llocate a bu##er #or reading o# t3e
#ile
byteJL myData 8 new byteJn>ile+enL;
)ead uploaded #ile #rom t3e Stream
my>ile.InputStream.)ead,myData. K.
n>ile+en1;
Create a name #or t3e #ile to store
string str>ilename 8
&at3.'et>ile?ame,my>ile.>ile?ame1;
Write data into a #ile
Write@o>ile,Ser*er.Map&at3,str>ilenam
e1. re# myData1;
Store it in database
int n>ileID 8 Write@oD5,str>ilename.
my>ile.Content@ype. re# myData1;
Set labelGs te<t
lblIn#o.@e<t 8
9>ilename% 9 B str>ilename B
9!br"9 B
9Si2e% 9 B n>ile+en.@oString,1 B
9!p"9;
)egisterStartupScript
,9Sample9.9!SC)I&@ +0?'U0'/8G-a*ascriptG"alert,GSou 0re Success#ully
Uploaded445ac6 to HomeG1;!SC)I&@"91;
)esponse.)edirect ,9complete.asp<91;
7
7
7
pri*ate int Write@oD5,string str?ame. string str@ype. re#
byteJL 5u##er1
{
int n>ileID 8 K;
Create connection
SqlConnection dbConn 8 new
SqlConnection,'etConnectionString,11;
Create 0dapter
SqlData0dapter db0dapt 8 new SqlData0dapter,9S/+/C@
; >):M 0dd$>ile9. dbConn1;
We need t3is to get an ID bac6 #rom t3e database
db0dapt.MissingSc3ema0ction 8
MissingSc3ema0ction.0ddWit3Tey;
Create and initiali2e Command5uilder
SqlCommand5uilder dbC5 8 new
SqlCommand5uilder,db0dapt1;
:pen Connection
dbConn.:pen,1;
?ew DataSet
6E
DataSet dbSet 8 new DataSet,1;
&opulate DataSet wit3 data
db0dapt.>ill,dbSet. 90dd$>ile91;
'et re#erence to our table
Data@able db@able 8 dbSet.@ablesJ90dd$>ile9L;
Create new row
Data)ow db)ow 8 db@able.?ew)ow,1;
Store data in t3e row
db)owJ9>ile?ame(9L 8 str?ame;
db)owJ9>ileSi2e9L 8 5u##er.+engt3;
db)owJ9Content@ype9L 8 str@ype;
db)owJ9>ileData9L 8 5u##er;
0dd row bac6 to table
db@able.)ows.0dd,db)ow1;
Update data source
db0dapt.Update,dbSet. 90dd$>ile91;
'et new>ileID
i#, 4db)ow.Is?ull,9>ileID91 1
n>ileID 8 ,int1db)owJ9>ileID9L;
Close connection
dbConn.Close,1;
)eturn >ileID
return n>ileID;
7
pri*ate *oid S3ow@3e>ile,int >ileID1
{
De#ine SN+ select statement
string SN+ 8 9S/+/C@ >ileSi2e. >ileData.
Content@ype >):M 0dd$>ile WH/)/ >ileID 8 9
B >ileID.@oString,1;
Create Connection ob-ect
SqlConnection dbConn 8 new
SqlConnection,'etConnectionString,11;
Create Command :b-ect
SqlCommand dbComm 8 new SqlCommand,SN+. dbConn1;
:pen Connection
dbConn.:pen,1;
/<ecute command and recei*e Data)eader
SqlData)eader db)ead 8 dbComm./<ecute)eader,1;
)ead row
db)ead.)ead,1;
Clear )esponse bu##er
)esponse.Clear,1;
Set Content@ype to t3e Content@ype o# our #ile
)esponse.Content@ype 8
,string1db)eadJ9Content@ype9L;
6:
Write data out o# database into :utput Stream
)esponse.:utputStream.Write,,byteJL1db)eadJ9>ileData9L. K.
,int1db)eadJ9>ileSi2e9L1;
Close database connection
dbConn.Close,1;
/nd t3e page
)esponse./nd,1;
7
pri*ate string 'etConnectionString,1
{
return 9ser*er8.;uid8sa; Database8webratesys9;
7
pri*ate string 'etMy?ame,1
{
'et t3e script name
string strScript 8
)equest.Ser*erHariablesJ9SC)I&@$?0M/9L;
'et position o# last slas3
int n&os 8 strScript.+astInde<:#,991;
'et e*eryt3ing a#ter slas3
i#, n&os " A( 1
strScript 8 strScript.Substring,n&os B (1;
return strScript;
777
SITERATE
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or siterate.
!summary"
public class siterate % System.Web.UI.&age
{
protected System.Web.UI.WebControls.+abel +abel(;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<(;
protected System.Web.UI.WebControls.+abel +abelC;
protected System.Web.UI.WebControls.DropDown+ist
DropDown+ist(;
protected System.Web.UI.WebControls.)adio5utton
)adio5utton(;
6I
protected System.Web.UI.WebControls.)adio5utton
)adio5uttonC;
protected System.Web.UI.WebControls.)adio5utton
)adio5uttonD;
protected System.Web.UI.WebControls.+abel +abelD;
protected System.Web.UI.WebControls.@e<t5o< @e<t5o<C;
protected System.Web.UI.WebControls.+abel +abelE;
public SqlConnection scon;
protected System.Web.UI.WebControls.+abel +abelF;
public SqlCommand scom. comC;
protected System.Web.UI.WebControls.5utton 5uttonC;
protected System.Web.UI.WebControls.5utton 5utton(;
protected
System.Web.UI.WebControls.)equired>ieldHalidator
)equired>ieldHalidator(;
protected
System.Web.UI.WebControls.)equired>ieldHalidator
)equired>ieldHalidatorC;
public string ratesql;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
scon8new
SqlConnection,9ser*er8.;uid8sa;Database8webratesys91;
password8sa;
#ill,1;
7
pri*ate *oid #ill,1
{
scon.:pen,1;
SqlData)eader dr;
string a;
a 8 9Select url #rom Client$)eg9;
scom 8 new SqlCommand,a.scon1;
dr 8 scom./<ecute)eader,1;
w3ile ,dr.)ead,11
{
DropDown+ist(.Items.0dd,Con*ert.@oString,drJKL11;

7
dr.Close,1;
scon.Close,1;
7

=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{

C:D/'/?% @3is call is required by t3e 0S&.?/@


Web >orm Designer.

Initiali2eComponent,1;
base.:nInit,e1;
7
pri*ate *oid Initiali2eComponent,1
E>
{
t3is.5utton(.Clic6 B8 new
System./*entHandler,t3is.5utton($Clic61;
t3is.5uttonC.Clic6 B8 new
System./*entHandler,t3is.5uttonC$Clic61;
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
pri*ate *oid 5utton($Clic6,ob-ect sender.
System./*ent0rgs e1
{
try
{
scon.:pen,1;
string s;
s89Insert into sug,JunameL.JsiteL.JsuggL.
JrateL1Halues,Mun.Mst.Msu.Mr19;
s(89Insert into state,JpoorL.J#airL.
JgoodL1Halues,Mp.M#.Mg19;
i# ,)adio5utton(.C3ec6ed1
ratesql 8 9&oor9 ;
i# ,)adio5uttonC.C3ec6ed1
ratesql 8 9>air9 ;
i# ,)adio5uttonD.C3ec6ed1
ratesql 8 9'ood9 ;

scom8new SqlCommand,s.scon1;
scom.&arameters.0dd,9Mun9.System.Data.SqlDb@ype.HarC3ar1.Halue8@e<t5o
<(.@e<t;
scom.&arameters.0dd,9Mst9.System.Data.SqlDb@ype.HarC3ar1.Halue8DropDo
wn+ist(.SelectedHalue;
scom.&arameters.0dd,9Msu9.System.Data.SqlDb@ype.HarC3ar1.Halue8@e<t5o
<C.@e<t;
scom.&arameters.0dd,9Mr9.System.Data.SqlDb@ype.HarC3ar1.Halue8ratesql
;
scom./<ecute?onNuery,1;
scon.Close,1;
)esponse.)edirect,9complete.asp<91;
7
catc3,/<ception e<1
{
+abelF.Hisible8true;
+abelF.@e<t8e<.Message.@oString,1;
7
7
pri*ate *oid 5uttonC$Clic6,ob-ect sender.System./*ent0rgs e1
{
E1
)esponse.)edirect ,9de#ault.asp<91;
7
7
7
0IE-ADETAI'
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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 webratesys
{
!summary"
Summary description #or *iew$detail.
!summary"
public class *iew$detail % System.Web.UI.&age
{
protected System.Web.UI.WebControls.Data'rid Data'rid(;
public SqlConnection scon;
public SqlCommand scmd;
protected System.Web.UI.WebControls.+abel +abelC;
protected System.Web.UI.WebControls.+abel +abel(;
public SqlData)eader sdr;
public SqlConnection con;
public SqlCommand cmd.cmd(;
public int i.-;
pri*ate *oid &age$+oad,ob-ect sender. System./*ent0rgs e1
{
&ut user code to initiali2e t3e page 3ere
i# ,4Is&ost5ac61
binddata,1;
con 8 new
SqlConnection,9Ser*er8.;uid8sa;database8webratesys91;
password8sa;
con.:pen,1;
cmd 8 new SqlCommand,9Select sum,nos1 #rom
ya3oouser9. con1;
cmd( 8 new SqlCommand,9Select sum,nos1 #rom
nau6riuser9. con1;
i 8 Con*ert.@oInt(I,cmd./<ecuteScalar,11;
+abel(.@e<t 8 Con*ert.@oString,i1;
- 8 Con*ert.@oInt(I,cmd(./<ecuteScalar,11;
+abelC.@e<t 8 Con*ert.@oString,-1;
E&
con.Close,1;
7
pri*ate *oid binddata,1
{
scon 8 new SqlConnection,9ser*er8.;uid8sa;
Database8webratesys91;
password8sa;
scon.:pen,1;
scmd 8 new SqlCommand,9Select ; #rom sug9. scon1;
sdr 8 scmd./<ecute)eader,1;
Data'rid(.DataSource 8 sdr;
Data'rid(.Data5ind,1;
sdr.Close,1;
scon.Close,1;
7
=region Web >orm Designer generated code
o*erride protected *oid :nInit,/*ent0rgs e1
{
Initiali2eComponent,1;
base.:nInit,e1;
7
!summary"

!summary"
pri*ate *oid Initiali2eComponent,1
{
t3is.+oad B8 new
System./*entHandler,t3is.&age$+oad1;
7
=endregion
7
7
E*
12. /I/'IO+RAP,Y
1. 9icrosoft Aisual 4asic.+8T /rogrammers ,ook4ook%
-9#TT!8- 9#,;7+#5;
GTata 9c?raw!ill 8ditionH
&. ?rey 4ucek( .+8T developers guide &>>&( /rentice-!all India.
*. 4enolt 9archal( A4.+8T by e'ample &>>* N Tata9c?raw- !ill.
2. )ystem #nalysis O ;esign N #lenis 5eon.
3. #n Integral approach to software engineering N /ankaj Jalole.

Anda mungkin juga menyukai