Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Microsoft C# Professional Projects - Premier Press.pdf
Скачиваний:
177
Добавлен:
24.05.2014
Размер:
14.65 Mб
Скачать

478 Project 4 CREATING AN AIRLINE RESERVATION PORTAL

Forms for Line-of-Business Executives

Line-of-business executives use the SkyShark Airlines application to manage reservations and answer queries pertaining to flight status. The application provides four forms for line-of-business executives.These forms are described in this section.

CreateRes.aspx

Y

 

L

The CreateRes.aspx form is used to make reservations. Making flight reservations

 

F

is a three-step procedure. In the first step, the line-of-business executive enquires

about flight information from the passenger. Next, the flight information is used to find out the fare and status of the flight, and these details are communicated to the passenger. Finally, the name and e-mail address of the passenger are used to make the reservation. The controls added to the CreateRes.aspx form are sum-

marized in Table 20-9.

 

M

 

 

 

 

 

 

 

A

 

Table 20-9 Controls in the CreateRes.aspx Form

 

E

 

Control Type

 

ID

 

Properties Changed

 

T

 

 

Label

 

Label3

Text=Step 1: Specify ticket details

 

 

 

 

Font:Name=Microsoft Sans Serif

 

 

 

 

BorderStyle=Inset

TextBox

 

txtFltNo

None

ListBox

 

lstClass

Items=Executive, Business

Calendar

 

Cal1

 

BackColor=White

 

 

 

 

BorderColor=Black

 

 

 

 

BorderStyle=Double

 

 

 

 

Border=2px

 

 

 

 

DayNameFormat=FirstTwoLetter

Button

 

btnNext

BackColor=Silver

 

 

 

 

BorderColor=Blue

 

 

 

 

Font:Name=Microsoft Sans Serif

 

 

 

 

Text=Next

Team-Fly®

 

DESIGNING THE APPLICATION

Chapter 20

 

479

 

 

Table 20-9 Controls in the CreateRes.aspx Form (continued)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Control Type

ID

Properties Changed

 

 

 

 

 

 

 

 

 

 

 

 

Label

Label4

Text=Step 2: Confirm flight status

 

 

 

 

and fare with the customer

 

 

 

 

Font:Name=Microsoft Sans Serif

 

 

 

 

BorderStyle=Inset

 

 

 

 

 

TextBox(6)

txtTNo, txtFare,

TextBox controls for ticket number,

 

 

 

txtStatus, txtOrg,

fare, status, origin of flight,

 

 

 

txtDest, and txtDepTime

destination of flight, and departure

 

 

 

 

time.

 

 

 

 

 

 

 

Enabled=False

 

 

 

 

 

Label

Label5

Text=Step 3: Confirm booking

 

 

 

 

Font:Name=Microsoft Sans Serif

 

 

 

 

BorderStyle=Inset

 

 

 

 

 

TextBox

txtName

None

 

 

 

 

 

TextBox

txtEMail

None

 

 

 

 

 

Button

btnCreate

BackColor=Silver

 

 

 

 

 

 

 

BorderColor=Blue

 

 

 

 

 

Font:Name=Microsoft Sans Serif

Text=Create Reservation

Button

btnCancel

BackColor=Silver

BorderColor=Blue

Font:Name=Microsoft Sans Serif

Text=Cancel

The completed CreateRes.aspx form is shown in Figure 20-13.

480 Project 4 CREATING AN AIRLINE RESERVATION PORTAL

FIGURE 20-13 The CreateRes.aspx form

CancelRes.aspx

The CancelRes.aspx page is used to cancel reservations. The form uses the ticket number specified by the customer to cancel the reservation. Apart from the standard controls included on every page, I have included three controls in the CancelRes.aspx form.These controls are listed as follows:

txtTNo. The txtTNo control is used to accept the ticket number to be cancelled.

RequiredFieldValidator1. The RequiredFieldValidator1 control is used to ensure that the user specifies a valid value in the txtTNo field.

btnCancel. The btnCancel control is used to cancel reservations.

QueryStat.aspx

The QueryStat.aspx form is used to enquire about the status of flights and tickets. The first section of the form, which is used to find out the status of flight arrival and departure, uses the same controls that are used in Step1 of the CreateRes.aspx form.The next section, which provides information about the confirmation status of passenger tickets, is similar to the CancelRes.aspx form. The completed QueryStat.aspx form, which will help you design your form, is displayed in Figure 20-14.