Product & Service Management System
1.
INTRODUCTION
Once the sales figures of Products sold in the past week
are entered by the Dealers over the internet along with the Orders for the next
delivery, the schedule for the next week’s production will be drawn up. A
report of the required raw materials or parts will be drawn up with the
approved suppliers for each & the suppliers will be intimated about the
part requirements over the internet & asked to quote their rates. The
message asking for a Quotation will be sent as an e-mail message. Once the
rates are quoted, the Order will be placed with the required delivery
schedules.
The system incorporates intelligent Order processing System
which checks and intimates the required Higher-ups in the Company about any
discrepancies in the Orders that were placed. For example if an Order is placed
with a Supplier whose rates are not the least then an automatic
Event-generation will send the details of the Order & the person who placed
it to the Managers or Directors who are supposed to oversee the process.
2. Existing System
Is a Manufacturing company, which manufactures different
models of Computers & sells them through a network of Dealers? The company stores details
for each model. The different models will henceforth be referred to as Products.
The details that are stored for each product are Name, description, Price &
Status. The company has a network of Dealers who sell the Products manufactured
by the company. The company has a warehouse, which stores all the Product
Stocks the Dealers submit their sales figures & place orders for new Stocks
of products at the end of each week. They take into consideration the sales
figures when they order for new stocks. The Order placed will sometimes be the
same as the sales figure. It may also be different.
3. Proposed System
The proposed application develops an autonomous system
where the application will going to maintain the details information of product
which has been developed and ready to dispatch. The application also takes care
of the ordered product and by using that manufacturing usit will going to
manufacture the products. Once the
Production plan is approved, the Part Stocks will be updated when the Parts are
issued to the Production Department. Once the finished products are available
from the Production Department, the Products will be dispatched based on the
Orders placed by the Dealers. The stocks with the dealers will also be
maintained.
4. Advantages
1.
The application maintains the
entire automation of production and dispatch of products.
2.
The application manages the
invoice of production company
3.
It is cost effective, fast
and secured
4.
The application is easy to
handle
4.1 Modules
Ø
Admin: The admin of the application
has the privilege to add the new product into the database and also he can
delete the records.
Ø
Dealers: Dealers module will have the
dealers information who are into distributing the products.
Ø
Suppliers: The supplier’s information is maintained in
this module.
Ø
Users: The users who are using this
application are maintained in this module
.
5. SOFTWARE SPECIFICATION
SOFTWARE REQUIREMENTS
1. Visual Web Developer
2. sql server
2008
3. c# language
4. HTML, JavaScript
5. windows XP operating system
HARDWARE REQUIREMENTS:
1. 256 MB RAM
2. 20 GB hard disk(at least)
6. ASP.NET
Open your favorite
text editor, Notepad will suffice, and paste the following HTML code. Save the
document as nowhere.html. Next, open the HTML file in your browser of choice.
The following HTML code will set up a perfectly clear HTML form that sends information
into the ether:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1" />
<title>HTML to Nowhere</title>
</head>
<body>
<form>
Please enter your name:<br/>
<input type="text" name="username"/>
<p/>
Press the button to receive all of your hopes and
dreams:<br/>
<input type="submit" value="Dream Button"
/>
</form>
</body>
</html>
When you test the
code after you enter your name and click the Dream Button (a thinly disguised
submit button), your output will look just like Figure 1-1. Without some kind
of mechanism to capture and store the information or pass it on to somewhere else,
all you have is an HTML white elephant. What ASP.NET 3.5 offers is a way to
store, retrieve, and process the information. Other than storing cookies on the
visitor’s computer, you can’t do too much with HTML when it comes to
controlling the state of your data.
Your Browser Is a Thin Client
Your browser’s main
job is requesting pages from the server and displaying what the server has
processed. Using HTTP as a transfer protocol, your browser parses (interprets) the
HTML code it gets from the server, but otherwise does little processing.
Because your HTTP client (browser) leaves most of the processing work to the
server, it is considered a thin client. There’s nothing wrong with a thin
client, and it can process JavaScript.
With plug-ins,
which virtually all browsers have built in, a thin client can also process
certain kinds of files such as SWF (compiled Adobe Flash files), Java Applets,
ActiveX Controls, as well as other files
requiring that the browser have compatible plug-ins. For the most part, though,
the thin client model is one where the server does the processing, and your
browser’s job is to display the contents it gets from the server.
A Protocol Without a Country: Stateless HTTP
In addition to
being a thin client, your HTTP client browser is stateless. As soon as a web
page reaches your computer, the connection between your browser and the server
is broken. The browser does not remember the last page-it does not hold state.
As soon as the next page arrives, it does not remember the last page. You may
be thinking that your cache holds lots of previous pages and that your browser’s
history feature remembers previous pages.
That’s not what
retaining state means. You cannot use the data and information in your cache or
the browser’s history as states to use with the current page in memory. What is
in active memory is the web page that the server has sent; the state of the
previous page is not there. As soon as you load a page, the previous page is
kicked out, and the new page is placed there.
Just as the
information you place in a text input box is sent to silicon oblivion when you
click the Submit button, knowledge of the previous page (its state) is gone
when the new page arrives. A well-organized web site may appear to maintain
state as the links on pages connect to a set of related pages, but that is an
illusion that the web designer has crafted by good planning.
ASP.NET 3.5
as an Alternative to CGI
Microsoft’s
alternative to a Common Gateway Interface (CGI) is ASP.NET, now in version 3.5.
As a unified web platform, ASP.NET provides what you need to develop applications
that hold state and use the information that you put into the HTML form. Instead
of sending form information into a vacuum when you click a submit button, your
data goes where it can be stored temporarily or permanently. Usually, when we
think of saving state, we imagine writing the data to a storage device like a
hard drive. Using a word processor, every time you save your file, you save its
state. Using ASP.NET, you can do the same thing with information from anyone
who uses your web application. This allows you to build applications where the
information entered can be stored for use with either the next HTTP request or
with a whole set of data entered by users all over the world-that’s quite a
feat compared with saving state in your word processor file.
ASP.NET’s
state-management facilities provide you with the tools that you need to control
state. You do not necessarily want to save all states of a web page, but you
certainly want to save the state of data entered by users and perhaps the URL
of a page. Having state management allows you to do this.
Microsoft’s web
server, Internet Information Services (IIS), uses the Internet Server API
(ISAPI) to make function calls instead of using CGI scripts. By using ISAPI, developers
can create web-based applications that execute faster and have greater extensibility
than CGI, among other advantages. At the lowest level, ASP.NET interfaces with
IIS through an ISAPI extension. However, this book focuses on the high-level
interaction with ISAPI in the form of ASP.NET and code written in C#
(pronounced “C sharp”) that use ASP.NET. So rather than having to deal with the
fine-grained, low-level communications, ASP.NET allows you to write your
scripts in C#. Another way of looking at ASP.NET is as a requestprocessing
engine that takes incoming requests and sends them to a point where you can
attach your C# script to process the request.
So while we are not
going to spend time dwelling on the low-level operations, you can rest assured
that those operations are handled in an efficient manner. Using managed code,
the Microsoft name for code that executes under the management of the .NET
framework, an application is executed by a virtual machine rather than by your
own processor. Both C# and Visual Basic.NET (VB.NET) are languages for creating
managed code that is efficiently run in the .NET environment.
From Client
Side to Server Side
As you saw in
Figure 1-2, all that the web browser does is make requests to the server and
receive web pages in the form of HTML. The browser takes the HTML and
constructs a page for viewing on your browser. For the most part, that’s what
will continue to occur when you adopt ASP.NET. The main difference is that by
writing and executing serverside code, you can generate HTML that effectively
handles dynamic states so that you can use and reuse a given state. Figure 1-3
shows the general flow when an ASPX file on a Microsoft server receives a call
from the client. In looking for an example, we need look no further than the
original example of the HTML page with the form. With a server-side program to
catch the data that is sent to the server, lots of processes on the server are
possible. Suppose the user enters the name, Willie B. Goode.
The server-side
file can use the property name, username, to extract a value. In this case, it
would extract the name Willie B. Goode and do something with it. It might run a
SQL script to store the name in a database, compare it with a password, or it could
pass information about Willie B. Goode back to the browser in HTML.
To get an idea of
the differences and similarities between HTML and ASP.NET, we can take the HTML
form and add a calculated response from the server. In this next example, you
will see two scripts. One is the ASP.NET script and the other is the C# code using
a code behind file to serve as the event engine for the application. The form
tag
includes a name and the code runat="server"
What distinguishes
the web hobbyist from the professional developer is the ability to store and
retrieve data from a server over the Internet. Some readers may have made that
step with PHP or Perl, and for them the journey has already begun. For others,
ASP.NET 3.5 is just the next step in the growth and development of ASP.NET. For
them, much will be familiar and some will be very new. If the transition is
from ASP.NET using Visual Basic to ASP.NET with C#, then you will find even
more new, and the transition to C# is going to be easier than many imagine.
Still others are
making the first step into the realm of server-side programming, so just about
everything about ASP.NET 3.5 and C# 3.0 is new. For those using ASP.NET for the
first time, the good news is that the transition to the server side could
hardly be easier. Everything in this book is set up to learn ASP.NET 3.5 and C#
3.0 using Visual Studio 2008. Using the tools built into Visual Studio 2008,
you will quickly learn that most of what needs to be done can be accomplished
by dragging controls into a visual editor.
And with the “code
behind” method, C# is added in a separate file, so when editing code, you will
see a clear separation the C# 3.0 code comes “behind” the ASP.NET 3.5 code. For
the most part, though, you need only a minimum of coding skills in either
ASP.NET, which feels a lot like HTML, or C#, which has many features
recognizable from JavaScript. However, make no mistake about it, C# 3.0 is a
full-fledged coding language with the power of any good object-oriented
programming (OOP) language. Most of the C# you need is simply working with
functions and subroutines called by ASP.NET events. As a result, learning C# is
quite simple, and you’ll get a lot of help from Visual Studio 2008 coding tips
and built-in IntelliSense. However, if you wish not to use Visual Studio 2008,
all of the code for both the ASP.NET and C# is provided as well.
(You can program it
all using Notepad if you like!) You can find a free Express version of Visual
Studio 2008 at www.micr osoft.com/ express/ download/, and it has much of the
functionality of the full-fledged version. Likewise, you will find an Express
Edition of SQL Server 2005, and with them both you can learn ASP.NET 3.5 and C#
3.0 on a budget while using a powerful development tool.
The main use of
ASP.NET in conjunction with C# and Structured Query Language (SQL) is to store
user input in a database and get it back again. If you’ve ever dealt with forms
in HTML, you may know how frustrating it is to build a web site with data entry
that cannot be stored. In fact, without some kind of storage facility and the
tools required to place the data in storage, HTML forms have very limited use.
However, not only can you use plain HTML forms, ASP.NET 3.5 has some web controls
that are almost identical to HTML forms except they have far more
functionality. In no time, you’ll be working with tables and databases to
store, fetch, change, and delete a wide variety of data. In addition to the
HTML-like controls, a whole other set of web controls is available to work with
data and create objects that HTML cannot. For example, if your web site needs a
calendar, all you have to do with ASP.NET 3.5 is add a calendar control by
dragging it from the Toolbox and into the editor.
Then you can use
the Calendar properties to perform other functions, like reminding you of your
upcoming anniversary. (Getting that right can be worth the price of this book!)
All in all, my hope is that you will
enjoy working with ASP.NET 3.5 and C# 3.0 as much as I have. Not only is it
very easy to develop rich interactive web sites using ASP.NET, but in
conjunction with C# 3.0, the toolset is also a very powerful one. With it, you
have the best
of all worlds.
In this tutorial we will explore
this wonderful free tool along with its advantages especially for new web
developers. After downloading and installing the Visual Web Developer 2005
express edition form this link, run it and you will get this
start up page as shown in figure1 below.
As you see, it nearly seems like
Visual Studio 2005. If you clicked the "File" menu you will see the
menu item "New Web Site ...", you can not create other types of
applications except web applications. As Visual Studio you will have a toolbox,
a properties window, a solution explorer window, a debugging menu, and so on.
All these items give you the ability to control your application and visually
designing it in a simple WYSIWYG drag and drop interface.
7. Visually
Design Your Data
Visual
Web Developer provides a set of controls dialogs and wizards to help you in communicating
with a certain database or data source. First of all you can install SQL Server
2005 Express Edition while you are installing the Visual Web Developer. SQL
Server Express Edition is a lightweight database server designed for smaller
load web sites. Now let's browse what Visual Web Developer provides for ease of
using manipulating and requesting data from a data source.
Data Source Configuration
Wizard provides a step by step wizard to help you connecting to a data
source, whether this source is an SQL database, an Access database, an XML
database, and more. The wizard dynamically pulls the tables along with their
fields from the data source allowing you to select the fields you want to
display.
8. ASP.NET FRAMEWORK
ASP.NET is a web application
framework developed and marketed by Microsoft to allow programmers to build
dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0
of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP)
technology. ASP.NET is built on the Common Language
Runtime (CLR), allowing programmers to write ASP.NET code using
any supported .NET language. The
ASP.NET SOAP extension framework allows ASP.NET components to process
SOAP messages.
8.1 CHARECTERISTIC:
Pages
ASP.NET web pages or webpage, known officially as "web
forms", are the main building block for application development.[8] Web forms are contained in files with
an ".aspx" extension; these files typically contain static (X)HTML markup,
as well as markup defining server-side Web Controls and User Controls where the
developers place all the required static and dynamic content for the web page.
Additionally, dynamic code which runs on the server can be
placed in a page within a block <% -- dynamic code -- %>
, which is
similar to other web development technologies such as PHP, JSP,
and ASP. With ASP.NET Framework
2.0, Microsoft introduced a new code-behind model which allows
static text to remain on the .aspx page, while dynamic code remains in an
.aspx.vb or .aspx.cs file (depending on the programming language used).
Code-behind model
Microsoft recommends dealing with dynamic program code by
using the code-behind model, which places this code in a separate file or in a
specially designated script tag. Code-behind files typicallsssy have names like MyPage.aspx.cs or MyPage.aspx.vb while the page file isMyPage.aspx (same filename as the page file
(ASPX), but with the final extension denoting the page language). This practice
is automatic inMicrosoft Visual Studio and other IDEs.
When using this style of programming, the developer writes code to respond to
different events, like the page being loaded, or a control being clicked,
rather than a procedural walk through of the document. ASP.NET's
code-behind model marks a departure from Classic ASP in that it encourages
developers to build applications with separation of presentation and content in mind.
In theory, this would allow a web designer, for example, to
focus on the design markup with less potential for disturbing the programming code
that drives it. This is similar to the separation of the controller from the
view in Model–View–Controller(MVC)
frameworks.
Directives
A directive is special instructions on how ASP.NET should
process the page.[10] The
most common directive is <%@ Page %> which can specify many things,
such as which programming language is used for the server-side code.
Examples
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "---//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
lbl1.Text = DateTime.Now.ToLongTimeString();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Sample page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
The current time is: <asp:Label runat="server" id="lbl1" />
</div>
</form>
</body>
</html>
The above page renders with the
Text "The current time is: " and the <asp:Label> Text is set
with the current time, upon render.
ASP.NET:
Open your favorite
text editor, Notepad will suffice, and paste the following HTML code. Save the document as nowhere.html.
Next, open the HTML file in your browser of choice. The following HTML code
will set up a perfectly clear HTML form that sends information into the ether:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1" />
<title>HTML to Nowhere</title>
</head>
<body>
<form>
Please enter your name:<br/>
<input type="text" name="username"/>
<p/>
Press the button to receive all of your hopes and
dreams:<br/>
<input type="submit" value="Dream Button"
/>
</form>
</body>
</html>
When you test the
code after you enter your name and click the Dream Button (a thinly disguised
submit button), your output will look just like Figure 1-1. Without some kind
of mechanism to capture and store the information or pass it on to somewhere
else, all you have is an HTML white elephant. What ASP.NET 3.5 offers is a way
to store, retrieve, and process the information. Other than storing cookies on
the visitor’s computer, you can’t do too much with HTML when it comes to
controlling the state of your data. Your Browser Is a Thin Client Your
browser’s main job is requesting pages from the server and displaying what the
server has processed. Using HTTP as a transfer protocol, your browser parses
(interprets) the HTML code it gets from the server, but otherwise does little
processing. Because your HTTP client (browser) leaves most of the processing
work to the server, it is considered a thin client. There’s nothing wrong with
a thin client, and it can process JavaScript. With plug-ins, which virtually
all browsers have built in, a thin client can also process certain kinds of
files such as SWF (compiled Adobe Flash files), Java Applets, ActiveX Controls, as well as other files requiring
that the browser have compatible plug-ins. For the most part, though, the thin
client model is one where the server does the processing, and your browser’s
job is to display the contents it gets from the server.
A Protocol without
a Country: Stateless HTTP In addition to being a thin client, your HTTP client
browser is stateless. As soon as a web page reaches your computer, the
connection between your browser and the server is broken. The browser does not
remember the last page—it does not hold state. As soon as the next page
arrives, it does not remember the last page. You may be thinking that your
cache holds lots of previous pages and that your browser’s history feature
remembers previous pages.
That’s not
what retaining state means. You cannot use the data and information in your
cache or the browser’s history as states to use with the current page in
memory. What is in active memory is the web page that the server has sent; the
state of the previous page is not there. As soon as you load a page, the
previous page is kicked out, and the new page is placed there. Just as the information
you place in a text input box is sent to silicon oblivion when you click the
Submit button, knowledge of the previous page (its state) is gone when the new
page arrives. A well-organized web site may appear to maintain state as the
links on pages connect to a set of related pages, but that is an illusion that
the web designer has crafted by good planning.
ASP.NET 3.5
as an Alternative to CGI
Microsoft’s
alternative to a Common Gateway Interface (CGI) is ASP.NET, now in version 3.5.
As a unified web platform, ASP.NET provides what you need to develop applications
that hold state and use the information that you put into the HTML form. Instead
of sending form information into a vacuum when you click a submit button, your
data goes where it can be stored temporarily or permanently. Usually, when we
think of saving state, we imagine writing the data to a storage device like a
hard drive. Using a word processor, every time you save your file, you save its
state.
Using ASP.NET, you
can do the same thing with information from anyone who uses your web
application. This allows you to build applications where the information
entered can be stored for use with either the next HTTP request or with a whole
set of data entered by users all over the world that’s quite a feat compared
with saving state in your word processor file. ASP.NET’s state-management
facilities provide you with the tools that you need to control state. You do
not necessarily want to save all states of a web page, but you certainly want
to save the state of data entered by users and perhaps the URL of a page.
Having state
management allows you to do this. Microsoft’s web server, Internet Information
Services (IIS), uses the Internet Server API (ISAPI) to make function calls
instead of using CGI scripts. By using ISAPI, developers can create web-based
applications that execute faster and have greater extensibility than CGI, among
other advantages. At the lowest level, ASP.NET interfaces with IIS through an
ISAPI extension. However, this book focuses on the high-level interaction with
ISAPI in the form of ASP.NET and code written in C# (pronounced “C sharp”) that
use ASP.NET. So rather than having to deal with the fine-grained, low-level
communications, ASP.NET allows you to write your scripts in C#.
Another way of
looking at ASP.NET is as a requestprocessing engine that takes incoming
requests and sends them to a point where you can attach your C# script to
process the request.
So while we are not
going to spend time dwelling on the low-level operations, you can rest assured
that those operations are handled in an efficient manner. Using managed code,
the Microsoft name for code that executes under the management of the .NET
framework, an application is executed by a virtual machine rather than by your
own processor. Both C# and Visual Basic.NET (VB.NET) are languages for creating
managed code that is efficiently run in the .NET environment.
From Client
Side to Server Side
As you saw in
Figure 1-2, all that the web browser does is make requests to the server and
receive web pages in the form of HTML. The browser takes the HTML and
constructs a page for viewing on your browser. For the most part, that’s what
will continue to occur when you adopt ASP.NET. The main difference is that by
writing and executing serverside code, you can generate HTML that effectively
handles dynamic states so that you can use and reuse a given state.
Figure 1-3
shows the general flow when an ASPX file on a Microsoft server receives a call
from the client. In looking for an example, we need look no further than the
original example of the HTML page with the form. With a server-side program to
catch the data that is sent to the server, lots of processes on the server are
possible. Suppose the user enters the name, Willie B. Goode. The server-side
file can use the property name, username, to extract a value. In this case, it
would extract the name Willie B. Goode and do something with it. It might run a
SQL script to store the name in a database, compare it with a password, or it
could pass information about Willie B. Goode back to the browser in HTML.
To get an idea of
the differences and similarities between HTML and ASP.NET, we can take the HTML
form and add a calculated response from the server. In this next example, you
will see two scripts. One is the ASP.NET script and the other is the C# code
using a code behind file to serve as the event engine for the application. The
form tag includes a name and the code runat="server"
What distinguishes the web hobbyist from
the professional developer is the ability to store and retrieve data from a
server over the Internet. Some readers may have made that step with PHP or
Perl, and for them the journey has already begun. For others, ASP.NET 3.5 is
just the next step in the growth and development of ASP.NET. For them, much
will be familiar and some will be very new. If the transition is from ASP.NET
using Visual Basic to ASP.NET with C#, then you will find even more new, and
the transition to C# is going to be easier than many imagine.
Still others are making the first
step into the realm of server-side programming, so just about everything about
ASP.NET 3.5 and C# 3.0 is new.For those using ASP.NET for the first time, the
good news is that the transition to the server side could hardly be easier.
Everything in this book is set up to learn ASP.NET 3.5 and C# 3.0 using Visual
Studio 2008. Using the tools built into Visual Studio 2008, you will quickly
learn that most of what needs to be done can be accomplished by dragging controls
into a visual editor. And with the “code behind” method, C# is added in a
separate file, so when editing code, you will see a clear separation the C# 3.0
code comes “behind” the ASP.NET 3.5 code.
For the most part, though, you need
only a minimum of coding skills in either ASP.NET, which feels a lot like HTML,
or C#, which has many features recognizable from JavaScript. However, make no
mistake about it, C# 3.0 is a full-fledged coding language with the power of
any good object-oriented programming (OOP) language. Most of the C# you need is
simply working with functions and subroutines called by ASP.NET events. As a
result, learning C# is quite simple, and you’ll get a lot of help from Visual
Studio 2008 coding tips and built-in IntelliSense. However, if you wish not to
use Visual Studio 2008, all of the code for both the ASP.NET and C# is provided
as well. (You can program it all using Notepad if you like!) You can find a
free Express version of Visual Studio 2008 at www.micr osoft.com/express/download/,
and it has much of the functionality of the full-fledged version. Likewise, you
will find an Express Edition of SQL Server 2005, and with them both you can
learn ASP.NET 3.5 and C# 3.0 on a budget while using a powerful development
tool.
The main use of ASP.NET in
conjunction with C# and Structured Query Language (SQL) is to store user input
in a database and get it back again. If you’ve ever dealt with forms in HTML,
you may know how frustrating it is to build a web site with data entry that
cannot be stored.
In fact, without some kind of
storage facility and the tools required to place the data in storage, HTML
forms have very limited use. However, not only can you use plain HTML forms,
ASP.NET 3.5 has some web controls that are almost identical to HTML forms
except they have far more functionality. In no time, you’ll be working with
tables and databases to store, fetch, change, and delete a wide variety of
data. In addition to the HTML-like controls, a whole other set of web controls
is available to work with data and create objects that HTML cannot. For
example, if your web site needs a calendar, all you have to do with ASP.NET 3.5
is add a calendar control by dragging it from the Toolbox and into the editor.
Then you can use the Calendar properties to perform other functions, like
reminding you of your upcoming anniversary. (Getting that right can be worth
the price of this book!)
All in all, my hope is that you will
enjoy working with ASP.NET 3.5 and C# 3.0 as much as I have. Not only is it
very easy to develop rich interactive web sites using ASP.NET, but in
conjunction with C# 3.0, the toolset is also a very powerful one. With it, you
have the best
of all worlds.
In this tutorial we will explore
this wonderful free tool along with its advantages especially for new web
developers. After downloading and installing the Visual Web Developer 2005
express edition form this link, run it and you will get this
start up page as shown in figure1 below.
runat="server"
What distinguishes the web hobbyist
from the professional developer is the ability to store and retrieve data from
a server over the Internet. Some readers may have made that step with PHP or
Perl, and for them the journey has already begun. For others, ASP.NET 3.5 is
just the next step in the growth and development of ASP.NET. For them, much
will be familiar and some will be very new. If the transition is from ASP.NET
using Visual Basic to ASP.NET with C#, then you will find even more new, and
the transition to C# is going to be easier than many imagine. Still others are
making the first step into the realm of server-side programming, so just about
everything about ASP.NET 3.5 and C# 3.0 is new.For those using ASP.NET for the
first time, the good news is that the transition to the server side could
hardly be easier. Everything in this book is set up to learn ASP.NET 3.5 and C#
3.0 using Visual Studio 2008. Using the tools built into Visual Studio 2008,
you will quickly learn that most of what needs to be done can be accomplished
by dragging controls into a visual editor.
And with the “code behind” method,
C# is added in a separate file, so when editing code, you will see a clear
separation—the C# 3.0 code comes “behind” the ASP.NET 3.5 code. For the most
part, though, you need only a minimum of coding skills in either ASP.NET, which
feels a lot like HTML, or C#, which has many features recognizable from
JavaScript. However, make no mistake about it, C# 3.0 is a full-fledged coding
language with the power of any good object-oriented programming (OOP) language.
Most of the C# you need is simply working with functions and subroutines called
by ASP.NET events.
As a result, learning C# is quite
simple, and you’ll get a lot of help from Visual Studio 2008 coding tips and
built-in IntelliSense. However, if you wish not to use Visual Studio 2008, all
of the code for both the ASP.NET and C# is provided as well. (You can program
it all using Notepad if you like!) You can find a free Express version of
Visual Studio 2008 at www.micr osoft.com/express/download/, and it has much of
the functionality of the full-fledged version. Likewise, you will find an
Express Edition of SQL Server 2005, and with them both you can learn ASP.NET
3.5 and C# 3.0 on a budget while using a powerful development tool.
The main use of ASP.NET in
conjunction with C# and Structured Query Language (SQL) is to store user input
in a database and get it back again. If you’ve ever dealt with forms in HTML,
you may know how frustrating it is to build a web site with data entry that
cannot be stored. In fact, without some kind of storage facility and the tools
required to place the data in storage, HTML forms have very limited use.
However, not only can you use plain HTML forms, ASP.NET 3.5 has some web
controls that are almost identical to HTML forms except they have far more
functionality.
In no time, you’ll be working with
tables and databases to store, fetch, change, and delete a wide variety of
data. In addition to the HTML-like controls, a whole other set of web controls
is available to work with data and create objects that HTML cannot. For
example, if your web site needs a calendar, all you have to do with ASP.NET 3.5
is add a calendar control by dragging it from the Toolbox and into the editor.
Then you can use the Calendar properties to perform other functions, like
reminding you of your upcoming anniversary. (Getting that right can be worth
the price of this book!)
All in all, my hope is that you will
enjoy working with ASP.NET 3.5 and C# 3.0 as much as I have. Not only is it
very easy to develop rich interactive web sites using ASP.NET, but in
conjunction with C# 3.0, the toolset is also a very powerful one. With it, you
have the best of all worlds.
In this tutorial we will explore
this wonderful free tool along with its advantages especially for new web
developers. After downloading and installing the Visual Web Developer 2005
express edition form this link, run it and you will get this
start up page as shown in figure1 below.
9. C#.NET
9.1 Basic .NET or C#.
Most of the samples
in this book were written by hand, without the help of Visual Studio .NET.
That’s not a knock on Visual Studio .NET; it’s evidence of my belief that
learning is best accomplished by coding and not by having someone else code for
you. Once you understand what goes into a Windows form or a Web form or a Web
service, you’ll find Visual Studio .NET an able partner in helping to create
them. Writing applications the old-fashioned way first will increase your depth
of understanding and better prepare you to work in an environment in which
tools shoulder part of the load for you.
C# (see section on name,
pronunciation) is an object-oriented programming language developed by
Microsoft as part of the .NET initiative and later approved as a standard by
ECMA and ISO.
Anders Hejlsberg
leads development of the C# language, which has a procedural, object-oriented
syntax based on C++ and includes aspects of several other programming languages
(most notably
C# principal designer and lead
architect at Microsoft is Anders Hejlsberg. His previous experience in programming
language and framework design (Visual J++, Borland Delphi, and Turbo Pascal)
can be readily seen in the syntax of the C# language, as well as throughout the
Common Language Runtime (CLR) core.
C# is intended to
be a simple, modern, general-purpose, object-oriented programming language.
9.2 .NET Framework 1.1
This is the first major .NET
Framework upgrade. It is available on its own as a redistributable package or
in a software development kit, and was published April 3, 2003. It is also part
of the second release of Microsoft Visual Studio .NET (released as Visual
Studio .NET 2003). This is the first version of the .NET Framework to be
included as part of the Windows operating system, shipping with Windows Server
2003.
9.3 Why C#?
Many people believed that there was
no need for a new programming language. Java, C++, Perl, Microsoft Visual
Basic, and other existing languages were believed to offer all the
functionality needed.
C# is a language
derived from C and C++, but it was created from the ground up. Microsoft
started with what worked in C and C++ and included new features that would make
these languages easier to use. Many of these features are very similar to what
can be found in Java. Ultimately, Microsoft had a number of objectives when building
the language. These objectives can be summarized in the claims Microsoft makes
about C#:
C# is simple.
C# is modern.
C# is object-oriented.
In addition to Microsoft's reasons, there are other reasons to use
C#:
C# is powerful and flexible.
C# is a language of few words.
C# is modular.
C# will be popular.
C# Is Simple
C# removes some of the complexities of languages such as Java and
C++, including the removal of macros, templates (in the form of Generic in C#
2.0), multiple inheritance, and virtual base classes. These are all areas that
cause either confusion or potential problems for C++ developers.
9.4 What is C#?
C# (pronounced C sharp) is a new
programming language introduced by Microsoft with the Microsoft .NET framework.
It was first created in the late 1990's as part of Microsoft’s.NET strategy. It
is a new language free of backward compatibility and a bunch of new, exciting
and promising features. It is an Object Oriented Programming language,
which at its core, and has similarities with Java, C++ and VB. The main brains
behind C# were Anders Hejlsberg and Scott Wiltamuth. However, many other
personalities like Rob Howard, Scott Guthrie were also involved behind C# and
the .NET Framework.
In fact, C#
combines the power & efficiency of C++, simple & clean Object Oriented
design of Java, and code simplification of Visual Basic. Like Java, C# also
does not allow multiple inheritance and use of pointers (in safe and managed
code) while it does provide garbage memory collection at runtime, type and
memory access checking. But, contrary to java, C# keeps the different
useful concepts of C++ like operator overloading, enumerations, pre-processor
directives, pointers (in unmanaged and un-safe code), function pointers (in the
form of delegates), also promises to have template support (with the name of
generics) in next versions. Like VB it also supports the concepts of properties
(context sensitive accessor to fields).
In addition to
this, C# comes up with some new/exciting features like reflections, attributes,
marshalling, remoting, threads, streams, data access with ADO.NET, etc. C#
programming language is designed from the scratch keeping in mind the
Microsoft.Net environment. MS.Net (and thus C#) programs runs on top of the
Common Language Runtime (CLR), which provides the runtime support to them.
C# has been
standardized by ECMA (European Computer Manufactures
Association) Microsoft originally released beta versions of .NET framework
to get feedback about the product from developers and customers. Based on the
feedback, received from them for the first beta, Microsoft released second beta
in early 2001. Finally, they released final versions of C# under the name, .NET
Framework 1.0 in 2002 and that of 1.1 in 2003.
With each release, the
product shipped with improved features for developing secured and scalable
applications along with high quality documentation. Like C++ and Java, C# is an
object oriented programming language. In fact all .NET languages are object
oriented since they all have the .NET Framework built into them.
10. HTML
Learn basic HTML to create your Web site. Basic HTML is not
hard to learn. Learning HTML is probably the single most important thing you'll
ever do if you want to create your own personal Web site. You must learn HTML to
design good pages because it is the language in which Web site on the Internet
are based on.
Web sites are a great way to show off something in your
life. Basic HTML will let you show the world whatever it is you want to show
them on your Web site. Adding colors, changing text size and including pictures
on your Web site are just a few of the things you can do when you learn basic
HTML.
To learn basic HTML you must keep in mind that it's simply
a series of letters that are abbreviations of what they actually stand for. For
example, H1 stands for a heading for a paragraph that is the first of five
sizes and BR is a line break.
One
important thing to remember, while you learn basic HTML, is that on a Web page
the HTML tags must come in a certain order and most HTML tags must have a start
and end tag for the browser to recognize the command. An end tag is just simply
the same as the start tag except that it starts with the / symbol. A heading would look like this<H1>Heading
Here</H1>. There is a start tag,H1, the heading, and an end
tag, /H1.
Learn basic HTML the right way and remember that the tags
must come in a certain order. The basic structure of a web page is as follows:
<HTML>
<HEAD> Here you can put important document information such as frames,
language, and special instructions.
<TITLE>Title of your page.</TITLE>
</HEAD>
<BODY> Put your story, pictures, links, and everything else here.
<H1>Heading of your paragraph.</H1>
<P>This is where you enter the
text of your document.</P>
This is how to write a link:
<A HREF="http://www.nameofpage.com">Title
or what you want to say.</A>
</BODY>
</HTML>
You can also enter a link into
the middle of a sentence. If I wanted to say "Microsoft has
some wonderful demos." It would look like this:
<A HREF="http://www.microsoft.com/en/us/default.aspx">Microsoft </A>has some wonderful
demos to help you learn basic HTML.
You not only can create links to other pages but you can
also create links to another place on the same page. If I wanted you to go back
to the beginning of this article I would say something like "Go Back" and by clicking on the hyperlink
you would go back to the beginning. This one is a little more difficult because
there are two parts to it. First of all you create your link:
<A HREF="nameofdocument#There">Go
Back</A>
The word "There" is
the word I want to take you back to so now I must go to that word and create
and anchor so the link I just created knows where to go:
<A NAME="There">There</A>
When you learn basic HTML you
can write your Web site in the text editor that comes with Windows, programs
such as NoteTab and Arachnophilia or one that comes with your web browser.
Either way if you just follow the rules from when you
learned basic HTML everything will turn out just fine.
The CSS visual formatting model is a way of laying out
documents on visual media (such as a computer screen or a printed page). By all
accounts, it is a very simple formatting model, and the publishing world has
seen much more complicated ones. Still, it is not something that is simple to
explain or grasp in a few words.
Various CSS properties are used to control how a document
will appear in the context of this formatting model. You have seen most of them
in the examples used so far, but I haven't explained their usage because I have
to explain the formatting model first.
As I said, the formatting model is a pretty complicated
affair. As if that wasn't enough, though, the implementations that exist, most
notably in Microsoft Internet Explorer and Netscape Navigator, are respectably
problematic and horrible. Explorer does a pretty good job of sticking to the
model, and will behave sensibly with a few exceptions that can be dealt with
simply. Navigator, on the other hand, has its own concept of what the various
properties should do.
Instead of going through the theory and observing the bugs
in Explorer and Navigator along the way, as I have done in the tutorials so
far, I will explain the theory, that is how the CSS specification explains
formatting should be done, in this tutorial, and deal
with the implementations in the next one. I hope this makes the whole process
easier to understand.
10.1 What Is a Tag?
A tag is a method
of formatting HTML documents.
With tags you can
create italic or bold characters, make things blink, and
can control the color and size of the lettering. Tags can
be "nested". This means that you can make something bold and italic
and green and blinking by simply surrounding the previous tag
with the next. Tags can be used to insert pictures and graphics. Tags can be
used to create bulleted lists like this one, or numbered lists. Tags look
something like this: <b> chosen text </b> .
All tags use
the < and > (less-than and greater-than symbols) to signal the
browser. These are located above the comma and period keys. Within a tag,
capitalization doesn't matter. <FONT> is the same as <font> or <Font> .
I usually don't bother capitalizing when I use tags.
Below, I have used
capital letters when I felt that the number "1" and the letter
"l" might be confused. It is essential to always close the
tags! If not, the formatting will contaminate everything that follows it. But
don't panic, closing tags is very easy, and even the most experienced
surfers sometimes forget.
11. SQL
SERVER 2008
11.1 Structured Query Language (SQL)
To work with data
in a database, you must use a set of commands and statements (language) defined
by the DBMS software. There are several different languages that can be used
with relational databases; the most common is SQL. Standards for SQL have been
defined by both the American National Standards Institute (ANSI) and the
International Standards Organization (ISO). Most modern DBMS products support
the Entry Level of SQL-92, the latest SQL standard (published in 1992).
11.2 Client/Server Architecture
Microsoft® SQL
Server™ is designed to work effectively in a number of environments:
As a two-tier or multitier client/server database system
As a desktop database system
Client/Server Database Systems
Client/server
systems are constructed so that the database can reside on a central computer,
known as a server, and be shared among several users. Users
access the server through a client or server application:
In a two-tier
client/server system, users run an application on their local computer, known
as a client, that connects over a network to the
server running SQL Server. The client application runs both business logic and
the code to display output to the user, and is also known as a thick client. In
a multitier client/server system, the client application logic is run in two locations:
The thin client is
run on the user’s local computer and is focused on displaying results to the
user. The business logic is located in
server applications running on a server. Thin clients request functions from
the server application, which is itself a multithreaded application capable of
working with many concurrent users. The server application is the one that
opens connections to the database server and can be running on the same server
as the database, or it can connect across the network to a separate server
operating as a database server.
This is a typical
scenario for an Internet application. For example, a server application can run
on a Microsoft Internet Information Services (IIS) and service thousands of
thin clients running on the Internet or an intranet. The server application
uses a pool of connections to communicate with a copy of SQL Server. SQL Server
can be installed on the same computer as IIS, or it can be installed on a
separate server in the network. Having
data stored and managed in a central location offers several advantages:
Each data item is
stored in a central location where all users can work with it. Separate copies of the item are not stored on
each client, which eliminates problems with users having to ensure they are all
working with the same information. Business and security rules can be defined
one time on the server and enforced equally among all users.
This can be done in
a database through the use of constraints, stored procedures, and triggers. It
can also be done in a server application.
A relational
database server optimizes network traffic by returning only the data an
application needs. For example, if an application working with a file server
needs to display a list of the names of sales representatives in
If the application
is working with a relational database server, it sends this command:
SELECT first_name, last_name
FROM employees
WHERE emp_title = 'Sales Representative'
AND emp_state = 'OR'
The relational
database sends back only the names of the sales representatives in
SQL is the acronym for Structured
Query Language. This language is used for developing database related applications.
Before developing any application of database it is necessary to understand
what is Database?
Database:
A database can be defined as the
collection of tables of relative Application. For example if you are developing
an application for maintaining the information of an university then you have
to create database with name STUDENT after words you can create any number of
tables related to that Student.
Now a table is
nothing but the combination of Rows & Columns. The columns are known as the
Attributes or Properties of the table and Columns are known as Tuples, which
are the actual values of the respective column headers.
12. QUERIES
The queries can be
defined as statements, which can be used to develop the database related
applications. There are different queries in SQL some major queries are explained
below.
CREATE DATABASE
Database_Name
This query will
create a database with the name given in place of Database_Name.
Ex: CREATE DATABASE Student
Now you have to enter your database by using the following query.
USE Database_Name
Ex: USE Student
Now developer can create the tables related to university in this
database. To create the tables the following query can be used.
CREATE TABLE Table_Name (Column_Name DATATYPE)
Here Table_Name and Column_Name are any valid variable names and
datatype should any of the following.
Integer-> Represented as int, and can be used if the column is
going to hold whole numbers.
Real Numbers-> Represented as float, and can be used if the
column is going to hold fractional numbers.
Characters-> Represented as varchar, and can be used if the
column is going to hold characters or strings. If you are mentioning the
datatype of a column as varchar then it also necessary to mention the space
within the bracket, which indicates how many characters a column should store.
Ex: CREATE TABLE student
(STD_No int, Emp_Name varchar (10), marks float)
After the creation of tables we can insert the values in that
table by using the following query.
INSERT INTO Table_Name VALUES (Values)
If the datatype of a column is int or float then you can write the
Numbers directly but if datatype is varchar then the values should be enclosed
within the single quotations
Ex: INSERT INTO student
(1,’R.R. Sharma’, 20)
Apart from above mentioned queries SQL has many more queries as
Mentioned below.
Update -> Used to update the contents of a table
Alter -> To alter the
table i.e., You can add the columns or remove the columns
Drop -> to drop tables or databases
Delete -> to delete contents of the table.
13. SYSTEM
ANALYSIS
13.1 FEASIBILITY STUDY
Analysis and evaluation of a proposed project to determine if it is technically feasible, is
feasible within the estimated cost, and will be profitable. Feasibility studies are almost always conducted where
large sums are at stake. Also called feasibility analysis.
The main difficulty with this You have probably noticed that
the same web page may look different depending
on what browser you are using and even what version of the browser. In some cases a web page will
not work properly unless you upgrade
to the latest version of a particular browser. Likewise a web page may work fine with an older browser
but not a newer one.
Now consider the company that
deploys several browser-based applications. And
then suddenly one of those applications comes out with an upgrade that requires an upgrade to the current
standard company browser. If the company
decides to upgrade the browser, there is a likely consequence that some features of at lease one of the
browser-based applications will not work with the new browser. This leaves the
company paralyzed. Do they upgrade the
browser and risk breaking some of the other browser-based applications?
Do they allocate extensive resources to
testing the deployed browser-based applications
to see if they will still work with the new browser before deploying it? Or do they stay
entrenched on old technology?
13.2 TECHNICAL FEASIBILITY
Also the developers of browser-based applications have to make
sure their user interface works with multiple browsers and versions of those
browsers. This means it takes more time to develop and test each new
feature, and every time a new version of a browser comes out this problem
becomes worse. It also means that it takes more time and is more expensive
to implement new features in browser-based systems. Consequently, web
client systems will eventually overtake browser-based competitors with either
lower price or better functionality or both.
The time slot could be 100
milliseconds. If job1 takes a total time of 250ms to complete, the Round-Robin scheduler
will suspend the job after 100ms and give other jobs their time on the CPU.
Once the other jobs have had their equal share (100ms each), job1 will get
another allocation of CPU time and
the cycle will repeat. This process continues until the job finishes and needs
no more time on the CPU.
Modelling of actual finish time, while
feasible, is computationally intensive. The model needs to be substantially
recomputed every time a packet is selected for transmission and every time a
new packet arrives into any queue.
13.3 OPERATIONAL FEASIBILITY:
Lastly there is the issue of
performance. Web-based applications work by sending data
over the internet or intranet. This mode of communication is relatively slow
compared to network speeds and when the database becomes large there will be
performance problems with many web-based applications. However, it is easy for a
web-client application to solve performance problems caused by data transmission
simply by caching data on the client computers. Browser based
applications can do some caching too, however, the cached data is generally
stored in RAM and lost when the browser is closed.
PR-Tracker on the other
hand uses a cached database to improve performance. When PR-Tracker is closed
the cache remains intact. Consequently, there are many actions PR-Tracker Web
Client can do in a split second that may take minutes with
a browser-based application or may even be impossible.
13.4 ECONOMICAL FEASIBILITY:
The proposed system
won’t be that much economically costly as this application does not require any
hardware part and interfacing with that. Only one web server you need which you
will get very easily and economically.
16. SOURCE CODE
16.1 CustomersInfo:
<%@
Page Language="C#" AutoEventWireup="true"
CodeFile="customers.aspx.cs" Inherits="customers" %>
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head
runat="server">
<title></title>
<style type="text/css">
a
{
text-align:center;
color:White;
}
</style>
</head>
<body
background="img/Colorful (5)4.jpg">
<form id="form1"
runat="server">
<div>
<table cellpadding="10"
cellspacing="05" border="5" width="100%"
bgcolor="#669999" style="font-size:45px; font-style:normal;
font-family:Times New Roman; color:purpule; border-style:inset;
border-color:Coral; color:black;">
<tr>
<td align="center"
>CUSTOMER</td>
</tr>
</table>
<hr color="red"
size="10" width="100%" />
<a href="HOME.aspx">GO TO
HOMEPAGE</a>
<hr color="green"
size="10" width="100%" />
<table cellpadding="10"
bgcolor="purple" align="center" border="05" bordercolor="yellow"
>
<tr>
<td>
<asp:GridView
ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataKeyNames="customer_id"
DataSourceID="SqlDataSource1" BackColor="White"
BorderColor="#999999"
BorderStyle="Solid" BorderWidth="1px"
CellPadding="3"
ForeColor="Black"
GridLines="Vertical">
<Columns>
<asp:CommandField
ShowSelectButton="True" />
<asp:BoundField
DataField="customer_id" HeaderText="customer_id"
ReadOnly="True"
SortExpression="customer_id" />
<asp:BoundField
DataField="fname" HeaderText="fname"
SortExpression="fname" />
<asp:BoundField
DataField="lname" HeaderText="lname" SortExpression="lname"
/>
<asp:BoundField
DataField="place" HeaderText="place"
SortExpression="place" />
<asp:BoundField
DataField="companyname" HeaderText="companyname"
SortExpression="companyname" />
<asp:BoundField
DataField="detail" HeaderText="detail"
SortExpression="detail" />
</Columns>
<FooterStyle
BackColor="#CCCCCC" />
<PagerStyle
BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"
/>
<SelectedRowStyle
BackColor="#000099" Font-Bold="True"
ForeColor="White" />
<HeaderStyle
BackColor="Black" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle
BackColor="#CCCCCC" />
</asp:GridView>
<asp:SqlDataSource
ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ss DeleteCommand="DELETE FROM
[customer] WHERE [customer_id] = @customer_id"
InsertCommand="INSERT INTO
[customer] ([customer_id], [fname], [lname], [place], [companyname], [detail])
VALUES (@customer_id, @fname, @lname, @place, @companyname, @detail)"
SelectCommand="SELECT * FROM
[customer]"
UpdateCommand="UPDATE
[customer] SET [fname] = @fname, [lname] = @lname, [place] = @place,
[companyname] = @companyname, [detail] = @detail WHERE [customer_id] =
@customer_id">
<DeleteParameters>
<asp:Parameter
Name="customer_id" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter
Name="fname" Type="String" />
<asp:Parameter
Name="lname" Type="String" />
<asp:Parameter
Name="place" Type="String" />
<asp:Parameter
Name="companyname" Type="String" />
<asp:Parameter
Name="detail" Type="String" />
<asp:Parameter
Name="customer_id" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter
Name="customer_id" Type="String" />
<asp:Parameter
Name="fname" Type="String" />
<asp:Parameter
Name="lname" Type="String" />
<asp:Parameter
Name="place" Type="String" />
<asp:Parameter
Name="companyname" Type="String" />
<asp:Parameter
Name="detail" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td align="center">
<asp:DetailsView
ID="DetailsView1" runat="server"
AutoGenerateRows="False"
BackColor="White"
BorderColor="#336666" BorderStyle="Double"
BorderWidth="3px"
CellPadding="4"
DataKeyNames="customer_id" DataSourceID="SqlDataSource2"
GridLines="Horizontal"
Height="50px" oniteminserted="DetailsView1_ItemInserted"
Width="125px">
<FooterStyle
BackColor="White" ForeColor="#333333" />
<RowStyle
BackColor="White" ForeColor="#333333" />
<PagerStyle
BackColor="#336666" ForeColor="White"
HorizontalAlign="Center" />
<Fields>
<asp:BoundField
DataField="customer_id" HeaderText="customer_id"
ReadOnly="True"
SortExpression="customer_id" />
<asp:BoundField DataField="fname"
HeaderText="fname" SortExpression="fname" />
<asp:BoundField
DataField="lname" HeaderText="lname"
SortExpression="lname" />
<asp:BoundField
DataField="place" HeaderText="place" SortExpression="place"
/>
<asp:BoundField
DataField="companyname" HeaderText="companyname"
SortExpression="companyname" />
<asp:BoundField
DataField="detail" HeaderText="detail"
SortExpression="detail"
/>
<asp:CommandField
ShowInsertButton="True" />
</Fields>
<HeaderStyle
BackColor="#336666" Font-Bold="True"
ForeColor="White" />
<EditRowStyle
BackColor="#339966" Font-Bold="True" ForeColor="White"
/>
</asp:DetailsView>
<asp:SqlDataSource
ID="SqlDataSource2" runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM
[customer] WHERE [customer_id] = @customer_id"
InsertCommand="INSERT INTO
[customer] ([customer_id], [fname], [lname], [place], [companyname], [detail])
VALUES (@customer_id, @fname, @lname, @place, @companyname, @detail)"
SelectCommand="SELECT * FROM
[customer] WHERE ([customer_id] = @customer_id)"
UpdateCommand="UPDATE
[customer] SET [fname] = @fname, [lname] = @lname, [place] = @place,
[companyname] = @companyname, [detail] = @detail WHERE [customer_id] =
@customer_id">
<SelectParameters>
<asp:ControlParameter
ControlID="GridView1" Name="customer_id"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter
Name="customer_id" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter
Name="fname" Type="String" />
<asp:Parameter
Name="lname" Type="String" />
<asp:Parameter
Name="place" Type="String" />
<asp:Parameter
Name="companyname" Type="String" />
<asp:Parameter
Name="detail" Type="String" />
<asp:Parameter
Name="customer_id" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter
Name="customer_id" Type="String" />
<asp:Parameter
Name="fname" Type="String" />
<asp:Parameter
Name="lname" Type="String" />
<asp:Parameter
Name="place" Type="String" />
<asp:Parameter
Name="companyname" Type="String" />
<asp:Parameter
Name="detail" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
16.2 HomePage:
<%@
Page Language="C#" AutoEventWireup="true"
CodeFile="HOME.aspx.cs" Inherits="HOME" %>
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head
runat="server">
<title></title>
<style type="text/css">
a{
text-decoration:none;
font-family:Arial;
text-align:center;
}
a:hover
{
text-decoration:underline;
color:Red;
}
</style>
</head>
<body
background="img/0025.jpg">
<form id="form1"
runat="server">
<div
<hr color="lime"
size="10" width="100%" />
<table cellpadding="10"
cellspacing="05" border="8" width="100%"
bgcolor="#999966" style="font-size:45px; font-style:normal;
font-family:Times New Roman; color:purpule; border-style:inset;
border-color:Coral; color:black;">
<tr>
<td align="center" >PRODCT
AND SERVICE MANAGEMENT SYSTEM</td>
</tr>
</table>
<hr color="purple" size="10"
/>
<table cellpadding="10"
cellspacing="05" width="100%" border="5" align="center"
bgcolor="#ccccff"
style="font-size:25px; font-style:normal; color:DarkBlue;
border-style:inset; border-color:Coral;">
<tr>
<td>
<a href="coustomer1.aspx">Customers
Info</a>
</td>
<td><a
href="productinfo.aspx">Product Info</a></td>
<td>
<a
href="complaint.aspx">Complaint</a>
</td>
<td>
<a
href="SERVICE.aspx">Service</a>
</td>
<td>
<a href="Admin/HOME.aspx">Admin</a>
</td>
</tr>
</table>
<hr color="fuchsia"
size="10" />
<img src="img/hepto.jpg"
width="40%" />
</div>
</form>
</body>
</html>
16.3 ProductInfo:
<%@
Page Language="C#" AutoEventWireup="true"
CodeFile="productinfo.aspx.cs" Inherits="productinfo" %>
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head
runat="server">
<title></title>
<style type="text/css">
a
{
text-decoration:none;
color:White;
}
</style>
</head>
<body
background="img/Colorful (15)14.jpg">
<form id="form1"
runat="server">
<div >
<table cellpadding="10"
cellspacing="05" border="8" width="100%"
bgcolor="#999966" style="font-size:45px; font-style:normal;
font-family:Times New Roman; color:purpule; border-style:inset;
border-color:Coral; color:black;">
<tr>
<td align="center" >PRODUCT
INFO</td>
</tr>
</table>
<hr color="red"
size="10" width="100%" />
<a href="HOME.aspx">GO TO
HOMEPAGE</a>
<hr color="green"
size="10" width="100%" />
<table cellpadding="10" align="center" border="05"
bordercolor="lime">
<tr>
<td>
<asp:GridView ID="GridView1"
runat="server" AutoGenerateColumns="False"
BackColor="White"
BorderColor="#999999" BorderStyle="Solid"
BorderWidth="1px"
CellPadding="3"
DataKeyNames="product_id" DataSourceID="SqlDataSource1"
GridLines="Vertical"
ForeColor="Black">
<Columns>
<asp:CommandField
ShowSelectButton="True" />
<asp:BoundField
DataField="product_id" HeaderText="product_id"
ReadOnly="True"
SortExpression="product_id"
/>
<asp:BoundField
DataField="name" HeaderText="name"
SortExpression="name" />
<asp:BoundField
DataField="manufacture" HeaderText="manufacture"
SortExpression="manufacture" />
<asp:BoundField
DataField="date" HeaderText="date"
SortExpression="date" />
<asp:BoundField
DataField="specification" HeaderText="specification"
SortExpression="specification" />
<asp:BoundField DataField="description"
HeaderText="description"
SortExpression="description" />
<asp:BoundField
DataField="price" HeaderText="price"
SortExpression="price" />
</Columns>
<FooterStyle
BackColor="#CCCCCC" />
<PagerStyle
BackColor="#999999" ForeColor="Black"
HorizontalAlign="Center" />
<SelectedRowStyle
BackColor="#000099" Font-Bold="True"
ForeColor="White" />
<HeaderStyle
BackColor="Black" Font-Bold="True" ForeColor="White"
/>
<AlternatingRowStyle
BackColor="#CCCCCC" />
</asp:GridView>
<asp:SqlDataSource
ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM
[product] WHERE [product_id] = @product_id"
InsertCommand="INSERT INTO
[product] ([product_id], [name], [manufacture], [date], [specification],
[description], [price]) VALUES (@product_id, @name, @manufacture, @date,
@specification, @description, @price)"
SelectCommand="SELECT * FROM
[product]"
UpdateCommand="UPDATE
[product] SET [name] = @name, [manufacture] = @manufacture, [date] = @date,
[specification] = @specification, [description] = @description, [price] =
@price WHERE [product_id] = @product_id">
<DeleteParameters>
<asp:Parameter
Name="product_id" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter
Name="name" Type="String" />
<asp:Parameter
Name="manufacture" Type="String" />
<asp:Parameter
DbType="Date" Name="date" />
<asp:Parameter
Name="specification" Type="String" />
<asp:Parameter
Name="description" Type="String" />
<asp:Parameter
Name="price" Type="Double" />
<asp:Parameter
Name="product_id" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter
Name="product_id" Type="String" />
<asp:Parameter
Name="name" Type="String" />
<asp:Parameter
Name="manufacture" Type="String" />
<asp:Parameter
DbType="Date" Name="date" />
<asp:Parameter
Name="specification" Type="String" />
<asp:Parameter
Name="description" Type="String" />
<asp:Parameter
Name="price" Type="Double" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td align="center">
<asp:DetailsView
ID="DetailsView1" runat="server"
AutoGenerateRows="False"
DataKeyNames="product_id"
DataSourceID="SqlDataSource2" Height="50px"
oniteminserted="DetailsView1_ItemInserted"
Width="125px" BackColor="White"
BorderColor="#999999"
BorderStyle="Solid" BorderWidth="1px"
CellPadding="3"
ForeColor="Black"
GridLines="Vertical">
<FooterStyle
BackColor="#CCCCCC" />
<PagerStyle
BackColor="#999999" ForeColor="Black"
HorizontalAlign="Center" />
<Fields>
<asp:BoundField
DataField="product_id" HeaderText="product_id"
ReadOnly="True"
SortExpression="product_id" />
<asp:BoundField
DataField="name" HeaderText="name"
SortExpression="name" />
<asp:BoundField
DataField="manufacture" HeaderText="manufacture"
SortExpression="manufacture" />
<asp:BoundField
DataField="date" HeaderText="date" SortExpression="date"
/>
<asp:BoundField
DataField="specification" HeaderText="specification"
SortExpression="specification" />
<asp:BoundField
DataField="description" HeaderText="description"
SortExpression="description"
/>
<asp:BoundField
DataField="price" HeaderText="price"
SortExpression="price" />
<asp:CommandField
ShowInsertButton="True" />
</Fields>
<HeaderStyle BackColor="Black"
Font-Bold="True" ForeColor="White" />
<EditRowStyle
BackColor="#000099" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle
BackColor="#CCCCCC" />
</asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource2"
runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM
[product] WHERE [product_id] = @product_id"
InsertCommand="INSERT INTO
[product] ([product_id], [name], [manufacture], [date], [specification],
[description], [price]) VALUES (@product_id, @name, @manufacture, @date,
@specification, @description, @price)"
SelectCommand="SELECT * FROM
[product] WHERE ([product_id] = @product_id)"
UpdateCommand="UPDATE
[product] SET [name] = @name, [manufacture] = @manufacture, [date] = @date,
[specification] = @specification, [description] = @description, [price] =
@price WHERE [product_id] = @product_id">
<SelectParameters>
<asp:ControlParameter
ControlID="GridView1" Name="product_id"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter
Name="product_id" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter
Name="name" Type="String" />
<asp:Parameter
Name="manufacture" Type="String" />
<asp:Parameter
DbType="Date" Name="date" />
<asp:Parameter
Name="specification" Type="String" />
<asp:Parameter
Name="description" Type="String" />
<asp:Parameter
Name="price" Type="Double" />
<asp:Parameter
Name="product_id" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter
Name="product_id" Type="String" />
<asp:Parameter
Name="name" Type="String" />
<asp:Parameter
Name="manufacture" Type="String" />
<asp:Parameter
DbType="Date" Name="date" />
<asp:Parameter
Name="specification" Type="String" />
<asp:Parameter
Name="description" Type="String" />
<asp:Parameter
Name="price" Type="Double" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
<img
src="img/BSMBlueprintMedium.jpg" width="30%" />
</div>
</form>
</body>
</html>
17. Conclusion
The application
develops an autonomous system where the application will going to maintain the
details information of product which has been developed and ready to dispatch.
The application also takes care of the ordered product and by using that
manufacturing usit will going to manufacture the products. Once the Production plan is approved, the
Part Stocks will be updated when the Parts are issued to the Production
Department. Once the finished products are available from the Production
Department, the Products will be dispatched based on the Orders placed by the
Dealers. The stocks with the dealers will also be maintained.
BIBLIO0GRAPHY
·
HTML The complete reference
·
ASP.Net The complete reference.
Comments
Post a Comment