Sie sind auf Seite 1von 5

1

Projects for Murachs ASP.NET 4.5 with C# 2012

Projects for
Murachs ASP.NET 4.5 Web Programming
with C# 2012
The projects in this document let you apply the programming skills you learn in
Murachs ASP.NET 4.5 Web Programming with C# 2012 by developing an application
called SportsPro. This application is designed for the technical support department of a
hypothetical software company that develops software for sports leagues. The purpose of
the application is to track technical support service calls (referred to as incidents) in a
database that also stores information about the companys customers, software products,
and technicians. The application uses a database called TechSupport. Before you do any
of the projects, you should read the introductory information that follows.
An introduction to the projects
The design of the SportsPro application
The design of the TechSupport database
How to prepare for using the TechSupport database
How to restore the original database files
How to develop the projects

2
2
3
4
4
4

The projects

Project 1-A:
Project 1-B:
Project 2-A:
Project 2-B:
Project 2-C:

6
7
10
13
14

Display customers
Create a contact list
Survey customers
Create a master page and content pages
Add site navigation

An int r oduction t o t he pr ojects


This introduction describes the design of the SportsPro application and the
TechSupport database. In addition, it explains how to make the TechSupport database
available to your applications and how to restore the database so it contains its original
data. It also provides some general information about developing the projects.

The design of the SportsPro application


The SportsPro application consists of several pages that provide functions for three
types of users. First, it lets administrators perform functions such as maintaining the
Products, Customers, and Technicians tables of the TechSupport database. Second, it lets
technicians perform functions such as displaying and updating incidents. And third, it lets
customers perform functions such as registering products.
Each project has you add one or more new pages to the SportsPro application. For
example, project 3-A has you add a page that displays incidents by customer, and project
3-B has you add a page that maintains the data in the Products table of the TechSupport
database. If you complete all of these projects, youll have a relatively realistic web
application, although not all of the required functions will be implemented.
Note that the project numbers refer to the sections in the book. So, for example, you
can complete projects 2-A, 2-B, and so on after reading section 2, and you can complete
projects 3-A, 3-B, and so on after reading section 3. Because some of the projects dont
require that you have all of the skills presented in a section, though, you may be able to
complete a project before youve read all of the chapters in that section. In fact, many of
the projects require just the skills presented in a specific chapter. For example, project 2B requires the skills youll learn in chapter 9, and project 2-C requires the skills youll
learn in chapter 11.
To help you decide when you should be ready to complete a project, each project
description lists the chapters that are required for that project. Keep in mind, however,
that we recommend you read all of the chapters in section 1 before you complete any of
the projects for later sections since this section presents the basic concepts and skills for
developing web applications with ASP.NET 4.5.

The design of the TechSupport database


The TechSupport database is used to track technical support incidents for a small
software company named SportsPro. It consists of the six tables shown in the diagram
that follows. The main table is the Incidents table, which contains one row for each
technical support incident. Each row in the Incidents table is related to one row in the
Customers table, which contains information about the companys customers; one row in
the Products table, which contains information about the companys products; and one
row in the Technicians table, which contains information about the companys technical
support staff members. In addition, a table called Registrations keeps track of the
products that are registered to each customer, and the States table contains state and zip
code information.

In addition to the column properties shown above, you should know that the
CustomerID, IncidentID, and TechID columns in the Customers, Incidents, and
Technicians tables are identity columns. So the values of these columns are set
automatically when new rows are added to these tables.

How to prepare for using the TechSupport


database
Your instructor will walk you through installing this sql database.

How to develop the projects


The description of each project includes the general operation of the projects pages,
an image of how the pages should appear in a browser, and specifications for the
processing the pages should do. This information is detailed enough for you to complete
the project. However, youll occasionally need to determine minor details on your own,
such as what error messages to display when the user enters invalid data.
The names of the forms youll create for each project are also given in the project
description. To avoid conflicts with later projects, you should use the indicated names.
You should also use the names specified in the project descriptions for any other classes
youre asked to create.
Unless youre instructed otherwise, you are free to implement each project using any
programming techniques you wish. In some cases, however, the projects specifications
will direct you to use a specific programming technique. For example, a project may
direct you to use session state or cross-page posting. In that case, you should implement
the project as directed.
Because the book doesnt require that you have in-depth knowledge of HTML and
CSS, you can use tables to define the layout of each page. However, you should use the
HTML5 semantic elements whenever that makes sense. In addition, you will be required
to create a style sheet for the first project that defines the basic layout of each page, and
youll need to update this style sheet in some of the later projects. If youre familiar with
CSS, you may also want to use it instead of using tables since this is the preferred
technique. Just be sure that your focus is on using the ASP.NET skills youve learned and
not on coding HTML and CSS.

Project 1-A: Display customers


For this project, youll create a page named CustomerDisplay.aspx that displays
information for a selected customer. To do that, youll use a SQL data source. (Required
reading: section 1)

The design of the Customer Display page

Operation

When the page is first displayed, the information for the first customer in the dropdown list is displayed on the page. After that, the information for the customer that
the user selects from the drop-down list is displayed.

Specifications

Create a class named Customer that contains a public property for each column in
the Customers table. Then, use this class to create a Customer object that contains
the information for the selected customer.
Add a SQL data source to the page that retrieves all the rows and columns from the
Customers table and sorts them by the Name column. When you create the connection
for this data source, you should save it in the web.config file. Then, bind the dropdown list to this data source so the Name column is displayed for each item in the list
and the CustomerID column is stored as the value of each item.
To get the data for a selected customer, create a data view from the data source
and then filter the data view so it consists of just the row for the selected
customer.
Use a table to align the address, phone, and email information.
Create a style sheet that contains the basic formatting for the page as shown above.
Use any color you like for the border and any fonts, colors, and sizes you like for the
two headings.

Das könnte Ihnen auch gefallen