Вы находитесь на странице: 1из 76

AIRLINE RESERVATION

SYSTEM (ARS)
A SEMINAR PRESENTED

BY

DICK PERE ILAYE


CS/06/076

SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE, FACULTY OF


NATURAL SCIENCE, MADONNA UNIVERSITY, ELELE CAMPUS

IN PARTIAL FULLFILMENT OF THE REQUIRMENTS FOR THE AWARD OF


BACHELOR OF SCIENCE (B.Sc) DEGREE IN COMPUTER SCIENCE

SUPERVISOR: EZEKWE, C. (MRS)

JANUARY, 2010
CERTIFICATION

This is to certify that I, DICK PERE ILAYE, CS/06/076 carried out this seminar work on the

topic “Computerized Reservation System”, in Partial Fulfillment for the award of Bachelor of

Science in Computer Science.

I did this seminar work and it has not been submitted elsewhere for the award of a Certificate,

Diploma or Degree.

____________________________ ________________________
DICK PERE ILAYE Date
(Student)

___________________________ ________________________
Mrs. EZEKWE CHINWE Date
(Supervisor)

__________________________ ________________________
Mr. ATABONG TIMOTHY A. Date
(Head of Department)
DEDICATION

This work is dedicated to God Almighty.


ACKNOWLEDGEMENTS

I thank God Almighty for his infinite love and mercy. I also sieve this opportunity to thank my
supervisor Mrs. Ezekwe C. for her immense contribution academically in approving this thesis
and also being there to correct, suggest and support my ideas throughout the period of
compilation.

Furthermore, I thank my parents Cmdr. and Mrs. Pere Dick for their contributions spiritually,
morally and financially. My entire family and friends are also not forgotten here; I appreciate all
of you. God Bless you all.
ABSTRACT

Airline Reservation Systems (ARS) used to be standalone systems. Each airline had its own

system, disconnected from other airlines or ticket agents, and usable only by a designated

number of airline employees. Travel agents in the 1970s pushed for access to the airlines'

systems. Today, air travel information is linked, stored, and retrieved by a network of Computer

Reservations Systems (CRS), accessible by multiple airlines and travel agents. The global

distribution system (GDS) makes for an even larger web of airline information, not only merging

the buying and selling of tickets for multiple airlines, but also making the systems accessible to

consumers directly. GDS portals and gateways on the Web allow consumers to purchase tickets

directly, select seats, and even book hotels and rental cars. Airline Reservation System (ARS) in

conjunction with Global Distribution System (GDS) has led to ease of airline ticketing, flight

scheduling and also provided a means for customers to access and book flights from their homes.

It has also increased the speed with which information about customers are retrieved and handled

for flight scheduling tasks.


TABLE OF CONTENTS

Page
CERTIFICATION i
DEDICATION ii
ACKNOWLEDGEMENT iii
ABSTRACT iv

CHAPTER ONE: Introduction

1.1 Introduction to the Study

1.2 Aim/Objective of the Study

1.3 Justification of the Study

1.4 Scope of the Study

1.5 Significance and Limitation of the Study

CHAPTER TWO: Literature Review

2.1 Introduction

2.2 What is ARS?

2.3 Global Distribution Systems (GDS)

2.4 History of Airline Reservation System

2.2 Definition of Terms

CHAPTER THREE: Research Methodology and Design 7

3.1 Research Methodology

3.1.1 Primary Data Collection Method

3.1.2 Secondary Data Collection Method

3.2 Systems Analysis

3.2.1 Analysis of the Existing System

3.3 Need for New System

CHAPTER FOUR: SYSTEM DESIGN

4.1 Input Design


4.2 Output Design
4.3 Database Design
4.3.1 Database
CHAPTER FIVE: SYSTEM IMPLEMENTATION AND DOCUMENTATION
5.1 Choice of Programming Language
5.2 Input Specification
5.3 Output Specification
5.4 System Requirement
5.5 System Testing

5.6 System Packaging


5.7 System Installation
5.7.2 Installation from CDROM Drive
5.8 System Documentation
CHAPTER SIX: CONCLUSION, SUMMARY AND CONCLUSION

1.1 Summary

1.2 Conclusion

1.3 Recommendation

REFERENCE

APPENDIX I
CHAPTER ONE

INTRODUCTION

1.1 BACKGROUND OF THE STUDY

It is obvious that everything that is sustainable would have to go through advancement. In

science and technology, the desire for improvement is a constant subject which triggers

advancements. This is visible in every ramification and the airline industry is not an exemption.

Airline Reservation Systems (ARS) used to be standalone systems. Each airline had its own

system, disconnected from other airlines or ticket agents, and usable only by a designated

number of airline employees. Travel agents in the 1970s pushed for access to the airlines'

systems. Today, air travel information is linked, stored, and retrieved by a network of Computer

Reservations Systems (CRS), accessible by multiple airlines and travel agents. The global

distribution system (GDS) makes for an even larger web of airline information, not only merging

buying and selling of tickets for multiple airlines, but also making the systems accessible to

onsumers directly. GDS portals and gateways on the Web allow consumers to purchase tickets

directly, select seats, and even book hotels and rental cars. (Winston, Clifford 1995)

1.2 STATEMENT OF THE PROBLEM

The outcome of this study will provide a basis for developing the appropriate approach to the

problems associated with air traveling operations in relation to Airline Reservation Systems

(ARSs).

1.3 AIMS AND OBJECTIVES OF THE STUDY

This thesis is aimed at exposing the relevance and importance of a real-time system for Airline

Reservation Systems (ARS). It is elevated towards enhancing the relationship between customers
and airline agencies through the use of ARSs, thereby easing the flight ticketing and selling

process.

1.4 SIGNIFICANCE AND LIMITATION OF THE STUDY

This research work will be beneficial to all those who make use of Airline Reservation Systems

(ARSs), flight operators, air traveling operators, travel agents and airline agencies.

In addition, it will assist all those in computer-related disciplines who may want to appreciate the

system and also those doing research on similar topic.

1.5 SCOPE OF THE STUDY

This thesis is not only restricted to Airline Reservation Systems (ARSes), but also other systems

dedicated to the optimal performance in the airline industry; airline agencies and their customers

inclusive.
CHAPTER TWO

LITERATURE REVIEW

2.1 INTRODUCTION

In the early days of American commercial aviation, passengers were relatively few, and each

airline's routes and fares were tightly regulated by the Civil Aeronautics Board. These were

published in a volume entitled The Official Airline Guide, from which travel agents or consumers

could construct an itinerary, then call or telex airline staff, which would mark the reservation on

a card and file it. This manual system is still used by relatively few travel agents who do not use

ARS. As demand for air travel increased and schedules grew more complex, this process became

impractical, hence, giving rise to the need of an automated reservation system called Airline

Reservation System (ARS). (Wikipedia, 2010)

2.2 WHAT IS ARS?

Airline Reservations System (ARS) is a computerized system used to store and retrieve

information and conduct transactions related to air travel. The systems was originally designed

and operated by airlines, but were later extended for the use of travel agencies. Major ARS

operations that book and sell tickets for multiple airlines are known as Global Distribution

Systems (GDS). Airlines have divested most of their direct holdings to dedicated GDS

companies, who make their systems accessible to consumers through Internet gateways. Modern

GDSes typically allow users to book hotel rooms and rental cars as well as airline tickets.

2.3 GLOBAL DISTRIBUTION SYSTEMS (GDS)

Global Distribution Systems (GDS) are subsystems connected to Airline Reservation Systems

(ARS) which allows users access to information on flight scheduling and reservation stored in

the Airline Reservation System (ARS) database.


2.4 HISTORY OF AIRLINE RESERVATION SYSTEM (ARS)

American Airlines was the first to establish an automated booking system in 1946. Using a

system to track information and improve efficiency was a highly appealing aim in the industry,

and drew the attention of other airlines worldwide. The system endured years of development

and alterations. Trans-Canada Airlines developed a computer-based system with remote

terminals that eventually took over operations in 1953. The same year, American Airlines

worked closely with IBM to develop an improved system, and the Airline Reservation System

(ARS) and the Semi-Automatic Business Research System (SABRE) launched thereafter in

1960. The network completed set-up in 1964, and it was recognized as the largest data

processing system in existence. Later, other airlines invested more in research and development

to launch improved systems, and through the late 1960s and early 1970s, airlines established

their own systems. United Airlines developed the Apollo Reservation System, and shortly after

allowed travel agents access. The Apollo system was the foundation for many further

developments, which spread from just US airlines to European airlines as well. The research and

development of Airline Reservation System became a significant aspect of the industry and all its

air carrier companies, and partnerships between airlines and technology gurus emerged.

(Morrison, Winston 1995)

Other airlines soon established their own systems. Delta Air Lines launched the Delta Automated

Travel Account System (DATAS) in 1968. United Airlines and Trans World Airlines followed in

1971 with the Apollo Reservation System and Programmed Airline Reservation System (PARS),

respectively. Soon, travel agents began pushing for a system that could automate their side of the

process by accessing the various ARSes directly to make reservations. Fearful this would place

too much power in the hands of agents, American Airlines executive Robert Crandall proposed

creating an industry-wide Computer Reservation System to be a central clearinghouse for U.S.

travel; other airlines demurred, citing fear of antitrust prosecution. (Wikipedia, 2010)
Airline deregulation occurred in 1978, magnifying the importance of computerized airline

reservation systems and their accessibility. During the early 1970s, as travel agents pushed for

access to reservation systems, and certain airline executives made investments for the sake of

accessing the systems of other airlines, antitrust laws came into focus. The purpose of the 1978

Airline Deregulation Act in the U.S. was to eliminate government control over commercial

aviation, and ensure competitive behavior and fair business practices in the airline industry.

Passengers could gain knowledge of market forces and new market entry in the industry.

Information on specific airlines and the industry as a whole became more widely and readily

accessible, evolving the airline reservation systems from "standalone" operations toward GDS.

(European Parliament, 2008)

Of the major types of airline reservation systems, most are linked to GDS to provide information

to travel agents, employees of other airlines, and the passengers or potential customers, directly.

The major systems include SABRE, Worldspan, Galileo, Patheo, and Abacus. American Airlines

now uses SABRE, also used by Expedia, Lastminute.com, and Travelocity. Abacus is used by

over 450 individual airlines, over 80,000 hotels, and over 25 countries in Asia. Companies like

Expedia share their system accessibility directly with consumers.Today, about six major airline

reservations systems are used by international airlines. (Winston, Clifford 1995)

2.2 DEFINITION OF TERMS

Airline Industry (Air Transport Industry): This is an area of commerce that uses aircraft to

transport people, cargo, and mail. The air transport industry encompasses flights of

common carriers (government-certified companies that offer cargo and passenger

services to the public) and general aviation (private aircraft used for recreation or

business). (Microsoft Encarta 2009, Microsoft Corporation)


Reservation: The written record or promise of an arrangement by which accommodations are

secured in advance. (WordWeb 5.1, WordNet Database)

System: This is any collection of component elements that work together to perform a

task.

NB: In computer science, System is used in a variety of contexts. A computer System is a

hardware system consisting of a microprocessor and allied chips and circuitry, plus an

input device (keyboard, mouse, disk drive), an output device (monitor, disk drive), and

any peripheral devices (printer, modem). Within this hardware system is an operating

system, often called system software, which is an essential set of programs that manage

hardware and data files and work with application programs. External to the computer,

system also refers to any collection or combination of programs, procedures, data, and

equipment utilized in processing information: an accounting system, a billing system, a

database management system. (Microsoft Encarta 2009, Microsoft Corporation)

Deregulation: The act of freeing from regulation (especially from governmental regulations).

(WordWeb 5.1, WordNet Database)

Network: In computer science network is a system used to link two or more computers.

Network users are able to share files, printers, and other resources; send electronic

messages; and run programs on other computers. (Microsoft Encarta 2009, Microsoft

Corporation)

Computerize: To control a function, process, or creation by a computer. (WordWeb 5.1,

WordNet Database)

Real-Time: Real-time system in computer means updating information at the same rate of

receiving information.
PNR: Acronym for Passenger Number, a unique number generated automatically to exclusively

identify passengers.

Fare: The amount paid by passengers as travel fee.

Flight Code: A unique number given to individual flight (airplane) to exclusively identify the

airplane.

Concession: The act of yielding. In air travel, concession refers to other special attachment, such

as baggage and any other special case (disability or preference), during conveyance of

passengers and goods.


CHAPTER THREE

RESEARCH METHODOLOGY AND SYSTEMS ANALYSIS

3.1 RESEARCH METHODOLOGY

Research methodology is the method of collection of data and information as a research tool.

There are two main methods of data collection. They are Primary and Secondary Data Collection

Methods. (Atabong, T. A., 2009)

3.1.1 Primary Data Collection Method

This includes information and data from existing documents such as journals, articles,

periodicals, etc. They are fixed and sometimes outdated or generally updated periodically at

intervals.

3.1.2 Secondary Data Collection Method

This type of data collection is more specific. It involves gathering information on the current

status of the problem in discussion. It includes oral/personal interviews, observation and use of

questionnaires to collect and gather information and data on a particular subject. The information

and data gathered are usually up-to-date and precise.

The methodologies employed in this thesis were drawn from both secondary and primary data

collection methods these involve articles and periodicals collected from Internet and observation

and personal interview. Visits were made to some air travel agencies and personal interviews

were conducted with top management staff of these agencies. Agencies visited include, Aero

Contractors, NimiAir Nigeria and TarilaTravels Nigeria Limited.


3.2 SYSTEMS ANALYSIS

Atabong, T. A. (2009) posits that, “Systems analysis is the careful evaluation of the individual

components of an existing system with the intent of finding its weaknesses or problem area with

cognizance to improve the systems performance and/or develop a new better system”.

3.2.1 Analysis of the Existing System

The existing system is a manual system. This system is very time consuming and lazy. It is also

more prone to errors and sometimes the approach to problems is unstructured. Below is a

flowchart of the existing manual system.

START

BOOKING DEPARTMENT

Reservation Flight Reservation


system?

Ticket Reservation

RESERVE TICKET RESERVE FLIGHT

TICKET RECORD FLIGHT RECORD

STOP

Fig. 3.1: Flowchart of Existing System

3.3 NEED FOR NEW SYSTEM

The need for the new system arose from evaluation of deficiencies of the existing manual

system. These maladies include:


a. Lack of Speed

b. Inaccuracy

c. Unreliability

d. Uninformative

e. No facility for reservation and cancellation from anywhere to any place

The new system is expected to address the aforementioned issues and also increase manpower in

the organization by cutting cost of implementation and maintenance – since cost of managing a

computerized system is cost-effective than managing human resources – and also encourage

advancement in technological capabilities of any agency it is implemented, hence the system is

aimed at achieving optimum speed, accuracy, reliability, informative and also make room for

ticket and flight reservation and cancellation from anywhere to any place. Flowchart of the new

system is illustrated below.


BOOKING
DEPARTMENT

Flight Reservation, RECEIVE CUSTOMER REQUEST


Booking, cancellation

AIRLINE PASSENGER LIST


CONFIRMED LIST
PASSENGER REPORTS
RESERVATION
WAITING LIST
SYSTEM

DATA STORRAGE DATA ACCESS

Ticket reservation, Passenger list, concession,


Cancellation, Request for Flight Reservation, Fare details,
enquiry
Database
Fig 3.2: Diagram of New System
CHAPTER FOUR

SYSTEM DESIGN

This chapter deals with the way data and information are analyzed and processed in design of the

Airline Reservation System. It also covers the harmonic cooperation of the input and output and

thus, encompasses the different steps involved in the development of the system and how

constituent controls are designed and implemented with reference to the design of the database.

4.1 INPUT DESIGN

Here, the various input on forms used in the development and design of the new system are

specified. The input is basically done by clicking a Command button on the form, typing into

TextBoxes or changing the value of Comboboxes. The following are the different forms’ input

design of the new system.

4.1.1 Home Form Input Design (frmHome)

ImageBox1 LabelBox1 ImageBox2 LabelBox12

Calendar

ImageBox3

Command1 Command2
(cmdFlightReservation) (cmdTicketReservation)

TextBox2

Command3 Command4
(cmdEnquiry) (cmdCancelReservation)

Command5 (cmdExit) Command6


(cmdAdmin)

Fig 4.1: Diagram of Home Form Input Design


4.1.2 Ticket Reservation Form Input Design (frmTicketReservation)
Command1
ImageBox1 TextBox1 LabelBox1

Calendar
TextBox27

TextBox28
LabelBox2 Command4

TextBox2 TextBox3 TextBox4 TextBox4

Frame4
TextBox5 ComboBox1 TextBox6
ComboBox7
ComboBox2 TextBox7 TextBox8 TextBox9
TxtBox21 TxtBox22
LabelBox3

ComboBox3 TextBox10 TextBox11 ComboBox4 TextBox12 TextBox13 TxtBox23 TxtBox24

LabelBox4 TxtBox26
TxtBox25

Frame1 Frame2 Frame3


ComboBox5 ComboBox6 TxtBox15 TxtBox16 TxtBox17 TxtBox19

Command2 Command3 TxtBox18 TxtBox20

Fig 4.2: Diagram of Ticket Reservation Form Input Design

4.1.3 Flight Reservation Form Input Design (frmFlightReservation)


Command1
ImageBox1 TextBox1 LabelBox1

TextBox27 Calendar
TextBox28
Frame4
LabelBox2 Command7

TextBox2 TextBox3 TextBox4 TextBox4

TextBox5 ComboBox1 TextBox6 Command4

Command5
LabelBox3

ComboBox3 TextBox1 TextBox1 ComboBox4 TextBox12 TextBox13 Command6

LabelBox4

Frame1 Frame2 Frame3


ComboBox5 ComboBox6 TxtBox1 TxtBox1 TxtBox17 TxtBox19

Command2 Command3

Fig 4.3: Diagram of Flight Reservation Form Input Design


4.1.4 Enquiry Form Input Design (frmEnquiry)
Command1
ImageBox1 TextBox1 LabelBox1

TextBox27 Calendar
TextBox28
Frame4
LabelBox2 Command5
Command7

TextBox2 TextBox3 TextBox4 TextBox4

TextBox5 ComboBox1 TextBox6

LabelBox3

ComboBox3 TextBox1 TextBox1 ComboBox4 TextBox12 TextBox13

LabelBox4

Frame1 Frame2 Frame3


ComboBox5 ComboBox6 TxtBox1 TxtBox1 TxtBox17 TxtBox19

Command2 Command3 Command4

Fig 4.4: Diagram of Enquiry Form Input Design

4.1.5 Cancel Reservation Form Input Design (frmCancelReservation)


Command1
ImageBox1 TextBox1 LabelBox1

TextBox27 Calendar
TextBox28
Frame4
LabelBox2 Command4

TextBox2 TextBox3 TextBox4 TextBox4

TextBox5 ComboBox1 TextBox6

LabelBox3

ComboBox3 TextBox1 TextBox1 ComboBox4 TextBox12 TextBox13

LabelBox4

Frame1 Frame2 Frame3


ComboBox5 ComboBox6 TxtBox1 TxtBox1 TxtBox17 TxtBox19

Command2 Command3

Fig 4.3: Diagram of Cancel Reservation Form Input Design


4.2 OUTPUT DESIGN

The output of the system deals with the way information/data are being retrieved from the

database. It is designed in such a way to ensure close connection and easy communication

between input forms, output forms and the database engine.

Administrator Form Input Design (frmAdmin)

LabelBox1 ImageBox2 LabelBox12

Calendar

Command1 DataGrid1
(cmdTicket)

Command2
(cmdFlight)

Command3 (cmdHome)

Fig 4.3: Diagram of Administrator Form Input Design

4.3 DATABASE DESIGN

4.3.1 Database

A database is a collection of related records. There are various types of database in use today

(Relational Database, Sequential Filing System, Random Filing system, etc.). In this thesis, the

type of database used is the Microsoft Access 2007 relational database. It is used to hold records
concerning flight schedule and reservation and ticket reservation. Below is list of the tables

designed in the database.

FIELDS DESCRIPTION DATATYPE


ID Automatic numbering of records in the table Autonumber
TicketNumber Passenger Ticket Number Number(6)
PNR Passenger Number Number(4)
PassengerName Name of Passenger Text(30)
DOBirth Date of birth of passenger Date(10)
Gender Gender of passenger Text(8)
Address Address of passenger Text(100)
Profession Profession of passenger Text(15)
Phone Mobile or telephone number of passenger Number(14)
Email Email address of passenger Text(30)
FlightName Flight name Alphanumeric(10)
FlightCode Code of flight Alphanumeric(6)
ClassName Name of flight class Text(15)
ClassCode Code of flight class Alphanumeric(8)
From Source of travel Text(20)
To Destination Text(20)
DepTiime Time of departure from source Text(12)
ArrTime Time of arrival at destination Text(12)
Fare Amount paid as flying fee Currency(9)
ConCategory Concession Category Text(15)
ConCode Concession Code Text(2)
ConClass Concession Class Text(20)
ConDiscount Concession Discount amount Number(9)
ConValidity Concession Validity period Date(15)
ConBaggage Concession Baggage allowed Number(5)
ConFare Concession Fare (Basic Fare) Alphanumeric(9)
Table 4.1: ARSystem Database (FlightReservation Table)

FIELDS DESCRIPTION DATATYPE


ID Automatic numbering of records in the table Autonumber
TicketNumber Passenger Ticket Number Number(6)
PNR Passenger Number Number(4)
PassengerName Name of Passenger Text(30)
DOBirth Date of birth of passenger Date(10)
Gender Gender of passenger Text(8)
Address Address of passenger Text(100)
Profession Profession of passenger Text(15)
Phone Mobile or telephone number of passenger Number(14)
Email Email address of passenger Text(30)
KinName Name of next of kin of passenger Alphanumeric(10)
KinPhone Mobile number of next of kin of passenger Alphanumeric(6)
FlightName Flight name Text(15)
FlightCode Code of flight Alphanumeric(8)
ClassName Name of flight class Autonumber
ClassCode Code of flight class Number(6)
SeatNo Passenger seat number Number(4)
BasicFare Basic amount paid as fee for flying Alphanumeric(9)
Table 4.1: ARSystem Database (FlightReservation Table)
CHAPTER FIVE

SYSTEM IMPLEMENTATION AND DOCUMENTATION

System implementation and documentation consist of the choice of programming language used,

the input specification, output specification, system requirement and necessary documentation

that guide’s the usage of the new system.

5.1 CHOICE OF PROGRAMMING LANGUAGE

The programming language used in the development of the system is Visual Basic, a component

of the Visual Studio 6.0 application package. This choice is due to the object-oriented

capabilities of the programming language, meaning it supports coding in module and allow

reusability of software. The programming language is also easy to use and understand, and

support dynamic declaration and well coordinated program structure.

5.2 INPUT SPECIFICATION

Input specification stresses the various medium used to enter information/data into the system.

Here the basic input devices used are the keyboard and mouse. The input as earlier emphasized is

achieved by either clicking with the mouse or typing with the keyboard.

5.3 OUTPUT SPECIFICATION

The output devices required in the implementation of the new system are the Visual Display Unit

(VDU) and printer. The VDU displays the current process and the printer is used to print out

reports or tickets.
5.2.1 SAMPLE INPUT/OUTPUT

Fig 5.1: Sample Input1

Fig 5.2: Sample Input2


Fig 5.3: Sample Output1

Fig 5.4: Sample Output2


Fig 5.5: Sample Output3

Fig 5.6: Sample Output4


5.4 SYSTEM REQUIREMENT

The system requirement given below covers the minimum system specification required to run

the new system.

a. Pentium III processor or higher

b. 1.5 Gigahertz Processor Speed or Higher

c. 256 Megabyte of memory (RAM)

d. 10 Gigabyte Hard Disk (Storage)

e. CD ROM Drive

f. Keyboard

g. Visual Display Unit

h. Mice

5.5 SYSTEM TESTING

Before any system or software is deemed correct, it must be tested for bugs and made error free.

– This system is not exceptional. Since humans are imperfect, during coding and testing, errors

were debugged. These errors range from wrong data type declaration, invalid variable names,

value range overflow, etc. After which, the program is made executable by selecting File menu

form the VB 6.0 application window menu bar, and selecting make ProjectName.exe (in this

case, make ARSystem.exe).

5.6 SYSTEM PACKAGING

In order to internationalize a new system, the system must be packaged. After making the new

system executable as mentioned above, the next step is packaging. Packaging means making the

new system compatible on different platforms/machines. Furthermore, packaging in VB 6.0

requires using another component of the Visual Studio 6.0 application called Package and
Deployment Wizard in the Visual Studio 6.0 Tools application folder which can be found on the

Start menu of any computer system. This is easily done by following commands in the packaging

tools wizard. And finally, the packaged application is saved into flash disks or written to CDs for

easy transfer from one system to another.

5.7 SYSTEM INSTALLATION

Before installing the application into any system, the system must have either a CDROM Drive

to allow installation from CD.

5.7.2 Installation from CDROM Drive

2. Insert the CD containing the application into CDROM Drive

3. Allow the CD to autorun

4. Open the folder containing the application (ARSystem folder)

5. Run the ARSystem.exe executable file

6. Follow the instructions on the installation wizard

7. Run the application from the Startup Menu after successful installation.

5.8 SYSTEM DOCUMENTATION

System documentation is a record of the processes involved in developing the new system –

from the analysis of any existing system to the design and implementation of the new system –

covering any errors encountered and how to troubleshoot the new system.
CHAPTER SIX

SUMMARY, CONCLUSION AND RECOMMENDATION

7.1 SUMMARY

This thesis proves beyond reasonable doubt, the impact of computerized airline reservation

system on the growth of the aviation industry in terms of accurate record keeping, speed in

response to ticketing/ticket reservation, efficiency in information handling and reliability and

cost effectiveness.

7.2 CONCLUSION

Airline Reservation System (ARS) has led to ease of airline ticketing, flight scheduling and also

provided a means for customers to access and book flights with ease and in time. It has also

increased the speed with which information about customers are retrieved and handled and flight

scheduling is tasked.

7.3 RECOMMENDATION

Owing to the ease and comfort of Airline Reservation Systems, local flights which are not on the

system should be encouraged to compensate the system. Secondly, the system should be made

affordable so as to encourage consumers and travel agents on patronizing the system.


REFERENCE

1. “Airline”. Retrieved on January 11, 2010 fromhttp://en.wikipedia.org/wiki/Airline.htm.


2. Atabong ,T. A. (2009): Lecture Note on Systems Analysis and Design. November, 2009.

3. “Aviation and Space”. Retrieved on December 18, 2009 from Microsoft Encarta Premium
2009 Encyclopedia.

4. C. Winston, S. Morrison(1995): "The Evolution of the Airline Industry", Brookings


Institution Press, South Dakota, Cf. p. 61-62, Computer Reservation Systems.
5. “Computerized Reservation System”. Retrieved on January 14, 2010 from
http://en.wikipedia.org/wiki/Computer_reservations_system.htm.
6. European Parliament: “More Competition in Airline Reservation System – With Protection
for Consumers,” Sept. 4, 2008. Retrieved on November 26, 2009 from
http://www.ehow.com/about_5122697_airline-reservation-systems.html.
7. ICAO, Policy and Guidance Material on the Economic Regulation of International Air
Transport, 2nd ed. – 1999, Doc. 9587. Retrieved on November 10, 2009, from
http://www.aviation.go.th/airtrans/airlaw/CRST.html.

8. M. J. Smith (2002): “The Airline Encyclopedia, 1909 – 2000”. Scarecrow Press, New York.
9. Microsoft Encarta Premium 2009.
10. P. N. Seth, S. S. Bhat (2002): “An Introduction to Travel and Tourism”, Prentice Hall,
London.
11. R. E. G. Davies (1964): “A History of the World’s Airlines”. Oxford University Press,
London.
12. R. Doganis, C. Routledge (2001): “The Airline Business in the 21st Century.” McGraw-Hill,
New York.
13. R. Doganis, C. Routledge (2002): “Flying Off Course: The Economics of International
Airlines,” 3rd Edition. McGraw-Hill, New York.

14. WordWeb 5.1 (2006): WordNet Database by Princeton University, Princeton.


APPENDIX I
'Name: frmSplash
'Description: Splash Screen for the project
'___________________________________________________________________

Private Sub Form_Load()

'call timer1 to load progressbar1


ProgressBar1.Visible = True
Call Timer1_Timer

End Sub

Private Sub Timer1_Timer()

'update progressbar1 to 100 then close form and show frmHome


ProgressBar1.Value = ProgressBar1.Value + 10
If ProgressBar1.Value = 100 Then
ProgressBar1.Visible = False
frmHome.Show
Unload Me
Exit Sub
End If
End Sub

'Name: frmHome
'Description: Welcome form of iReservation System
'_____________________________________________________________________________

Option Explicit
Dim mintTimeCheck As Integer

Private Sub cmdAdmin_Click()

'close home form and show frmAdmin


frmAdmin.Show
Unload Me
End Sub

Private Sub Form_Load()

'set default value for image controls on form


imgGreenBk.Visible = True
imgBlueBk.Visible = True
imgBlackBk.Visible = True
imgRedBk.Visible = True

imgGlobe.Left = 9900
lblMessage.Left = 10300
imgPlane.Top = -1000
imgPlane.Left = 5440
'set the calendar to present day
Calendar1.Day = Format(Now, "DD")
Calendar1.Month = Format(Now, "M")
Calendar1.Year = Format(Now, "YYYY")

'set default value in information box


lblInformation.Caption = "FLIGHT INFORMATION" & vbCrLf & vbCrLf & Label2.Caption
& vbCrLf & vbCrLf & Label3.Caption

'call the various Timer control sub


Call tmrPlane_Timer
Call tmrGlobe_Timer
Call Timer1_Timer
Call tmrIDisplay_Timer

Call frmTicketReservation.InitializeFormProperty
Call frmFlightReservation.Form_Load
End Sub

Private Sub imgCancelReservation_Click()

'close current form and show cancel reservation form


frmCancelReservation.Show
Me.Hide
End Sub

Private Sub imgEnquiry_Click()

'close current form and show enquiry form


frmEnquiry.Show
Me.Hide
End Sub

Private Sub imgFlightReserve_Click()

'close current form and show flight reservation form


frmFlightReservation.Show
Me.Hide
End Sub

Private Sub imgTicketReserve_Click()

'close current form and show ticket reservation form


frmTicketReservation.Show
Me.Hide
End Sub

Private Sub lblclose_Click()


Dim intResponse As Integer
'display close application message for confirmation
intResponse = MsgBox("Do you want to exit application?", vbYesNo + vbInformation, "EXIT
APPLICATION")
If intResponse = vbYes Then
'exit application
End
Else
'do nothing
Exit Sub
End If
End Sub

Private Sub lblMinimize_Click()

'minimize form
Me.WindowState = 1
End Sub

Private Sub lblCancelReservation_Click()

'perform similar action as imgCancelReserve click command


Call imgCancelReservation_Click
End Sub

Private Sub lblEnquiry_Click()

'perform similar action as imgEnquiry click command


Call imgEnquiry_Click
End Sub

Private Sub lblExit_Click()


Dim intResponse As Integer

'display close application message for confirmation


intResponse = MsgBox("Do you want to exit application?", vbYesNo + vbInformation, ".:Exit
Application:.")
If intResponse = vbYes Then
'exit application
End
Else
'do nothing
Exit Sub
End If
End Sub

Private Sub lblFlightReservation_Click()

'perform similar action as imgFlightReserve click command


Call imgFlightReserve_Click
End Sub
Private Sub lblTicketReservation_Click()

'perform similar action as imgTicketReserve click command


Call imgTicketReserve_Click
End Sub

Private Sub Timer1_Timer()


Dim strTime As String

'control to display time on form


strTime = Format(Now, "HH:MM:SS ampm")
lblTime.Caption = strTime

End Sub

Private Sub tmrGlobe_Timer()

'timer control to perform scrolling marquee action on form


imgGlobe.Left = imgGlobe.Left - 100
lblMessage.Left = lblMessage.Left - 100
If lblMessage.Left = -9900 Then
imgGlobe.Left = 9900
lblMessage.Left = 10300
Call tmrGlobe1_Timer
End If

End Sub

Private Sub tmrGlobe1_Timer()

'timer2 control to perform scrolling marquee action on form


imgGlobe.Left = imgGlobe.Left - 100
lblMessage.Left = lblMessage.Left - 100
If lblMessage.Left = -9900 Then
imgGlobe.Left = 9900
lblMessage.Left = 10300
Call tmrGlobe_Timer
End If
End Sub

Private Sub tmrMin_Timer()

frmHome.Height = frmHome.Height - 50
frmHome.Width = frmHome.Width - 100
If frmHome.Height <= 200 Or frmHome.Width <= 550 Then
frmHome.Height = 8145
frmHome.Width = 13305
tmrMin.Enabled = False
'Exit Sub
End If
End Sub
Private Sub tmrIDisplay_Timer()

'make lblidisplay visible and invisible to form effect on form


lblIDisp.Visible = False
tmrIDisplay.Enabled = False
tmrIDisplay2.Enabled = True
End Sub

Private Sub tmrIDisplay2_Timer()

'make lblidisplay visible and invisible to form effect on form


lblIDisp.Visible = True
tmrIDisplay2.Enabled = False
tmrIDisplay.Enabled = True
End Sub

Private Sub tmrPlane_Timer()

'tmrPlane control to perform scrolling marquee action on form for airplane image
imgPlane.Top = imgPlane.Top + 100
imgPlane.Left = imgPlane.Left + 50
If imgPlane.Top = 0 Then
imgPlane.Left = 6240
tmrPlane.Enabled = False
tmrPlane3.Enabled = False
tmrPlane4.Enabled = False
tmrPlane2.Enabled = True
mintTimeCheck = 0
Call tmrPlane2_Timer
End If
End Sub

Private Sub tmrPlane2_Timer()


Dim intTimeCheck As Integer

'tmrPlane control to perform scrolling marquee action on form for airplane image
imgPlane.Top = 0
imgPlane.Left = 6240
mintTimeCheck = mintTimeCheck + 1
If mintTimeCheck = 10 Then
tmrPlane2.Enabled = False
tmrPlane.Enabled = False
tmrPlane4.Enabled = False
tmrPlane3.Enabled = True
Call tmrPlane3_Timer
End If

End Sub

Private Sub tmrPlane3_Timer()


'tmrPlane control to perform scrolling marquee action on form for airplane image
imgPlane.Top = imgPlane.Top - 100
imgPlane.Left = imgPlane.Left + 50
If imgPlane.Top = -1500 Then
imgPlane.Left = 5440
tmrPlane3.Enabled = False
tmrPlane.Enabled = False
tmrPlane2.Enabled = False
tmrPlane4.Enabled = True
mintTimeCheck = 0
Call tmrPlane4_Timer
End If
End Sub

Private Sub tmrPlane4_Timer()

'tmrPlane control to perform scrolling marquee action on form for airplane image
imgPlane.Top = imgPlane.Top
imgPlane.Left = 5440
mintTimeCheck = mintTimeCheck + 1
If mintTimeCheck = 10 Then
tmrPlane4.Enabled = False
tmrPlane3.Enabled = False
tmrPlane2.Enabled = False
imgPlane.Top = -1500
imgPlane.Left = 5440
tmrPlane.Enabled = True
Call tmrPlane_Timer
End If

End Sub
'Name: frmTicketReservation
'Detail: This form contains all ticket reservation information and coding
'_____________________________________________________________________________

Private Sub cboCategory_Click()


Dim intFareAmt As Currency
Dim intFarePer As Currency

'set default value on concession fields automatically


'by selecting an item from the concession category
'combobox
If cboCategory.Text = "LOCOMOTOR" Then
txtCCode.Text = "5"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "50"
txtCValidity.Text = "1 Year"
txtCBaggage.Text = "20 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "STUDENT (12-25YRS)" Then
txtCCode.Text = "7"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "50"
txtCValidity.Text = "1 Year"
txtCBaggage.Text = "20 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "ARMED FORCE" Then
txtCCode.Text = "1"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "25"
txtCValidity.Text = "6 Months"
txtCBaggage.Text = "20 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "BLIND PASSENGER" Then
txtCCode.Text = "2"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "50"
txtCValidity.Text = "1 Year"
txtCBaggage.Text = "20 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "CANCER PATIENT" Then
txtCCode.Text = "3"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "25"
txtCValidity.Text = "1 Year"
txtCBaggage.Text = "20 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "DISABLED PASSENGER" Then
txtCCode.Text = "4"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "25"
txtCValidity.Text = "1 Year"
txtCBaggage.Text = "20-40 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "SENIOR CITIZEN" Then
txtCCode.Text = "6"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "25"
txtCValidity.Text = "6 Months"
txtCBaggage.Text = "30 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
ElseIf cboCategory.Text = "YOUTH FARE" Then
txtCCode.Text = "7"
txtCClass.Text = "ECONOMY"
txtCDiscount.Text = "50"
txtCValidity.Text = "6 Months"
txtCBaggage.Text = "20-40 Kg"
intFarePer = (Val(txtCDiscount.Text) / 100) * Val(txtFare.Text)
intFareAmt = (Val(txtFare.Text) - intFarePer) * 1000
txtCFare.Text = Format(intFareAmt, "#,#0.00")
End If

End Sub

Private Sub cboClassName_Click()

'set class code and fare according class name selected


If cboFlightName.Text = "IC1" Then
If cboClassName.Text = "PRESIDENTIAL" Then
txtClassCode.Text = "PSD 004"
txtFClass.Text = "PSD004"
txtFare.Text = "120,000.00"
ElseIf cboClassName.Text = "ECONOMY" Then
txtClassCode.Text = "ECO 002"
txtFClass.Text = "ECO002"
txtFare.Text = "12,000.00"
ElseIf cboClassName.Text = "BUSINESS CLASS" Then
txtClassCode.Text = "BIZ 001"
txtFClass.Text = "BIZ001"
txtFare.Text = "18,000.00"
ElseIf cboClassName.Text = "UPPER CLASS" Then
txtClassCode.Text = "UPC 005"
txtFClass.Text = "UPC005"
txtFare.Text = "24,000.00"
ElseIf cboClassName.Text = "PREMIUM CLASS" Then
txtClassCode.Text = "PMC 003"
txtFClass.Text = "PMC003"
txtFare.Text = "30,000.00"
End If

ElseIf cboFlightName.Text = "IC2" Then


If cboClassName.Text = "PRESIDENTIAL" Then
txtClassCode.Text = "PSD 004"
txtFClass.Text = "PSD004"
txtFare.Text = "185,000.00"
ElseIf cboClassName.Text = "ECONOMY" Then
txtClassCode.Text = "ECO 002"
txtFClass.Text = "ECO002"
txtFare.Text = "18,500.00"
ElseIf cboClassName.Text = "BUSINESS CLASS" Then
txtClassCode.Text = "BIZ 001"
txtFClass.Text = "BIZ001"
txtFare.Text = "28,000.00"
ElseIf cboClassName.Text = "UPPER CLASS" Then
txtClassCode.Text = "UPC 005"
txtFClass.Text = "UPC005"
txtFare.Text = "37,000.00"
ElseIf cboClassName.Text = "PREMIUM CLASS" Then
txtClassCode.Text = "PMC 003"
txtFClass.Text = "PMC003"
txtFare.Text = "46,500.00"
End If

ElseIf cboFlightName.Text = "CD1" Then


If cboClassName.Text = "PRESIDENTIAL" Then
txtClassCode.Text = "PSD 004"
txtFClass.Text = "PSD004"
txtFare.Text = "223,000.00"
ElseIf cboClassName.Text = "ECONOMY" Then
txtClassCode.Text = "ECO 002"
txtFClass.Text = "ECO002"
txtFare.Text = "23,300.00"
ElseIf cboClassName.Text = "BUSINESS CLASS" Then
txtClassCode.Text = "BIZ 001"
txtFClass.Text = "BIZ001"
txtFare.Text = "33,600.00"
ElseIf cboClassName.Text = "UPPER CLASS" Then
txtClassCode.Text = "UPC 005"
txtFClass.Text = "UPC005"
txtFare.Text = "46,900.00"
ElseIf cboClassName.Text = "PREMIUM CLASS" Then
txtClassCode.Text = "PMC 003"
txtFClass.Text = "PMC003"
txtFare.Text = "61,100.00"
End If

ElseIf cboFlightName.Text = "CD2" Then


If cboClassName.Text = "PRESIDENTIAL" Then
txtClassCode.Text = "PSD 004"
txtFClass.Text = "PSD004"
txtFare.Text = "193,000.00"
ElseIf cboClassName.Text = "ECONOMY" Then
txtClassCode.Text = "ECO 002"
txtFClass.Text = "ECO002"
txtFare.Text = "19,300.00"
ElseIf cboClassName.Text = "BUSINESS CLASS" Then
txtClassCode.Text = "BIZ 001"
txtFClass.Text = "BIZ001"
txtFare.Text = "28,800.00"
ElseIf cboClassName.Text = "UPPER CLASS" Then
txtClassCode.Text = "UPC 005"
txtFClass.Text = "UPC005"
txtFare.Text = "38,600.00"
ElseIf cboClassName.Text = "PREMIUM CLASS" Then
txtClassCode.Text = "PMC 003"
txtFClass.Text = "PMC003"
txtFare.Text = "48,000.00"
End If

ElseIf cboFlightName.Text = "CD3" Then


If cboClassName.Text = "PRESIDENTIAL" Then
txtClassCode.Text = "PSD 004"
txtFClass.Text = "PSD004"
txtFare.Text = "2,500,000.00"
End If
End If
End Sub

Private Sub cboFlightName_Click()

'set flight code and route automatically according to flight name selected
If cboFlightName.Text = "IC1" Then
txtFlightCode.Text = "871"
txtTotalSeat.Text = "89"
cboFrom.Text = "ABUJA"
cboTo.Text = "LAGOS"
txtFCode.Text = "871"
End If

If cboFlightName.Text = "IC2" Then


txtFlightCode.Text = "890"
txtTotalSeat.Text = "65"
cboFrom.Text = "PORT HARCOURT"
cboFrom.Enabled = False
cboTo.Text = "KANO"
cboTo.Enabled = False
txtFCode.Text = "890"
End If

If cboFlightName.Text = "CD1" Then


txtFlightCode.Text = "7715"
txtTotalSeat.Text = "119"
cboFrom.Text = "SOKOTO"
cboFrom.Enabled = False
cboTo.Text = "LAGOS"
cboTo.Enabled = False
txtFCode.Text = "7715"
End If

If cboFlightName.Text = "CD2" Then


txtFlightCode.Text = "7023"
txtTotalSeat.Text = "95"
cboFrom.Text = "KADUNA"
cboFrom.Enabled = False
cboTo.Text = "CALABAR"
cboTo.Enabled = False
txtFCode.Text = "7023"
End If

If cboFlightName.Text = "CD3" Then


txtFlightCode.Text = "7881"
txtTotalSeat.Text = "20"
txtFCode.Text = "7881"
txtClassCode.Text = "PSD 004"
txtFClass.Text = "PSD004"
txtFare.Text = "2,506,000.00"
cboClassName.Text = "PRESIDENTIAL"
chkConcession.Enabled = False
cboClassName.Enabled = False
cboTo.Enabled = True
cboFrom.Enabled = True
txtSeat.Enabled = False
Else
cboClassName.Enabled = True
cboTo.Enabled = False
cboFrom.Enabled = False
chkConcession.Enabled = True
txtSeat.Enabled = True
End If
End Sub

Private Sub chkConcession_Click()


'enable concession frame if value = 1
'else concession frame is disabled
If chkConcession.Value = 1 Then
fmeConcession.Enabled = True
Else
fmeConcession.Enabled = False
End If
End Sub

Private Sub cmdCancel_Click()


Dim intResponse As Integer

'display cancel confirmation message


intResponse = MsgBox("Are you sure you want to cancel reservation?" & vbCrLf & "This
will reset all fields on form!", vbCritical + vbYesNo, ".:Cancel Reservation:.")
If intResponse = vbYes Then
'call sub to initialize form property
Call InitializeFormProperty
Else
'do nothing
Exit Sub
End If
End Sub

Private Sub cmdConfirm_Click()


Dim strPassengerName As String

'refresh ticket database


'and add new blanck record to database
adoTicketReservation.Refresh
adoIC1.Refresh
adoIC2.Refresh
adoCD1.Refresh
adoCD2.Refresh
adoCD3.Refresh
adoTicketReservation.Recordset.AddNew
adoIC1.Recordset.AddNew
adoIC2.Recordset.AddNew
adoCD1.Recordset.AddNew
adoCD2.Recordset.AddNew
adoCD3.Recordset.AddNew

'concatenate passenger name and


'Update ticket reservation
strPassengerName = txtFirstName.Text & " " & txtMidName.Text & " " & txtLastName.Text

'update flight database


If cboFlightName.Text = "IC1" Then
With adoIC1.Recordset
.Fields(1).Value = strPassengerName
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = txtFlightCode.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = txtClassCode.Text
.Fields(6).Value = txtSeat.Text
.Fields(7).Value = cboFrom.Text
.Fields(8).Value = cboTo.Text
If txtCFare.Text <> "" Then
.Fields(9).Value = txtCFare.Text
Else
.Fields(9).Value = txtFare.Text
End If
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoIC1.Refresh
End If

If cboFlightName.Text = "IC2" Then


With adoIC2.Recordset
.Fields(1).Value = strPassengerName
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = txtFlightCode.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = txtClassCode.Text
.Fields(6).Value = txtSeat.Text
.Fields(7).Value = cboFrom.Text
.Fields(8).Value = cboTo.Text
If txtCFare.Text <> "" Then
.Fields(9).Value = txtCFare.Text
Else
.Fields(9).Value = txtFare.Text
End If
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoIC2.Refresh
End If

If cboFlightName.Text = "CD1" Then


With adoCD1.Recordset
.Fields(1).Value = strPassengerName
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = txtFlightCode.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = txtClassCode.Text
.Fields(6).Value = txtSeat.Text
.Fields(7).Value = cboFrom.Text
.Fields(8).Value = cboTo.Text
If txtCFare.Text <> "" Then
.Fields(9).Value = txtCFare.Text
Else
.Fields(9).Value = txtFare.Text
End If
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoCD1.Refresh
End If

If cboFlightName.Text = "CD2" Then


With adoCD2.Recordset
.Fields(1).Value = strPassengerName
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = txtFlightCode.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = txtClassCode.Text
.Fields(6).Value = txtSeat.Text
.Fields(7).Value = cboFrom.Text
.Fields(8).Value = cboTo.Text
If txtCFare.Text <> "" Then
.Fields(9).Value = txtCFare.Text
Else
.Fields(9).Value = txtFare.Text
End If
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoCD2.Refresh
End If

If cboFlightName.Text = "CD3" Then


With adoCD3.Recordset
.Fields(1).Value = strPassengerName
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = txtFlightCode.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = txtClassCode.Text
.Fields(6).Value = txtSeat.Text
.Fields(7).Value = cboFrom.Text
.Fields(8).Value = cboTo.Text
If txtCFare.Text <> "" Then
.Fields(9).Value = txtCFare.Text
Else
.Fields(9).Value = txtFare.Text
End If
.Fields(9).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoCD3.Refresh
End If
'update ticket reservation database
With adoTicketReservation.Recordset
.Fields(1).Value = txtTicketNumber.Text
.Fields(2).Value = txtPIN
.Fields(3).Value = strPassengerName
.Fields(4).Value = txtAddress.Text
.Fields(5).Value = txtDOBirth.Text
.Fields(6).Value = cboGender.Text
.Fields(7).Value = txtEmail.Text
.Fields(8).Value = cboOccupation.Text
.Fields(9).Value = txtPhone.Text
.Fields(10).Value = txtKinName.Text
.Fields(11).Value = txtKinPhone.Text
.Fields(12).Value = cboFlightName.Text
.Fields(13).Value = txtFlightCode.Text
.Fields(14).Value = cboClassName.TabIndex
.Fields(15).Value = txtClassCode.Text
.Fields(16).Value = txtSeat.Text
If txtCFare.Text <> "" Then
.Fields(17).Value = txtCFare.Text
Else
.Fields(17).Value = txtFare.Text
End If
.Update
End With

'refresh flight reservation database and


'update flight reservation database fields
With adoFlightReservation
.Refresh
.Recordset.AddNew

Dim strDepTime As String


Dim strDepDay As String
Dim strArrTime As String
Dim strArrDay As String

strDepTime = cboDHour.Text & ":" & cboDMins.Text & " " & cboDTime.Text
strDepDay = cboDepDay.Text & "/" & cboDepMonth.Text & "/" & cboDepYear.Text

strArrTime = cboAHour.Text & ":" & cboAMins.Text & " " & cboATime.Text
strArrDay = cboArrDay.Text & "/" & cboArrMonth.Text & "/" & cboArrYear.Text

.Recordset.Fields(1).Value = txtTicketNumber.Text
.Recordset.Fields(2).Value = txtPIN
.Recordset.Fields(3).Value = strPassengerName
.Recordset.Fields(4).Value = txtDOBirth.Text
.Recordset.Fields(5).Value = cboGender.Text
.Recordset.Fields(6).Value = txtAddress.Text
.Recordset.Fields(7).Value = cboOccupation.Text
.Recordset.Fields(8).Value = txtPhone.Text
.Recordset.Fields(9).Value = txtEmail.Text
.Recordset.Fields(10).Value = cboFlightName.Text
.Recordset.Fields(11).Value = txtFlightCode.Text
.Recordset.Fields(12).Value = cboClassName.Text
.Recordset.Fields(13).Value = txtClassCode.Text
.Recordset.Fields(14).Value = cboFrom.Text
.Recordset.Fields(15).Value = cboTo.Text
.Recordset.Fields(16).Value = strDepTime & " " & strDepDay
.Recordset.Fields(17).Value = strArrTime & " " & strArrDay
If txtCFare.Text <> "" Then
.Recordset.Fields(18).Value = txtCFare.Text
Else
.Recordset.Fields(18).Value = txtFare.Text
End If
'set default value of concessions
If fmeConcession.Enabled = False Then
.Recordset.Fields(19).Value = "Nil"
.Recordset.Fields(20).Value = "Nil"
.Recordset.Fields(21).Value = "Nil"
.Recordset.Fields(22).Value = "Nil"
.Recordset.Fields(23).Value = "Nil"
.Recordset.Fields(24).Value = "Nil"
.Recordset.Fields(25).Value = "Nil"
.Recordset.Fields(26).Value = "Nil"
.Recordset.Update
Else
.Recordset.Fields(19).Value = cboCategory.Text
.Recordset.Fields(20).Value = txtCCode.Text
.Recordset.Fields(21).Value = txtCClass.Text
.Recordset.Fields(22).Value = txtCDiscount.Text
.Recordset.Fields(23).Value = txtCValidity.Text
.Recordset.Fields(24).Value = txtCBaggage.Text
.Recordset.Fields(25).Value = txtCFare.Text
.Recordset.Fields(26).Value = txtSeat.Text
.Recordset.Update

End If
End With

'display ticket reservation confirmation message


MsgBox "Passenger Name: " & strPassengerName & vbCrLf & "Ticket Number: " &
txtTicketNumber.Text & _
vbCrLf & vbCrLf & "Passenger Ticket successfully reserved." & vbCrLf & "Thank you for
using iReservation System!", vbOKOnly + vbInformation, ".:Ticket Reservation:."
Exit Sub
End Sub

Public Sub Form_Load()

'set the calendar to present day


Calendar1.Day = Format(Now, "DD")
Calendar1.Month = Format(Now, "M")
Calendar1.Year = Format(Now, "YYYY")

imgGlobe.Left = 4100
imgGlobe.Top = 330
tmrGlobe.Enabled = True
lblMessage.Left = 4500
lblMessage.Top = 400

'call Timer1_Timer to display current time


Call Timer1_Timer
End Sub

Private Sub lblclose_Click()

'close the form and open home form


frmHome.Show
Me.Hide
Call InitializeFormProperty
End Sub

Private Sub Timer1_Timer()


Dim strTime As String

'set value of variable strTime to current time


'set lblTime caption property to variable strTime to enable it display current time
strTime = Format(Now, "HH:MM:SS ampm")
lblTime.Caption = strTime
End Sub

Private Sub tmrGlobe_Timer()

'move the position of imgGlobe towards to left end by 100 twips


'in an interval of 150
'if the left end of imgGlobe on the form is 150,
'transfer control to tmrGlobe1, else continue subroutine
lblMessage.ForeColor = vbRed
imgGlobe.Left = imgGlobe.Left - 100
lblMessage.Left = lblMessage.Left - 100
If lblMessage.Left = 200 Then
tmrGlobe.Enabled = False
tmrGlobe1.Enabled = True
Call tmrGlobe1_Timer
Exit Sub
End If

End Sub

Private Sub tmrGlobe1_Timer()

'move the position of imgGlobe towards the right end by 100 twips
'in an interval of 150
'if the right end of imgGlobe on the form is 3950,
'transfer control to tmrGlobe to repeat the entire process, else continue subroutine
lblMessage.ForeColor = vbBlack
imgGlobe.Left = imgGlobe.Left + 100
lblMessage.Left = lblMessage.Left + 100
If lblMessage.Left = 4500 Then
tmrGlobe1.Enabled = False
tmrGlobe.Enabled = True
Call tmrGlobe_Timer
Exit Sub
End If

End Sub

Private Sub txtFirstName_Change()


Dim intTicketNumber As Integer
Dim intIndexTNumber As Integer
Dim intNameCode1 As Integer

'automatically generate ticket numbers using ASCII random numbers


'with reference to letters of name of passenger
intNameCode1 = 0
For intIndexTNumber = 1 To Len(txtFirstName.Text)
intNameCode1 = Asc(Len(txtFirstName.Text))
intTicketNumber = (10000 * Rnd) + (intNameCode1 * 100)
txtTicketNumber.Text = Str(Val(intTicketNumber))
Next intIndexTNumber

End Sub

Private Sub txtLastName_Lostfocus()


Dim intTicketNumber As Integer
Dim intRndNumber As Integer
Dim intRndNumber2 As Integer
Dim strNameCode As String
Dim strAlpha As String

'if the last value of ticketnumber is alphabet


'then do nothing, else concatenate ticketnumber with
'random alphabet from passengers last name
If Not IsNumeric(Right(txtTicketNumber.Text, 1)) Then
Exit Sub
End If

'display a messag box if lastname field is empty


'it also uses lastname string to determine last two characters in
'ticketnumber alphanumeric field
If txtLastName.Text = "" Then
MsgBox "Please enter Last Name", vbOKOnly + vbInformation, "INVALID INPUT"
Exit Sub
Else
'automatically add two characters to the end of txtTicketNumber
'two characters are generated randomly from characters in the
'last name field
intRndNumber = (10 * Asc(Rnd)) / 10
intRndNumber = Right(Str(intRndNumber), 1)
If intRndNumber > Len(txtLastName.Text) Then
intRndNumber = intRndNumber - Len(txtLastName.Text)
Else
'do nothing
intRndNumber = intRndNumber
End If

'truncate the lastname field to get two characters


'which are used as the last two values in the ticket number field
strNameCode = Mid((txtLastName.Text), intRndNumber, 1)
strAlpha = UCase(strNameCode)
strNameCode = strNameCode & Left(txtLastName.Text, 1)
strAlpha = UCase(strNameCode)
txtTicketNumber.Text = txtTicketNumber.Text & strAlpha
End If

End Sub

Public Sub InitializeFormProperty()


Dim strTickNumber As String
Dim intIndex As Integer
Dim intIndex1 As Integer
Dim intIndex2 As Integer
Dim intIndex3 As Integer
Dim intIndex4 As Integer
Dim intIndex5 As Integer
Dim intHourIndex1 As Integer
Dim intHourIndex2 As Integer
Dim intMinIndex1 As Integer
Dim intMinIndex2 As Integer

'retain value of modula integer


mintRndNumber = mintRndNumber
mintNameCode1 = mintNameCode1

'reset values of all fields on form


txtTicketNumber.Text = ""
txtPIN.Text = ""
txtFirstName.Text = ""
txtLastName.Text = ""
txtMidName.Text = ""
txtAddress.Text = ""
txtDOBirth.Text = ""
txtEmail.Text = ""
txtPhone.Text = ""
txtKinName.Text = ""
txtKinPhone.Text = ""
txtFlightCode.Text = ""
txtClassCode.Text = ""
txtSeat.Text = ""
txtFCode.Text = ""
txtFClass.Text = ""
txtFare.Text = ""
txtCCode.Text = ""
txtCClass.Text = ""
txtCDiscount.Text = ""
txtCValidity.Text = ""
txtCBaggage.Text = ""
txtCFare.Text = ""
chkConcession.Value = 0

'initialize values for combo boxes that require default values


For intIndex = 1 To 31
cboArrDay.AddItem (intIndex)
Next intIndex

For intIndex1 = 1 To 12
cboArrMonth.AddItem (intIndex1)
Next intIndex1

For intIndex2 = 2010 To 2100


cboArrYear.AddItem (intIndex2)
Next intIndex2

For intIndex3 = 1 To 31
cboDepDay.AddItem (intIndex3)
Next intIndex3

For intIndex4 = 1 To 12
cboDepMonth.AddItem (intIndex4)
Next intIndex4

For intIndex5 = 2010 To 2100


cboDepYear.AddItem (intIndex5)
Next intIndex5

For intHourIndex1 = 1 To 12
cboDHour.AddItem (intHourIndex1)
Next intHourIndex1

For intMinIndex1 = 0 To 59
cboDMins.AddItem Format(intMinIndex1, "00")
Next intMinIndex1

cboDTime.AddItem "AM"
cboDTime.AddItem "PM"
For intHourIndex2 = 1 To 12
cboAHour.AddItem (intHourIndex2)
Next intHourIndex2

For intMinIndex2 = 0 To 59
cboAMins.AddItem Format(intMinIndex2, "00")
Next intMinIndex2

cboATime.AddItem "AM"
cboATime.AddItem "PM"

cboCategory.AddItem "STUDENT (12-25YRS)"


cboCategory.AddItem "SENIOR CITIZEN"
cboCategory.AddItem "CANCER PATIENT"
cboCategory.AddItem "BLIND PASSENGER"
cboCategory.AddItem "DISABLED PASSENGER"
cboCategory.AddItem "ARMED FORCE"
cboCategory.AddItem "YOUTH FARE"
cboCategory.AddItem "LOCOMOTOR"

cboGender.AddItem "FEMALE"
cboGender.AddItem "MALE"

cboOccupation.AddItem "CIVIL SERVANT"


cboOccupation.AddItem "STUDENT"
cboOccupation.AddItem "BUSINESS PERSON"
cboOccupation.AddItem "ENGINEER"

cboFrom.AddItem "PORT HARCOURT"


cboFrom.AddItem "OWERRI"
cboFrom.AddItem "UYO"
cboFrom.AddItem "CALABAR"
cboFrom.AddItem "ENUGU"
cboFrom.AddItem "ASABA"
cboFrom.AddItem "BENIN"
cboFrom.AddItem "LAGOS"
cboFrom.AddItem "IBADAN"
cboFrom.AddItem "JOS"
cboFrom.AddItem "ABUJA"
cboFrom.AddItem "KANO"
cboFrom.AddItem "KADUNA"
cboFrom.AddItem "SOKOTO"
cboFrom.AddItem "MAIDUGURI"

cboTo.AddItem "PORT HARCOURT"


cboTo.AddItem "OWERRI"
cboTo.AddItem "UYO"
cboTo.AddItem "CALABAR"
cboTo.AddItem "ENUGU"
cboTo.AddItem "ASABA"
cboTo.AddItem "BENIN"
cboTo.AddItem "LAGOS"
cboTo.AddItem "IBADAN"
cboTo.AddItem "JOS"
cboTo.AddItem "ABUJA"
cboTo.AddItem "KANO"
cboTo.AddItem "KADUNA"
cboTo.AddItem "SOKOTO"
cboTo.AddItem "MAIDUGURI"

cboClassName.AddItem "ECONOMY"
cboClassName.AddItem "BUSINESS CLASS"
cboClassName.AddItem "PREMIUM CLASS"
cboClassName.AddItem "UPPER CLASS"
cboClassName.AddItem "PRESIDENTIAL"

cboFlightName.AddItem "IC1"
cboFlightName.AddItem "IC2"
cboFlightName.AddItem "CD1"
cboFlightName.AddItem "CD2"
cboFlightName.AddItem "CD3"
End Sub

Private Sub txtMidName_Change()


Dim intPIN As Integer
Dim intPINCode As Integer

'automatically set value of PIN with referece to middle name of customer


If txtMidName.Text = "" Then
'do nothing
Else
intPIN = Asc(txtMidName.Text)
intPINCode = (100 * Rnd) * intPIN
txtPIN.Text = Str(intPINCode)
End If

'search ticket reservation database for existing of passenger number


'if number exist then add 1 to number else
'use number as passenger number
With adoTicketReservation
.Refresh
If .Recordset.BOF = .Recordset.EOF Then
'.Recordset.MoveFirst
Else
.Recordset.MoveFirst
End If
.Recordset.Find "PNR = '" & txtPIN.Text & "'", 0, adSearchForward
If .Recordset.EOF Then
txtPIN.Text = Val(txtPIN.Text) + 1
End If
txtPIN.Text = txtPIN.Text
End With

End Sub

Private Sub txtSeat_lostfocus()


Dim strSearchCriteria As String

'if flight name field is empty, don't search


If cboFlightName.Text = "" Then
'do nothing
Exit Sub
End If

'search in flight database for availability of seat


If cboFlightName.Text = "IC1" Then
strSearchCriteria = txtSeat.Text
adoIC1.Refresh

If adoIC1.Recordset.EOF Then
If adoIC1.Recordset.BOF Then
'do nothing
Else
adoIC1.Recordset.MoveFirst
End If
End If
adoIC1.Recordset.Find "SeatNo = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC1.Recordset.EOF Then
'do nothing
Exit Sub
Else
MsgBox "Seat Number has already been sold out!" & vbCrLf & "Please book another
seat", vbExclamation + vbOKOnly, "SEAT NOT AVAILABLE"
txtSeat.SetFocus
Exit Sub
End If
End If

If cboFlightName.Text = "IC2" Then


strSearchCriteria = txtSeat.Text
adoIC2.Refresh

If adoIC2.Recordset.BOF Then
If adoIC2.Recordset.EOF Then
'do nothing
Else
adoIC2.Recordset.MoveFirst
End If
End If
adoIC2.Recordset.Find "SeatNo = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC2.Recordset.EOF Then
'do nothing
Exit Sub
Else
MsgBox "Seat Number has already been sold out!" & vbCrLf & "Please book another
seat", vbExclamation + vbOKOnly, "SEAT NOT AVAILABLE"
txtSeat.SetFocus
Exit Sub
End If
End If

If cboFlightName.Text = "CD1" Then


strSearchCriteria = txtSeat.Text
adoCD1.Refresh

If adoCD1.Recordset.BOF Then
If adoCD1.Recordset.EOF Then
'do nothing
Else
adoCD1.Recordset.MoveFirst
End If
End If
adoCD1.Recordset.Find "SeatNo = '" & strSearchCriteria & "'", 0, adSearchForward
If adoCD1.Recordset.EOF Then
'do nothing
Exit Sub
Else
MsgBox "Seat Number has already been sold out!" & vbCrLf & "Please book another
seat", vbExclamation + vbOKOnly, "SEAT NOT AVAILABLE"
txtSeat.SetFocus
Exit Sub
End If
End If

If cboFlightName.Text = "CD2" Then


strSearchCriteria = txtSeat.Text
adoCD2.Refresh

If adoCD2.Recordset.EOF Then
If adoCD2.Recordset.BOF Then
'do nothing
Else
adoCD1.Recordset.MoveFirst
End If
End If
adoCD2.Recordset.Find "SeatNo = '" & strSearchCriteria & "'", 0, adSearchForward
If adoCD2.Recordset.EOF Then
'do nothing
Exit Sub
Else
MsgBox "Seat Number has already been sold out!" & vbCrLf & "Please book another
seat", vbExclamation + vbOKOnly, "SEAT NOT AVAILABLE"
txtSeat.SetFocus
Exit Sub
End If
End If

If cboFlightName.Text = "CD3" Then


strSearchCriteria = txtSeat.Text
adoCD3.Refresh

If adoCD3.Recordset.EOF Then
If adoCD3.Recordset.BOF Then
'do nothing
Else
adoCD3.Recordset.MoveFirst
End If
End If
adoCD3.Recordset.Find "SeatNo = '" & strSearchCriteria & "'", 0, adSearchForward
If adoCD3.Recordset.EOF Then
'do nothing
Exit Sub
Else
MsgBox "Seat Number has already been sold out!" & vbCrLf & "Please book another
seat", vbExclamation + vbOKOnly, "SEAT NOT AVAILABLE"
txtSeat.SetFocus
Exit Sub
End If
End If
End Sub
'Name: frmFlightReservation
'Description: Allows rescheduling/updating of ticket and flight reservation in database
'_____________________________________________________________________________
Private Sub cmdAdd_Click()

End Sub

Private Sub cmdCancel_Click()


Dim intResponse As Integer

'display cancel confirmation message


intResponse = MsgBox("Are you sure you want to cancel reservation?" & vbCrLf & "This
will reset all fields on form!", vbCritical + vbYesNo, ".:Cancel Reservation:.")
If intResponse = vbYes Then
'reset value on all field to null
txtTicketNumber.Text = ""
txtPIN.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
cboFlightName.Text = ""
Text9.Text = ""
cboClassName.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13(0).Text = ""
Text13(1).Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = "'"
Text18.Text = ""
Else
'do nothing
Exit Sub
End If
End Sub

Private Sub cmdSearch_Click()


Dim strSearchCriteria As String

'search flight record database for ticket number


strSearchCriteria = txtPIN.Text

'if database is empty then return empty database message


adoFlightReservation.Refresh
If adoFlightReservation.Recordset.BOF Then
If adoFlightReservation.Recordset.EOF Then
'do nothing
MsgBox "Ticket Reservation Database has no record", vbExclamation + vbOKOnly,
".:Empty Database:."
Exit Sub
End If
End If

'refresh adoflightreservation and move pointer to first record in database


'then find existence of ticket number in database
adoFlightReservation.Refresh
adoFlightReservation.Recordset.MoveFirst

adoFlightReservation.Recordset.Find "PNR ='" & strSearchCriteria & "'", 0, adSearchForward


If adoFlightReservation.Recordset.EOF Then
MsgBox "Ticket Number does not exist in database", vbInformation + vbOKOnly, "NO
RECORD"
Exit Sub
End If

txtTicketNumber.Text = adoFlightReservation.Recordset.Fields(1)
Text1.Text = adoFlightReservation.Recordset.Fields(3)
Text2.Text = adoFlightReservation.Recordset.Fields(4)
Text3.Text = adoFlightReservation.Recordset.Fields(5)
Text4.Text = adoFlightReservation.Recordset.Fields(6)
Text5.Text = adoFlightReservation.Recordset.Fields(7)
Text6.Text = adoFlightReservation.Recordset.Fields(8)
Text7.Text = adoFlightReservation.Recordset.Fields(9)
cboFlightName.Text = adoFlightReservation.Recordset.Fields(10)
Text9.Text = adoFlightReservation.Recordset.Fields(11)
cboClassName.Text = adoFlightReservation.Recordset.Fields(12)
Text11.Text = adoFlightReservation.Recordset.Fields(13)
Text12.Text = adoFlightReservation.Recordset.Fields(26)
Text13(0).Text = adoFlightReservation.Recordset.Fields(14)
Text13(1).Text = adoFlightReservation.Recordset.Fields(15)
Text14.Text = adoFlightReservation.Recordset.Fields(16)
Text15.Text = adoFlightReservation.Recordset.Fields(17)
Text16.Text = adoFlightReservation.Recordset.Fields(11)
Text17.Text = adoFlightReservation.Recordset.Fields(13)
Text18.Text = adoFlightReservation.Recordset.Fields(18)

txtTicketNumber.Visible = True
Label2.Visible = True
'make frame1 visible
Frame1.Visible = True
End Sub

Private Sub cmdUpdate_Click()


Dim strSearchCriteria As String

'update flight database


If cboFlightName.Text = "IC1" Then
strSearchCriteria = txtPIN.Text
adoIC1.Refresh
If adoIC1.Recordset.BOF Then
If adoIC1.Recordset.EOF Then
'do nothing
Else
adoIC1.Recordset.MoveFirst
End If
End If
adoIC1.Recordset.Find "PNR = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC1.Recordset.EOF Then
'do nothing
End If

With adoIC1.Recordset
.Fields(1).Value = Text1.Text
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = Text9.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = Text11.Text
.Fields(6).Value = Text12.Text
.Fields(7).Value = Text13(0).Text
.Fields(8).Value = Text13(1).Text
.Fields(9).Value = Text18.Text
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoIC1.Refresh
End If

If cboFlightName.Text = "IC2" Then


strSearchCriteria = txtPIN.Text
adoIC2.Refresh
If adoIC2.Recordset.BOF Then
If adoIC2.Recordset.EOF Then
'do nothing
Else
adoIC2.Recordset.MoveFirst
End If
End If
adoIC2.Recordset.Find "PNR = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC1.Recordset.EOF Then
'do nothing
End If

With adoIC2.Recordset
.Fields(1).Value = Text1.Text
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = Text9.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = Text11.Text
.Fields(6).Value = Text12.Text
.Fields(7).Value = Text13(0).Text
.Fields(8).Value = Text13(1).Text
.Fields(9).Value = Text18.Text
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoIC2.Refresh
End If

If cboFlightName.Text = "CD1" Then


strSearchCriteria = txtPIN.Text
adoCD1.Refresh
If adoCD1.Recordset.BOF Then
If adoCD1.Recordset.EOF Then
'do nothing
Else
adoCD1.Recordset.MoveFirst
End If
End If
adoCD1.Recordset.Find "PNR = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC1.Recordset.EOF Then
'do nothing
End If

With adoCD1.Recordset
.Fields(1).Value = Text1.Text
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = Text9.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = Text11.Text
.Fields(6).Value = Text12.Text
.Fields(7).Value = Text13(0).Text
.Fields(8).Value = Text13(1).Text
.Fields(9).Value = Text18.Text
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoCD1.Refresh
End If

If cboFlightName.Text = "CD2" Then


strSearchCriteria = txtPIN.Text
adoCD2.Refresh
If adoCD2.Recordset.BOF Then
If adoCD2.Recordset.EOF Then
'do nothing
Else
adoCD2.Recordset.MoveFirst
End If
End If
adoCD2.Recordset.Find "PNR = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC1.Recordset.EOF Then
'do nothing
End If

With adoCD2.Recordset
.Fields(1).Value = Text1.Text
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = Text9.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = Text11.Text
.Fields(6).Value = Text12.Text
.Fields(7).Value = Text13(0).Text
.Fields(8).Value = Text13(1).Text
.Fields(9).Value = Text18.Text
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoCD2.Refresh
End If

If cboFlightName.Text = "CD3" Then


strSearchCriteria = txtPIN.Text
adoCD3.Refresh
If adoCD3.Recordset.BOF Then
If adoCD3.Recordset.EOF Then
'do nothing
Else
adoCD3.Recordset.MoveFirst
End If
End If
adoCD3.Recordset.Find "PNR = '" & strSearchCriteria & "'", 0, adSearchForward
If adoIC1.Recordset.EOF Then
'do nothing
End If

With adoCD3.Recordset
.Fields(1).Value = Text1.Text
.Fields(2).Value = cboFlightName.Text
.Fields(3).Value = Text9.Text
.Fields(4).Value = cboClassName.Text
.Fields(5).Value = Text11.Text
.Fields(6).Value = Text12.Text
.Fields(7).Value = Text13(0).Text
.Fields(8).Value = Text13(1).Text
.Fields(9).Value = Text18.Text
.Fields(10).Value = Format(Now, "DD/MM/YYYY")
.Update
End With
adoCD3.Refresh
End If

'update ticket reservation database


adoTicketReservation.Refresh
If adoTicketReservation.Recordset.BOF Then
If adoTicketReservation.Recordset.EOF Then
'do nothing
Else
adoTicketReservation.Recordset.MoveFirst
End If
End If
adoTicketReservation.Recordset.Find "PNR = '" & txtPIN.Text & "'", 0, adSearchForward
If adoTicketReservation.Recordset.EOF Then
'do nothing
End If

With adoTicketReservation.Recordset
.Fields(1).Value = txtTicketNumber.Text
.Fields(2).Value = txtPIN
.Fields(3).Value = Text1.Text
.Fields(4).Value = Text4.Text
.Fields(5).Value = Text2.Text
.Fields(6).Value = Text3.Text
.Fields(7).Value = Text7.Text
.Fields(8).Value = Text5.Text
.Fields(9).Value = Text6.Text
.Fields(12).Value = cboFlightName.Text
.Fields(13).Value = Text9.Text
.Fields(14).Value = cboClassName.TabIndex
.Fields(15).Value = Text11.Text
.Fields(16).Value = Text12.Text
.Fields(18).Value = txtCFare.Text
.Update
End With

'refresh flight reservation database and


'update flight reservation database fields
With adoFlightReservation
.Recordset.Fields(1).Value = txtTicketNumber.Text
.Recordset.Fields(2).Value = txtPIN
.Recordset.Fields(3).Value = Text1.Text
.Recordset.Fields(4).Value = Text2.Text
.Recordset.Fields(5).Value = Text3.Text
.Recordset.Fields(6).Value = Text4.Text
.Recordset.Fields(7).Value = Text5.Text
.Recordset.Fields(8).Value = Text6.Text
.Recordset.Fields(9).Value = Text7.Text
.Recordset.Fields(10).Value = cboFlightName.Text
.Recordset.Fields(11).Value = Text9.Text
.Recordset.Fields(12).Value = cboClassName.Text
.Recordset.Fields(13).Value = Text11.Text
.Recordset.Fields(14).Value = Text13(0).Text
.Recordset.Fields(15).Value = Text13(1).Text
.Recordset.Fields(16).Value = Text14.Text
.Recordset.Fields(17).Value = Text15.Text
.Recordset.Fields(18).Value = Text18.Text
.Recordset.Update
End With

'display ticket reservation confirmation message


MsgBox "Passenger Name: " & strPassengerName & vbCrLf & "Ticket Number: " &
txtTicketNumber.Text & _
vbCrLf & vbCrLf & "Passenger has been successfully updated." & vbCrLf & "Thank you
for using iReservation System!", vbOKOnly + vbInformation, ".:Ticket Reservation:."
Call cmdCancel_Click

Exit Sub
End Sub

Public Sub Form_Load()

'set the calendar to present day


Calendar1.Day = Format(Now, "DD")
Calendar1.Month = Format(Now, "M")
Calendar1.Year = Format(Now, "YYYY")

'set frame1 visible to false


'enable tmrGlobe to display globe scrolling marquee and call Timer controls to display
graphics
Frame1.Visible = False
tmrGlobe.Enabled = True
lblMessage.Left = 4500
lblMessage.Top = 400
Call tmrGlobe_Timer
Call Timer1_Timer

'initialize flight name and classname comboboxes


cboClassName.AddItem "ECONOMY"
cboClassName.AddItem "BUSINESS CLASS"
cboClassName.AddItem "PREMIUM CLASS"
cboClassName.AddItem "UPPER CLASS"
cboClassName.AddItem "PRESIDENTIAL"

cboFlightName.AddItem "IC1"
cboFlightName.AddItem "IC2"
cboFlightName.AddItem "CD1"
cboFlightName.AddItem "CD2"
cboFlightName.AddItem "CD3"

'refresh database
adoFlightReservation.Refresh
adoFlightReservation.Recordset.AddNew
End Sub

Private Sub lblCancelReservation_Click()

'close current form and display cancelreservation form


frmCancelReservation.Show
Unload Me
End Sub

Private Sub lblEnquiry_Click()

'close current form and show enquiry form


frmEnquiry.Show
Unload Me
End Sub

Private Sub lblTicketReservation_Click()

'close current form and show frmTicketReservation


frmTicketReservation.Show
Unload Me
End Sub

Private Sub lblclose_Click()

'close current form


Load frmHome
frmHome.Show
Me.Hide
End Sub

Private Sub Timer1_Timer()


Dim strTime As String

'set value of variable strTime to current time


'set lblTime caption property to variable strTime to enable it display current time
strTime = Format(Now, "HH:MM:SS ampm")
lblTime.Caption = strTime
End Sub

Private Sub tmrGlobe_Timer()

'move the position of imgGlobe towards to left end by 100 twips


'in an interval of 150
'if the left end of imgGlobe on the form is 150,
'transfer control to tmrGlobe1, else continue subroutine
lblMessage.ForeColor = vbRed
imgGlobe.Left = imgGlobe.Left - 100
lblMessage.Left = lblMessage.Left - 100
If lblMessage.Left = 200 Then
tmrGlobe.Enabled = False
tmrGlobe1.Enabled = True
Call tmrGlobe1_Timer
Exit Sub
End If
End Sub

Private Sub tmrGlobe1_Timer()

'move the position of imgGlobe towards the right end by 100 twips
'in an interval of 150
'if the right end of imgGlobe on the form is 3950,
'transfer control to tmrGlobe to repeat the entire process, else continue subroutine
lblMessage.ForeColor = vbBlack
imgGlobe.Left = imgGlobe.Left + 100
lblMessage.Left = lblMessage.Left + 100
If lblMessage.Left = 4500 Then
tmrGlobe1.Enabled = False
tmrGlobe.Enabled = True
Call tmrGlobe_Timer
Exit Sub
End If
End Sub
'Name: frmEnquiry
'Description: Enables checking of existing flight and ticket reservation
'_____________________________________________________________________________

Private Sub cmdSearch_Click()


Dim strSearchCriteria As String

'initialize SearchCriteria to value of ticket number field


strSearchCriteria = txtPIN.Text

'if database is empty then return empty database message


adoSearch.Refresh
If adoSearch.Recordset.BOF Then
If adoSearch.Recordset.EOF Then
'do nothing
MsgBox "Ticket Reservation Database has no record", vbExclamation + vbOKOnly,
".:Empty Database:."
Exit Sub
End If
End If

'refresh ticketreservation database


adoSearch.Refresh
adoSearch.Recordset.MoveFirst

'search database for existence of ticket number


adoSearch.Recordset.Find "PNR ='" & strSearchCriteria & "'", 0, adSearchForward

'display no reservation message if ticketnumber does not exist in database


If adoSearch.Recordset.EOF Then
MsgBox "Ticket Number does not exist in database!" & vbCrLf & "Please Reserve Ticket
before enquiry.", vbCritical + vbOKOnly, ".:No Reservation:."
Exit Sub
End If

'if ticket number if present in database then update relevant fields in


'enquiry form fields
'(Passenger information)
txtTicketNumber.Text = adoSearch.Recordset.Fields(1).Value
Text1.Text = adoSearch.Recordset.Fields(3).Value
Text2.Text = adoSearch.Recordset.Fields(4).Value
Text3.Text = adoSearch.Recordset.Fields(5).Value
Text4.Text = adoSearch.Recordset.Fields(6).Value
Text5.Text = adoSearch.Recordset.Fields(7).Value
Text6.Text = adoSearch.Recordset.Fields(8).Value
Text7.Text = adoSearch.Recordset.Fields(9).Value
'(Passenger Flight Information)
Text8.Text = adoSearch.Recordset.Fields(10).Value
Text9.Text = adoSearch.Recordset.Fields(11).Value
Text10.Text = adoSearch.Recordset.Fields(12).Value
Text11.Text = adoSearch.Recordset.Fields(13).Value
Text12.Text = adoSearch.Recordset.Fields(26).Value
'(Route Information)
Text13(0).Text = adoSearch.Recordset.Fields(14).Value
Text13(1).Text = adoSearch.Recordset.Fields(15).Value
'(Time information)
Text14.Text = adoSearch.Recordset.Fields(16).Value
Text15.Text = adoSearch.Recordset.Fields(17).Value
'(Flight Information)
Text16.Text = adoSearch.Recordset.Fields(11).Value
Text17.Text = adoSearch.Recordset.Fields(13).Value
Text18.Text = adoSearch.Recordset.Fields(18).Value

txtTicketNumber.Visible = True
Label3.Visible = True
End Sub

Private Sub Form_Load()

Call Timer1_Timer

tmrGlobe.Enabled = True
lblMessage.Left = 5500
lblMessage.Top = 400
Call tmrGlobe_Timer
Call Timer1_Timer
End Sub

Private Sub lblCancelReservation_Click()

'display cancelreservation form


frmCancelReservation.Show
Me.Hide
End Sub

Private Sub lblclose_Click()

'set the calendar to present day


Calendar1.Day = Format(Now, "DD")
Calendar1.Month = Format(Now, "M")
Calendar1.Year = Format(Now, "YYYY")

'close current form and open home form


frmHome.Show
Unload Me
End Sub

Private Sub lblFlightReservation_Click()

'display flight reservation form


frmFlightReservation.Show
Unload Me
End Sub

Private Sub lblTicketReservation_Click()

'display ticketresrvation form


frmTicketReservation.Show
Unload Me
End Sub

Private Sub Timer1_Timer()


Dim strTime As String

'set lbltime to display current time and update every second


strTime = Format(Now, "HH:MM:SS ampm")
lblTime.Caption = strTime
End Sub

Private Sub tmrGlobe_Timer()

'move the position of imgGlobe towards to left end by 100 twips


'in an interval of 150
'if the left end of imgGlobe on the form is 150,
'transfer control to tmrGlobe1, else continue subroutine
lblMessage.ForeColor = vbRed
imgGlobe.Left = imgGlobe.Left - 100
lblMessage.Left = lblMessage.Left - 100
If lblMessage.Left = 200 Then
tmrGlobe.Enabled = False
tmrGlobe1.Enabled = True
Call tmrGlobe1_Timer
Exit Sub
End If
End Sub

Private Sub tmrGlobe1_Timer()

'move the position of imgGlobe towards the right end by 100 twips
'in an interval of 150
'if the right end of imgGlobe on the form is 3950,
'transfer control to tmrGlobe to repeat the entire process, else continue subroutine
lblMessage.ForeColor = vbBlack
imgGlobe.Left = imgGlobe.Left + 100
lblMessage.Left = lblMessage.Left + 100
If lblMessage.Left = 5500 Then
tmrGlobe1.Enabled = False
tmrGlobe.Enabled = True
Call tmrGlobe_Timer
Exit Sub
End If
End Sub
'Name: frmCancelReservation
'Description: Enables cancelation of ticket/flight reservation
'_____________________________________________________________________________

Private Sub cmdCancel_Click()


Dim intResponse As Integer

'display cancel confirmation message


intResponse = MsgBox("Are you sure you want to cancel reservation?" & vbCrLf & "This
will reset all fields on form!", vbCritical + vbYesNo, ".:Cancel Reservation:.")
If intResponse = vbYes Then
'reset value on all field to null
txtTicketNumber.Text = ""
txtPIN.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13(0).Text = ""
Text13(1).Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = "'"
Text18.Text = ""
Else
'do nothing
Exit Sub
End If
End Sub

Private Sub cmdDelete_Click()


Dim intResponse As Integer

If txtPIN.Text = "" Then


MsgBox "No Reservation to Delete", vbCritical + vbOKOnly, ".:No Reservation:."
Exit Sub
End If

'display confirm deletion message


intResponse = MsgBox("Are you sure you want to delete Reservation?", vbInformation +
vbYesNo, ".:Confirm Deletion:.")
If intResponse = vbNo Then
'If intResponse Is vbNo Then Exit Sub
Exit Sub
Else
'Else: If intResponse Is vbYes Then perform deletion
adoTicketReservation.Refresh
adoTicketReservation.Recordset.MoveFirst

adoTicketReservation.Recordset.Find "TicketNumber = '" & txtTicketNumber.Text & "'",


0, adSearchForward
adoTicketReservation.Recordset.Delete adAffectAllChapters

If Text8.Text = "IC1" Then


adoIC1.Refresh
adoIC1.Recordset.MoveFirst

adoIC1.Recordset.Find "PassengerName = '" & Text1.Text & "'", 0, adSearchForward


adoIC1.Recordset.Delete adAffectAllChapters

ElseIf Text8.Text = "IC2" Then


adoIC2.Refresh
adoIC2.Recordset.MoveFirst

adoIC2.Recordset.Find "PassengerName = '" & Text1.Text & "'", 0, adSearchForward


adoIC2.Recordset.Delete adAffectAllChapters

ElseIf Text8.Text = "CD1" Then


adoCD1.Refresh
adoCD1.Recordset.MoveFirst

adoCD1.Recordset.Find "PassengerName = '" & Text1.Text & "'", 0, adSearchForward


adoCD1.Recordset.Delete adAffectAllChapters

ElseIf Text8.Text = "CD2" Then


adoCD2.Refresh
adoCD2.Recordset.MoveFirst

adoCD2.Recordset.Find "PassengerName = '" & Text1.Text & "'", 0, adSearchForward


adoCD2.Recordset.Delete adAffectAllChapters

ElseIf Text8.Text = "CD3" Then


adoCD3.Refresh
adoCD3.Recordset.MoveFirst

adoCD3.Recordset.Find "PassengerName = '" & Text1.Text & "'", 0, adSearchForward


adoCD3.Recordset.Delete adAffectAllChapters

End If

adoSearch.Recordset.Delete adAffectAllChapters

'reset all fields on form to Null


txtTicketNumber.Text = ""
txtPIN.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13(0).Text = ""
Text13(1).Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""

'display successful deletion message and exit sub


MsgBox "Reservation has been successfully Cancelled", vbInformation + vbOKOnly,
".:Cancel Success:."
Exit Sub
End If
End Sub

Private Sub cmdSearch_Click()


Dim strSearchCriteria As String

'initialize SearchCriteria to value of ticket number field


strSearchCriteria = txtPIN.Text

'if database is empty then return empty database message


adoSearch.Refresh
If adoSearch.Recordset.BOF Then
If adoSearch.Recordset.EOF Then
'do nothing
MsgBox "Ticket Reservation Database has no record", vbExclamation + vbOKOnly,
".:Empty Database:."
Exit Sub
End If
End If

'refresh ticketreservation database


adoSearch.Refresh
adoSearch.Recordset.MoveFirst

'search database for existence of ticket number


adoSearch.Recordset.Find "PNR ='" & strSearchCriteria & "'", 0, adSearchForward

'display no reservation message if ticketnumber does not exist in database


If adoSearch.Recordset.EOF Then
MsgBox "Ticket Number does not exist in database!" & vbCrLf & "Please Reserve Ticket
before enquiry.", vbCritical + vbOKOnly, ".:No Reservation:."
Exit Sub
End If

'if ticket number if present in database then update relevant fields in


'enquiry form fields
'(Passenger information)
txtTicketNumber.Text = adoSearch.Recordset.Fields(1).Value
Text1.Text = adoSearch.Recordset.Fields(3).Value
Text2.Text = adoSearch.Recordset.Fields(4).Value
Text3.Text = adoSearch.Recordset.Fields(5).Value
Text4.Text = adoSearch.Recordset.Fields(6).Value
Text5.Text = adoSearch.Recordset.Fields(7).Value
Text6.Text = adoSearch.Recordset.Fields(8).Value
Text7.Text = adoSearch.Recordset.Fields(9).Value
'(Passenger Flight Information)
Text8.Text = adoSearch.Recordset.Fields(10).Value
Text9.Text = adoSearch.Recordset.Fields(11).Value
Text10.Text = adoSearch.Recordset.Fields(12).Value
Text11.Text = adoSearch.Recordset.Fields(13).Value
Text12.Text = adoSearch.Recordset.Fields(26).Value
'(Route Information)
Text13(0).Text = adoSearch.Recordset.Fields(14).Value
Text13(1).Text = adoSearch.Recordset.Fields(15).Value
'(Time information)
Text14.Text = adoSearch.Recordset.Fields(16).Value
Text15.Text = adoSearch.Recordset.Fields(17).Value
'(Flight Information)
Text16.Text = adoSearch.Recordset.Fields(11).Value
Text17.Text = adoSearch.Recordset.Fields(13).Value
Text18.Text = adoSearch.Recordset.Fields(18).Value

txtTicketNumber.Visible = True
Label3.Visible = True

'set frame1 to be visible


Frame1.Visible = True
End Sub

Private Sub Form_Load()

'set the calendar to present day


Calendar1.Day = Format(Now, "DD")
Calendar1.Month = Format(Now, "M")
Calendar1.Year = Format(Now, "YYYY")
'make frame1 invisible and call Timer1_Timer to display current time
Frame1.Visible = False
Call Timer1_Timer
End Sub

Private Sub lblclose_Click()

'close current form and open home form


frmHome.Show
Unload Me
End Sub

Private Sub Timer1_Timer()


Dim strTime As String

'set value of variable strTime to current time


'set lblTime caption property to variable strTime to enable it display current time
strTime = Format(Now, "HH:MM:SS ampm")
lblTime.Caption = strTime
End Sub
‘Name: frmAdmin
‘Description: Administrative tool form
‘__________________________________________________________________________

Private Sub cmdCD1_Click()

'set view to flight CD1 database


dgFlight.Visible = False
dgTicket.Visible = False
dgIC1.Visible = False
dgIC2.Visible = False
dgCD1.Visible = True
dgCD2.Visible = False
dgCD3.Visible = False
End Sub

Private Sub cmdCD2_Click()

'set view to flight CD2 database


dgFlight.Visible = False
dgTicket.Visible = False
dgIC1.Visible = False
dgIC2.Visible = False
dgCD1.Visible = False
dgCD2.Visible = True
dgCD3.Visible = False
End Sub

Private Sub cmdCD3_Click()

'set view to flight CD3 database


dgFlight.Visible = False
dgTicket.Visible = False
dgIC1.Visible = False
dgIC2.Visible = False
dgCD1.Visible = False
dgCD2.Visible = False
dgCD3.Visible = True
End Sub

Private Sub cmdFlight_Click()

'set view to flight Reservation database


dgFlight.Visible = True
dgTicket.Visible = False
dgIC1.Visible = False
dgIC2.Visible = False
dgCD1.Visible = False
dgCD2.Visible = False
dgCD3.Visible = False
End Sub
Private Sub cmdHome_Click()

'close current form and open Home form


frmHome.Show
Unload Me
End Sub

Private Sub cmdIC1_Click()

'set view to flight IC1 database


dgFlight.Visible = False
dgTicket.Visible = False
dgIC1.Visible = True
dgIC2.Visible = False
dgCD1.Visible = False
dgCD2.Visible = False
dgCD3.Visible = False
End Sub

Private Sub cmdIC2_Click()

'set view to flight IC2 database


dgFlight.Visible = False
dgTicket.Visible = False
dgIC1.Visible = False
dgIC2.Visible = True
dgCD1.Visible = False
dgCD2.Visible = False
dgCD3.Visible = False
End Sub

Private Sub cmdTicket_Click()

'set view to Ticket Reservation database


dgFlight.Visible = False
dgTicket.Visible = True
dgIC1.Visible = False
dgIC2.Visible = False
dgCD1.Visible = False
dgCD2.Visible = False
dgCD3.Visible = False
End Sub

Private Sub Form_Load()

'set default database view


dgFlight.Visible = True
dgTicket.Visible = False
dgIC1.Visible = False
dgIC2.Visible = False
dgCD1.Visible = False
dgCD2.Visible = False
dgCD3.Visible = False
End Sub

Вам также может понравиться