Create a class named incident that consists of one public


Project A: Survey customers

For this project, you'll create a page named CustomerSurvey.aspx that surveys customers regarding recent incidents and a page named SurveyComplete.aspx that displays a message when the survey is submitted. These pages use a variety of standard and validation controls. (Required reading: chapters 6 and 7)

• When the Customer Survey page is first displayed, all of the controls except for the Customer ID text box and the Get Incidents button are disabled.

• When the user enters a customer ID and clicks the Get Incidents button, any closed incidents for that customer are displayed in the list box and all of the controls on the page are enabled. If there aren't any closed incidents, the controls are not enabled and an appropriate message is displayed below the customer ID.

• To complete the survey, the user selects an incident, makes the appropriate selections and entries, and then clicks the Submit button. Then, the Survey Complete page is displayed with a message that depends on whether or not the user has asked to be contacted. The user can close this page or complete another survey by clicking the Return to Survey button.

Testing the Customer Survey page

• To test this page, you will need to set the starting page to the Customer Survey page. In project 2-B, however, you will add a navigation bar to this application that lets you access the various pages of the web site.

• To test this page, you can use customer IDs like 1010 and 1070. Or, you can use the Server Explorer to look at the data in the Customer table. To do that, double click on the database in the App_Data folder to open the Server Explorer, drill down in the Server Explorer to the Customers table, right click on it, and select Show Table Data.

Specifications

• Create a class named Incident that consists of one public property for each column in the Incidents table and a method named CustomerIncidentDisplay that formats an incident for display on the Customer Survey page.

• Create a class named Survey that consists of the following properties that represent the data for a survey:

Public Property CustomerID As Integer
Public Property IncidentID As Integer
Public Property ResponseTime As Integer
Public Property TechEfficiency As Integer
Public Property Resolution As Integer
Public Property Comments As String
Public Property Contact As Boolean
Public Property ContactBy As String

• Use radio button lists to implement the ratings for the three categories in the survey.

The Text properties for the list items in these lists should be set as shown on the page, and the Value properties should be set to 1, 2, 3, and 4.

• Use a radio button group for the last two radio buttons on the page.
• Use required field validators for the Customer ID text box and the Incidents list box, and use a compare validator for the Customer ID text box that checks for an integer value. In addition, use validation groups so the validators for the Customer ID text box are executed only when the user clicks the Get Incidents button, and the validator for the Incidents list box is executed only when the user clicks the Submit button.

• When the Customer Survey page is first displayed, set the focus to the customer ID text box. Then, if the user clicks the Get Incidents button and there are incidents for the specified customer, move the focus to the Incidents list box.

• To get the data that's displayed in the Incidents list box, use a SQL data source that retrieves all the rows and all the columns except the Description column from the Incidents table, sorted by the DateClosed column. Then, use a data view to filter the rows so that only the closed incidents for the specified customer are displayed. To do that, you'll need to set the RowFilter property of the data view to a compound condition where the CustomerID column is equal to the customer ID the user enters and the DateClosed column is not null.

• When populating the Incidents list box, create list items whose Text property is set to the value of the CustomerIncidentDisplay method of the incident and whose Value property is set to the incident ID. In addition, the Text property of the first item in the list box should be set as shown on the Customer Survey page, and the Value property of this item should be set to "None."

• When the survey is submitted, the application should create a Survey object and set its properties appropriately. Then, it should save a Boolean value in session state that indicates if the user requested to be contacted. The Survey Complete page can then use that value to determine the message that's displayed on the page. (Although a complete application would also perform some processing on the Survey object, this project doesn't include that processing.)

Solution Preview :

Prepared by a verified Expert
Database Management System: Create a class named incident that consists of one public
Reference No:- TGS01702154

Now Priced at $40 (50% Discount)

Recommended (92%)

Rated (4.4/5)