61
Airline Reservations System Master of Computer Application (MCA) Guru Gobind Singh Indraprastha University Guide(s): Submitted by: Ms.Simple Batra Mukesh Joshi (14) Harmeet Singh (22)

Report

  • Upload
    mukesh

  • View
    67

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Report

Airline Reservations System

Master of Computer Application (MCA)

Guru Gobind Singh Indraprastha University

Guide(s): Submitted by:

Ms.Simple Batra Mukesh Joshi (14)

Harmeet Singh (22)

Page 2: Report

Banarsidas Chandiwala Institute of Information Technology,

New Delhi - 110019Batch (2009-2012)

INDEX

S_NO. TOPIC PAGE NO.

1. LIST OF FIGURES 1

1. INTRODUCTION 1

2. SDLC MODEL 4

3. 3.1 REQUIREMENT ANALYSIS3.2 FEASIBILITY ANALYSIS 3.3 TOOLS/ENVIRONMENT USED

67

4. 4.1 ER-DIAGRAM4.2 DATA FLOW DIAGRAM4.3 DATABASE DESCRIPTION4.4 USER INTERFACE DESIGN

141619

5. CODING 25

6. TESTING 71

7. CONCLUSION 87

8. FUTURE SCOPE AND LIMITATIONS 88

9. BIBILOGRAPHY 89

Page 3: Report

LIST OF FIGURES

S No Topic Page No

1. ER-Diagram2. Waterfall Model3. Data Flow Diagram4. Forms

Page 4: Report

Title of the project: Airline Reservations System (ARS)

1. Introduction :

This project deals with Airline Reservation System which is concerned with the reservation of tickets of airways. This project provides the basic requirement to cover all the module of reservation related to each planes available in list, to confirm the tickets, to modify the data related to passenger, to cancel the tickets if passenger wants.The history of airline reservations systems began in the late 1950s when American Airlines required a system that would allow real-time access to flight details in all of its offices, and the integration and automation of its booking and ticketing processes. As a result, Sabre (Semi-Automated Business Research Environment)was developed and launched in 1964. Saber’s breakthrough was its ability to keep inventory correct in real time, accessible to agents around the world. Prior to this, manual systems required centralized reservation centers, groups of people in a room with the physical cards that represented inventory, in this case, seats on airplanes.Airline Reservation System Provides an integrated and fully customized reservation system for complete management of an airlines inventory. The online reservation system combines with the airlines web site for a complete e-commerce solution. Call

Page 5: Report

centers will now have a complete and integrated solution for offering the airline product.

ER-Diagram

Aircraft

aircrafttypeIDdescriptio

n busiclassseats

firstclassseatsecoclassseats

Daily_collection

transdate

trantype

amount

PNRno

Flights

flightnodeptime

aircrafttypyeID

arrtime

sectorID

Passenger

fname

address

status SSRPNRn

olname

traveldate

age

mealpref

flightno

class

gender

seatprefScheduled_flights

flightno firstclassseats

ecoclassseats

busiclassseats

flightdateSector

sectorIDweekday1

weekday2

busiclassfare

firstclassfareecoclassfare

description

Reservation Officer

username

password

Checks

Books

Check

Asks for reservation consists

Page 6: Report

2. Requirement Analyses

It is very important and essential after requirement elicitation. We analyze, refine and synchronize the gathered requirement in order to make consistent and unambiguous requirement. This activates review all requirements and may provide a graphical view of the system.

Here we may also interact with the customer to clarify points of conclusion and to understand which requirement are most important than others.

1.1.1 Draw the context diagram -:The context diagram is the single model that defines the boundaries and interfaces of the proposed system with the external world. It identifies the

Draw the context diagram

Develop prototype (optional)

Model the requirements

Finalize the requirements

Page 7: Report

entities outside the proposed system that interacts with the system. Example student result management system.

1.2 Develop Prototype –:One effective way to find out what customer really want is to construct a prototype something that looks a perfectly acts like the part of the system. We can use their feedback to continuously modify the prototype until the customer is satisfied. Hence, prototype helps the client to initialize the proposed system and increase the understanding to requirements. When developers and users are not curtained about some of requirements, a prototype may help both the parties to take a final decision.

1.3 Model the requirements -:This process usually consists of various graphical representations of functions, data entities, external entities and relationships between them. The graphical view may help to find incorrect, inconsistent requirements. Such model includes

Student Result

Management System

Student information entryAdministrator

Marks entry operator

Marks entry

Student performance

reports generated

Mark sheet generated

Student

information

reports generated

Student information

entry

Page 8: Report

DFD (Data Flow Diagram), ER-Diagram, Data Dictionaries, State Transition Diagram.

2. Finalize the Requirements –:After modeling of requirements we will have better understanding of system behavior. The inconsistence and ambiguous have been identified and corrected. Flow of data among different modules has been analyzed. Elicitation and analyses activates have provided better inside to the system.

Future Scope of Airline Reservation SystemThe Airline Reservation System provided by the new-generation BPO service providers help airlines acquire a better efficiency with a cost control. With the rapid growth of outsourcing, the global management horizon has widened in the last few years. Outsourcing is gaining potential and you could refer to it as strategy management that sustains global growth. Along with it there is the competitive advantage to challenge the business complexities that arise. A small enterprise or a large international enterprise looks at outsourcing as a major growth engine with a scope for sophistication and specialization. The best part is that outsourcing saves a company and not just costs.

There are a number of upcoming BPO services catering to the Hospitality and the Airlines industry. The Airline Reservation System is generally a distribution system, web based, that helps airlines take the help of ecommerce to reduce the costs of distribution. It also provides customers and travel agencies with booking interfaces. The ADS or the Airline Distribution System provides all aspects of bookings, refunds and cancellations through various sources, websites/online presence, sales offices, corporate users, call centers, travel agencies, and MIS. In other words, they provide a strong, cost effective solution by which airlines can manage their sales, fares, flight schedules, and all related inventory of services. The ADS solution helps to serve all airlines globally with a cost effective advantage.

The Airline Reservation System brings in a multitude of user friendly features which are constantly undergoing a process of development. The multitude of tasks to keep the system streamlined and up to the mark involves the smooth running of a web-based reservation engine with a graphical interface that is user friendly. The system has great capabilities of inventory management. There is the authorization process that is taken care of by a reservation supervisor, e-ticketing system, departure control system that is integrated, communication system for the passengers along with an all inclusive capability of management reporting.

The Airline Distribution System operates on certain distinctive modules. It helps define all fares, routes, schedules for travel agents and other users. The

Page 9: Report

Reservation Module helps in modifying reservations for which the reservation agents could be present at any airline office. There is also the Travel Agent Module which can be set up for travel agents and help them with reservation capabilities on the internet. The travel agents in turn can display fares at a discount to the passengers. There is a user friendly passenger module with the help of which passengers can view their bookings online, make reservations and also make special requests on service and choose their options on the web. The complete automation of the passenger boarding system is managed by the Departure Control System.

Now airlines can know their customers better than ever before. The ARS has now made decisions regarding frequent flyer programs and other passenger reward programs easier to make than ever.

Airlines can use ARS tools to gain the competitive edge by analyzing market trends and determining yield trends.

Page 10: Report

System Development Life Cycle Model (SDLC)Waterfall Model

The most familiar model is the waterfall model. This model has five phases always occur in this order and do not overlap. The developer must complete each phase before next phase begins. This model is called because looks like waterfall that is step by step performing the steps.

Requirement Analyses and Specification Phase -:

The goal of this phase is to understand the exact requirement of the customer and to document them properly. This activity is usually executed together with the customer as the goal is to document all functions, performance and interfacing requirement of the software. This phase produces a large document written in natural language, contains a description of what a system will do without describing how it will be done. The resulting document is called Software Requirement

Requirement Analysis and Specification

Design

Implementation and unit testing

Integration and system testing

Operation and

Maintenance

Page 11: Report

Specification (SRS). The SRS document may act as a contract between the developer and customer.

Design Phase -:

The SRS document is produced in the previous phase which contains the exact requirement of the customers. The goal of this phase is to transform the requirement specification into a structure that is suitable for implementation in some programming language. Here overall software architecture is defined. This work is documented and known as Software Designed Description (SDD).

Implementation and Unit Testing Phase -:

During this phase design is implemented if the SDD is complete the implementation or coding phase proceeds smoothly, because all information needed by the software developer is contained in the SDD.

Integration and System Testing Phase -:

This is a very important phase. Effective testing will contribute to the delivery of higher quality software products more satisfying users.

Operation and Maintenance Phase -:

Software maintenance is a task that every development group has to face when the software is delivered to the customer side, instead and is operational therefore released of software inaugurates the operation and maintenance. Software maintenance is very broad activity that including error correction, enhancement of capabilities, deletion of obsolete capabilities and optimization.

Page 12: Report

FEASIBILITY ANALYSES

Feasibility is the test of the system it helps in deciding whether it is viable to go through the project or not. Feasibility study studies the system & tells whether to develop the system or not. In lay mans terms it can be described as the test of the system & if the system passes in the test then it is viable to develop the project otherwise not or we can say feasibility study check’s whether project is feasible or not.

Feasibility has four solid dimensions:

1. Technology2. Finance

3. Time

4. Resources

The feasibility of the system “Airline Reservation System” is viewed with the help of these four dimensions.

Technology: This system uses one of the simplest technologies in use,

for the development purpose it uses simple to use & easily available technology. This system is based on windows like interface, which is very easy to use. The package is been developed for the department, which is not very familiar with software hence technology used, must be easily understandable, because of which windows like interface has been chosen. The technology used in this project is VB i.e. Visual Basics 6.0, M S Access & DAO controls. Visual Basic helps in providing windows like environment. This system uses menu-based approach in which everything is given with the help of menus.

Finance: This dimension measures the system in respect to money or we can say funds. This dimension checks whether its viable to spend the required amount on the system or it will be a waste. There is no problem of finance in this project because it uses simple technology, which is very easy to install. This system is been developed for a standalone computer hence for this system hardware requirement is very low. For this system to be developed &

Page 13: Report

installed properly we require very easily available technologies & very basic hardware and all these requirements doesn’t cost much.

Time: This particular dimension measures the systems worth in respect to time, which is one of the most important factors to be considered. In this project time factor is very important this system is scheduled to be installed in one month’s time. This system is not very big & hence can be completed within the time period it requires approx. 30 man-days of work. Time is a crucial factor to be considered & we can say this system can be developed within the required time period.

Resources: This dimension takes into count the recourses required to develop the system. For this particular system the resources required are quite nominal which can be fulfilled, the resources required for this system are basic hardware, an operating which is compatible with VB.

With the help of all these dimension we can measure the feasibility of the system & can decide whether to go forward with the project or not. By take in count the dimension & their role in this particular system we can say this system is feasible from all these dimension point of view & it is viable to go through the project.

Page 14: Report

O level Data Flow Diagram (DFD)

Airline Reservation System

Sector

Define

about

sector of

flights

Scheduled Flights

Flight detail

Daily Collection

Informatio

n

about daily

money

transac

tion

Passenger

Maintai

n

passe

nger

inform

ation

Page 15: Report

1 st level Data Flow Diagram

Airline Reservation System

Login

User account mgtAircraft

aircraftID

Flights

aircraftIDsectorIDflight no.

Passenger

Passenger detail

flight no.

Scheduled Flights

Flights

flight nofirstclassseatsecoclassseatssecondclassseats

fnameagePNRno.mealpref

flightno.

Daily collection

aircraftIDsectorID

Page 16: Report

HARDWARE & SOFTWARE REQUIREMENTHardware Requirements:

Hardware requirement are the basic need of the system or the package, which is been developed and will be deployed upon the system, which should have these basic components or fulfill these basic hardware needs of these package.

The following hardware is recommended for the user.

Microprocessor: PIII500 MHz.

Memory: 128 MB SDRAM DIHM

Cache Memory: 512 KBL2

Upgrade ability: Processor, RAM and HDD Upgradeable

HDD: 9.1 GB Wide ultra SCSI-3 HDD

Floppy Drive: 24x CD ROM Drive (IDE)

Keyboard: 104 Keys Enhanced Keyboard

Mouse: 2 Button Scroll Mouse

Graphics: 1024x768, 256 colors

Monitor: 15” Color monitor

Software Requirements:

Software requirement are the basic software needs of the system or the package to work properly & efficiently.

Operating System: Windows-98 & upper versions

RDBMS: MS Access 97

For editing the code of the package:

Application program: Visual Basics 6.

Page 17: Report

Testing

Testing is the process of testing software products. Effective software testing will contribute to the delivery of higher quality software products, more satisfied users, lower maintenance cost, and more accurate and reliable results. However, ineffective testing will lead to opposite results, low quality products, unhappy users, and increased maintenance costs, unreliable and inaccurate results.

Acceptance Testing

This term is used when the software is devolved of a specific customer. A series of tests are conducted to enable the customer to validate the requirements. These tests are conducted by the end user or customer and may range from adhoc tests. Acceptance Test may be conducted for few weeks or months. The discovered errors will be fixed and better quality software will be delivered to the customer.

Alpha and Beta Testing

The Alpha tests are conducted at the developer site by a customer. These tests are in a controlled environment. Alpha testing may be started when formal testing process is near completion.

The Beta tests are conducted by the customers or end users at their sites. Unlike alpha test the developer is not present here. Beta testing is conducted in a real environment that cannot be controlled by the developer. Customers are expected to report failures, if any, to the company. After receiving such failures reports developers modify the code and fix the bug and prepare the product for final release.

Functional Testing

A strategy were testing is based on functionality of the program and is known as functional testing. Thus functional testing refers to testing, involves only observation of the output for certain input values. There is no attempt to analyze the code, which produces the output. We ignore the internal of the code therefore; functional testing is also referred to as Block Box Testing in which contents of the bock box are not known. Functionality of the block box is understood completely in terms of inputs and outputs.

Page 18: Report

Test Screens

Page 19: Report

Option Explicit

Private Sub Form_KeyPress(KeyAscii As Integer) Unload MeEnd Sub

Private Sub Frame1_Click() Unload MeEnd Sub

Private Sub Timer1_Timer() frmLogin.Show Unload MeEnd Sub

Page 20: Report

Login Form

Page 21: Report

Option ExplicitDim rst As ADODB.RecordsetPublic LoginSucceeded As Boolean

Private Sub cmdCancel_Click() LoginSucceeded = False End Me.HideEnd Sub

Private Sub cmdOK_Click() Dim fl As Boolean fl = False Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select * from user where username='" & Combo1.Text & "' and password='" & txtPassword.Text & "'", Module1.con If Not rst.BOF Then Do While Not rst.EOF If txtPassword = rst("password") Then fl = True Form1.Show rst.Close Unload Me Exit Do LoginSucceeded = True End If rst.MoveNext Loop End If If fl = False Then MsgBox "Invalid Password, try again!", , "Login" txtPassword.SetFocus txtPassword.Text = "" rst.Close End IfEnd Sub

Private Sub Form_Load() Module1.connect Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic

Page 22: Report

.CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select username from user", Module1.con Combo1.Clear Do While Not rst.EOF Combo1.AddItem rst(0) rst.MoveNext Loop rst.Close Combo1.ListIndex = 0End Sub

Page 23: Report

Main Form

Page 24: Report

Dim rs As ADODB.RecordsetDim rst0 As ADODB.RecordsetDim rst1 As ADODB.RecordsetDim rst2 As ADODB.RecordsetDim rst As ADODB.RecordsetDim com As ADODB.CommandDim ans As Integer

Private Sub add_air_Click() add_air.Enabled = False delete_aircraft.Enabled = False fst_aircraft.Enabled = False pvs_aircraft.Enabled = False nxt_aircraft.Enabled = False lst_aircraft.Enabled = False Call addfield_check rs.AddNew display_aircraft.Enabled = TrueEnd SubPrivate Sub add_flights_Click() add_flights.Enabled = False delete_flights.Enabled = False fst_flights.Enabled = False pvs_flights.Enabled = False nxt_flights.Enabled = False lst_flights.Enabled = FalseDim temp As String Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select max(cint(right(flightno,len(flightno)-1))) from flights", Module1.con If Not rst.BOF And Not rst.EOF Then temp = rst(0) Else temp = 0 End If rst.Close Call addfield_check Text13.Text = "F" & CInt(temp) + 1 rs.AddNew Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With

Page 25: Report

rst.Open "select AIRCRAFTTYPEID from aircraft", Module1.con Combo1.Clear Do While Not rst.EOF Combo1.AddItem rst(0) rst.MoveNext Loop Combo1.ListIndex = 0 Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select sectorID from sector", Module1.con Combo2.Clear Do While Not rst.EOF Combo2.AddItem rst(0) rst.MoveNext Loop Combo2.ListIndex = 0 add_flights.Enabled = False display_flights.Enabled = TrueEnd Sub

Private Sub add_passenger_Click() add_passenger.Enabled = False delete_passenger.Enabled = False Command1.Enabled = False Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Command5.Enabled = FalseDim temp As String Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select max(cint(right(pnrno,len(pnrno)-3))) from passenger", Module1.con If Not rst.BOF And Not rs.EOF Then temp = rst(0) Else temp = 0 End If rst.Close Call addfield_check Text23.Text = "PNR" & CInt(temp) + 1 rs.AddNew rst.Open "select flightno from scheduled_flights", Module1.con Combo4.Clear

Page 26: Report

If Not rst.BOF Then Do While Not rst.EOF Combo4.AddItem rst(0) rst.MoveNext Loop rst.Close Combo4.ListIndex = 0 Else MsgBox "no flights " rst.Close End If add_passenger.Enabled = False display_passenger.Enabled = TrueEnd Sub

Private Sub add_schedule_Click() add_schedule.Enabled = False delete_schedule.Enabled = False fst_schedule.Enabled = False pvs_schedule.Enabled = False nxt_schedule.Enabled = False lst_schedule.Enabled = False Call addfield_check rs.AddNew Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select flightno from flights", Module1.con Combo3.Clear Do While Not rst.EOF Combo3.AddItem rst(0) rst.MoveNext Loop Combo3.ListIndex = 0 add_schedule.Enabled = False display_schedule.Enabled = TrueEnd Sub

Private Sub add_sec_Click() del_sec.Enabled = False fst_sector.Enabled = False pvs_sector.Enabled = False nxt_sector.Enabled = False lst_sector.Enabled = FalseDim temp As String Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic

Page 27: Report

.CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select max(cint(right(sectorID,len(sectorID)-1))) from sector", Module1.con If Not rst.BOF And Not rst.EOF Then temp = rst(0) Else temp = 0 End If rst.Close Call addfield_check Text1.Text = "S" & CInt(temp) + 1 rs.AddNew add_sec.Enabled = False sav_sec.Enabled = TrueEnd Sub

Private Sub Combo4_Click() Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select flightdate from scheduled_flights where flightdate>date()and flightno='" & Combo4.Text & "'", Module1.con Combo13.Clear If Not rst.BOF Then Do While Not rst.EOF Combo13.AddItem rst(0) rst.MoveNext Loop rst.Close Else MsgBox "No Flight SCHEDULED" rst.Close End IfEnd Sub

Private Sub Combo6_Click() Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select s.weekday1,s.weekday2,s.firstclassfare,s.busiclassfare,s.ecoclassfare,f.flightno,f.deptime,f.arrtime,sf.flightdate,sf.firstclassseatsavail,sf.busiclassseatsavail,sf.ecoclassseatsavail,a.description from sector s,flights f,scheduled_flights sf,aircraft a where s.description='" & Combo6.Text & "' And s.sectorID = f.sectorID And f.flightno = sf.flightno", Module1.con

Page 28: Report

If Not rst.BOF Then Text16.Text = rst(5) Text18.Text = rst(0) Text24.Text = rst(1) Text35.Text = rst(2) Text42.Text = rst(3) Text43.Text = rst(4) Text44.Text = rst(6) Text45.Text = rst(7) Text17.Text = rst(12) Text46.Text = rst(9) Text47.Text = rst(10) Text48.Text = rst(11) Text29.Text = rst(8) Else MsgBox "RECORD NOT AVAILABLE", vbOKOnly If vbOK Then Text16.Text = " " Text18.Text = " " Text24.Text = " " Text35.Text = " " Text42.Text = " " Text43.Text = " " Text44.Text = " " Text45.Text = " " Text17.Text = " " Text46.Text = " " Text47.Text = " " Text48.Text = " " Text29.Text = " " End If End If rst.CloseEnd Sub

Private Sub Combo8_Click() Dim i As Integer Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With If Combo8.Text = "First Class" Then rst.Open "select a.firstclassseats from flights f,aircraft a where f.flightno='" & Combo4.Text & "' and f.aircrafttypeID=a.aircrafttypeID", Module1.con i = rst(0) rst.Close ElseIf Combo8.Text = "Business Class" Then rst.Open "select a.busiclassseats from flights f,aircraft a where f.flightno='" & Combo4.Text & "' and f.aircrafttypeID=a.aircrafttypeID", Module1.con

Page 29: Report

i = rst(0) rst.Close ElseIf Combo8.Text = "Economy Class" Then rst.Open "select a.ecoclassseats from flights f,aircraft a where f.flightno='" & Combo4.Text & "' and f.aircrafttypeID=a.aircrafttypeID", Module1.con i = rst(0) rst.Close End If rst.Open "select count(*) from passenger where flightno ='" & Combo4.Text & "' and traveldate='" & Combo13.Text & "' and class = '" & Combo8.Text & "'", Module1.con If Not rst.BOF Then If rst(0) < i Then Text30.Text = "Confirmed" Else Text30.Text = "Waiting" End If End If rst.CloseEnd Sub

Private Sub Command1_Click() Call Module1.fst(rs)End Sub

Private Sub Command2_Click() Call Module1.pvs(rs)End Sub

Private Sub Command3_Click() Call Module1.nxt(rs)End Sub

Private Sub Command4_Click() Call Module1.lst(rs)End Sub

Private Sub Command5_Click()On Error GoTo e: add_passenger.Enabled = False display_passenger.Enabled = False delete_passenger.Enabled = False Command1.Enabled = False Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False rtf1.Visible = True Command6.Visible = True Dim d1 As Date, d2 As Date, d3 As String, d11 As String Dim d4 As String, d5 As String, d6 As String

Page 30: Report

Dim d7 As String, d8 As String, d9 As Date, d10 As String Dim lastpos As Long, lastset As Long Call rsini rs.Open "select f.deptime,f.arrtime,f.sectorID,s.description from flights f,sector s where f.flightno = '" & Combo4.Text & "' and f.sectorID=s.sectorID ", Module1.con If Not rs.BOF Then d1 = rs(0) 'DepTime d2 = rs(1) 'ArrTime d3 = rs(2) 'SectorID d11 = rs(3) 'Description End If rs.Close Call rstini rst.Open "select PNRno,fname,lname,class,status,traveldate,flightno from passenger where PNRno='" & Text23.Text & "'", Module1.con If Not rst.BOF Then d4 = rst(0) 'PNR d5 = rst(1) 'FNAME d6 = rst(2) 'Lname d7 = rst(3) 'Class d8 = rst(4) 'Status d9 = rst(5) 'TravelDate d10 = rst(6) 'FlightNo End If rst.Close rtf1.Text = Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(9) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & "Indian Airways" & Chr(10) & Chr(10) rtf1.Text = rtf1.Text + Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(9) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & "Passenger Ticket" & Chr(10) rtf1.Text = rtf1.Text + " ________________________________________________________ " & Chr(10) rtf1.Text = rtf1.Text + Chr(32) & "NOT TRANSFERABLE" & Chr(9) & Chr(9) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & Chr(32) & "Date of Issue : " & Date & Chr(10) rtf1.Text = rtf1.Text + Chr(32) & "Passenger Name: " & d5 rtf1.Text = rtf1.Text + Chr(32) & d6 rtf1.Text = rtf1.Text + Chr(10) & Chr(32) & "PNR No. : " & d4 rtf1.Text = rtf1.Text + Chr(10) & Chr(32) & "Traveldate : " & d9 rtf1.Text = rtf1.Text + Chr(10) & Chr(32) & "SectorID : " & d3 rtf1.Text = rtf1.Text + Chr(9) & "Description : " & d11 rtf1.Text = rtf1.Text + Chr(9) & "Flight No. : " & d10 rtf1.Text = rtf1.Text + Chr(10) & Chr(32) & Chr(9) & "Class : " & d7 rtf1.Text = rtf1.Text + Chr(9) & "STATUS : " & d8 rtf1.Text = rtf1.Text + Chr(10) & Chr(32) & "Departure Time : " & d1 rtf1.Text = rtf1.Text + Chr(9) & Chr(9) & "Arrival Time : " & d2 ' ** THESE CODES ARE FOR PRINTING THE TEXT ABOVE ** ' rtf1.SelPrint Printer.hDC rtf1.SelStart = lastpos rtf1.SelLength = lastsel

Page 31: Report

SSTab1.Tab = 0 SSTab1.Tab = 4e: If Err.Number = 482 Then MsgBox "Printer Not Installed" End IfEnd Sub

Private Sub Command6_Click() add_passenger.Enabled = True display_passenger.Enabled = True delete_passenger.Enabled = True Command1.Enabled = True Command2.Enabled = True Command3.Enabled = True Command4.Enabled = True SSTab1.Tab = 0 SSTab1.Tab = 4 rtf1.TextRTF = " " rtf1.Visible = False Command6.Visible = FalseEnd Sub

Private Sub Command8_Click() SSTab1.Tab = 4End Sub

Private Sub del_sec_Click() ans = MsgBox("Are you sure you want to DELETE the record", vbYesNo) If ans = vbYes Then rs.Delete MsgBox "DATA DELETED" rs.MoveNext If rs.EOF Then rs.MoveLast End If Call fillfield_check End IfEnd Sub

Private Sub delete_aircraft_Click() ans = MsgBox("Are you sure you want to DELETE the record", vbYesNo) If ans = vbYes Then rs.Delete MsgBox "DATA DELETED" rs.MoveNext If rs.EOF Then rs.MoveLast End If Call fillfield_check

Page 32: Report

End IfEnd Sub

Private Sub delete_flights_Click() ans = MsgBox("Are you sure you want to DELETE the record", vbYesNo) If ans = vbYes Then rs.Delete MsgBox "DATA DELETED" rs.MoveNext If rs.EOF Then rs.MoveLast End If Call fillfield_check End IfEnd Sub

Private Sub delete_passenger_Click() Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With Set com = New ADODB.Command com.ActiveConnection = con com.CommandText = "update passenger set status='" & "CANCELED" & "' where pnrno='" & Text23.Text & "' " com.Execute Dim fare As Integer If Combo8.Text = "First Class" Then rst.Open "select firstclassseatsavail from scheduled_flights where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then j = rst(0) Else j = 0 End If rst.Close j = j + 1 Dim pnrno As String Dim fl As Boolean fl = False rst.Open "select * from passenger where flightno='" & Combo4.Text & "' and status='" & "Waiting" & "' and traveldate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then pnrno = rst(0) fl = True End If rst.Close If fl Then

Page 33: Report

com.CommandText = "update passenger set status ='" & "Confirmed" & "' where pnrno='" & pnrno & "'" com.Execute End If com.CommandText = "update scheduled_flights set firstclassseatsavail = " & CInt(j) & " where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#" com.Execute rst.Open "select s.firstclassfare from flights f,sector s where f.flightno='" & Combo4.Text & "' and f.sectorid=s.sectorid", Module1.con If Not rst.BOF Then fare = rst(0) Else fare = 0 End If rst.Close ElseIf Combo8.Text = "Business Class" Then rst.Open "select busiclassseatsavail from scheduled_flights where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then j = rst(0) Else j = 0 End If rst.Close j = j + 1 rst.Open "select * from passenger where flightno='" & Combo4.Text & "' and status='" & "Waiting" & "' and traveldate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then pnrno = rst(0) fl = True End If rst.Close If fl Then com.CommandText = "update passenger set status ='" & "Confirmed" & "' where pnrno='" & pnrno & "'" com.Execute End If com.CommandText = "update scheduled_flights set busiclassseatsavail = " & CInt(j) & " where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#" com.Execute rst.Open "select s.firstclassfare from flights f,sector s where f.flightno='" & Combo4.Text & "' and f.sectorid=s.sectorid", Module1.con If Not rst.BOF Then fare = rst(0) Else fare = 0 End If rst.Close ElseIf Combo8.Text = "Economy Class" Then rst.Open "select ecoclassseatsavail from scheduled_flights where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#", Module1.con

Page 34: Report

If Not rst.BOF Then j = rst(0) Else j = 0 End If rst.Close j = j + 1 rst.Open "select * from passenger where flightno='" & Combo4.Text & "' and status='" & "Waiting" & "' and traveldate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then pnrno = rst(0) fl = True End If rst.Close If fl Then com.CommandText = "update passenger set status ='" & "Confirmed" & "' where pnrno='" & pnrno & "'" com.Execute End If com.CommandText = "update scheduled_flights set ecoclassseatsavail = " & CInt(j) & " where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#" com.Execute rst.Open "select s.firstclassfare from flights f,sector s where f.flightno='" & Combo4.Text & "' and f.sectorid=s.sectorid", Module1.con If Not rst.BOF Then fare = rst(0) Else fare = 0 End If rst.Close End If com.CommandText = "update daily_collection set trantype='" & "R" & "' where pnrno='" & Text23.Text & "'" com.Execute MsgBox "Passenger " & Text23.Text & " Status is now CANCELED " Call fillfield_checkEnd Sub

Private Sub delete_schedule_Click() ans = MsgBox("Are you sure you want to DELETE the record", vbYesNo) If ans = vbYes Then rs.Delete MsgBox "DATA DELETED" rs.MoveNext If rs.EOF Then rs.MoveLast End If Call fillfield_check End IfEnd Sub

Page 35: Report

Private Sub display_aircraft_Click()On Error GoTo e: If Text8.Text = "" Then MsgBox "Field Aircraft Type ID cannot be left blank" Exit Sub End If If Text9.Text = "" Then MsgBox "Field Description cannot be left blank" Exit Sub End If If Text10.Text = "" Then MsgBox "Field First Class Seats cannot be left blank" Exit Sub End If If Text11.Text = "" Then MsgBox "Field Business Class Seats cannot be left blank" Exit Sub End If If Text12.Text = "" Then MsgBox "Field economy Calss seats cannot be left blank" Exit Sub End If Call savefield_Click Exit Sube: If Err.Number = -2147217873 Then MsgBox "This is a Duplicate value so its not accaptable" Text8.Text = "" Text8.SetFocus End If If Err.Number = -2147352571 Then MsgBox "Only NUMERIC DATA is allowed" End If

End Sub

Private Sub display_flights_Click()On Error GoTo e: If Text14.Text = "" Then MsgBox "Field Departure time cannot be left blank" Exit Sub End If If Text15.Text = "" Then MsgBox "Field Arrival time cannot be left blank" Exit Sub End If Call savefield_Click Exit Sube: If Err.Number = -2147352571 Then MsgBox " The Time should be in MM/DD/YYYY format "

Page 36: Report

End IfEnd Sub

Private Sub display_passenger_Click() Dim i As Integer, j As Integer If Text25.Text = "" Then MsgBox "Field ADDRESS cannot be left blank" Exit Sub End If If Text26.Text = "" Then MsgBox "Field First Name cannot be left blank" Exit Sub End If If Text27.Text = "" Then MsgBox "Field Last Name cannot be left blank" Exit Sub End If If Text28.Text = "" Then MsgBox "Field Age cannot be left blank" Exit Sub End If If Combo7.Text = "" Then MsgBox "Field SEX cannot be left blank" Exit Sub End If If Combo8.Text = "" Then MsgBox "Field CLASS cannot be left blank" Exit Sub End If If Combo9.Text = "" Then MsgBox "Field SEAT PREFRENCE cannot be left blank" Exit Sub End If If Combo10.Text = "" Then MsgBox "Field MEAL PREFRENCE cannot be left blank" Exit Sub End If If Combo11.Text = "" Then MsgBox "Field SPECIAL SERVICE REQUEST cannot be left blank" Exit Sub End If Call savefield_Click Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With Set com = New ADODB.Command com.ActiveConnection = con Dim fare As Integer

Page 37: Report

If Combo8.Text = "First Class" Then rst.Open "select firstclassseatsavail from scheduled_flights where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then j = rst(0) Else j = 0 End If rst.Close j = j - 1 com.CommandText = "update scheduled_flights set firstclassseatsavail = " & CInt(j) & " where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#" com.Execute rst.Open "select s.firstclassfare from flights f,sector s where f.flightno='" & Combo4.Text & "' and f.sectorid=s.sectorid", Module1.con If Not rst.BOF Then fare = rst(0) Else fare = 0 End If rst.Close ElseIf Combo8.Text = "Business Class" Then rst.Open "select busiclassseatsavail from scheduled_flights where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then j = rst(0) Else j = 0 End If rst.Close j = j - 1 com.CommandText = "update scheduled_flights set busiclassseatsavail = " & CInt(j) & " where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#" com.Execute rst.Open "select s.busiclassfare from flights f,sector s where f.flightno='" & Combo4.Text & "' and f.sectorid=s.sectorid", Module1.con If Not rst.BOF Then fare = rst(0) Else fare = 0 End If rst.Close ElseIf Combo8.Text = "Economy Class" Then rst.Open "select ecoclassseatsavail from scheduled_flights where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#", Module1.con If Not rst.BOF Then j = rst(0) Else j = 0 End If rst.Close

Page 38: Report

j = j - 1 com.CommandText = "update scheduled_flights set ecoclassseatsavail = " & CInt(j) & " where flightno='" & Combo4.Text & "' and flightdate=" & "#" & CDate(Combo13.Text) & "#" com.Execute rst.Open "select s.ecoclassfare from flights f,sector s where f.flightno='" & Combo4.Text & "' and f.sectorid=s.sectorid", Module1.con If Not rst.BOF Then fare = rst(0) Else fare = 0 End If rst.Close End If com.CommandText = "insert into daily_collection values('" & Text23.Text & "',date(),'" & "C" & "','" & fare & "')" com.ExecuteEnd Sub

Private Sub display_schedule_Click()On Error GoTo e: If Text19.Text = "" Then MsgBox "Field Flight Date cannot be left blank" Exit Sub End If If Text20.Text = "" Then MsgBox "Field First Class Seats Available cannot be left blank" Exit Sub End If If Text21.Text = "" Then MsgBox "Field Business Class Seats Available cannot be left blank" Exit Sub End If If Text22.Text = "" Then MsgBox "Field economy Calss seats Available cannot be left blank" Exit Sub End If Call savefield_Click Exit Sube: If Err.Number = -2147352571 Then MsgBox "Only NUMERIC DATA is allowed" End IfEnd Sub

Private Sub Form_Load() Module1.connectEnd Sub

Private Sub fst_flights_Click() Call Module1.fst(rs)End Sub

Page 39: Report

Private Sub lst_flights_Click() Call Module1.lst(rs)End Sub

Private Sub nxt_flights_Click() Call Module1.nxt(rs)End Sub

Private Sub pvs_flights_Click() Call Module1.pvs(rs)End Sub

Private Sub fst_passenger_Click() Call Module1.fst(rs)End Sub

Private Sub lst_passenger_Click() Call Module1.lst(rs)End Sub

Private Sub fst_daily_Click() Call Module1.fst(rs)End Sub

Private Sub lst_daily_Click() Call Module1.lst(rs)End Sub

Private Sub nxt_daily_Click() Call Module1.nxt(rs)End Sub

Private Sub pvs_daily_Click() Call Module1.pvs(rs)End Sub

Private Sub fst_sector_Click() Call Module1.fst(rs)End Sub

Private Sub lst_sector_Click() Call Module1.lst(rs)End Sub

Private Sub nxt_sector_Click() Call Module1.nxt(rs)End Sub

Private Sub pvs_sector_Click() Call Module1.pvs(rs)

Page 40: Report

End Sub

Private Sub fst_aircraft_Click() Call Module1.fst(rs)End Sub

Private Sub lst_aircraft_Click() Call Module1.lst(rs)End Sub

Private Sub nxt_aircraft_Click() Call Module1.nxt(rs)End Sub

Private Sub pvs_aircraft_Click() Call Module1.pvs(rs)End Sub

Private Sub fst_schedule_Click() Call Module1.fst(rs)End Sub

Private Sub lst_schedule_Click() Call Module1.lst(rs)End Sub

Private Sub nxt_schedule_Click() Call Module1.nxt(rs)End Sub

Private Sub pvs_schedule_Click() Call Module1.pvs(rs)End Sub

Public Sub savefield_Click() Select Case SSTab1.Tab Case 0: If rs.EditMode = adEditAdd Then rs("sectorID") = Text1.Text rs("description") = Text2.Text rs("weekday1") = Combo12.Text rs("weekday2") = Combo14.Text rs("firstclassfare") = Text5.Text rs("busiclassfare") = Text6.Text rs("ecoclassfare") = Text7.Text Else rs("sectorID") = Text1.Text rs("description") = Text2.Text rs("weekday1") = Combo12.Text rs("weekday2") = Combo14.Text

Page 41: Report

rs("firstclassfare") = Text5.Text rs("busiclassfare") = Text6.Text rs("ecoclassfare") = Text7.Text End If rs.Update MsgBox "DATA SAVED" add_sec.Enabled = True del_sec.Enabled = True fst_sector.Enabled = True pvs_sector.Enabled = True nxt_sector.Enabled = True lst_sector.Enabled = True Case 1: If rs.EditMode = adEditAdd Then rs("aircrafttypeID") = Text8.Text rs("description") = Text9.Text rs("firstclassseats") = Text10.Text rs("busiclassseats") = Text11.Text rs("ecoclassseats") = Text12.Text Else rs("aircrafttypeID") = Text8.Text rs("description") = Text9.Text rs("firstclassseats") = Text10.Text rs("busiclassseats") = Text11.Text rs("ecoclassseats") = Text12.Text End If rs.Update MsgBox "DATA SAVED" add_air.Enabled = True delete_aircraft.Enabled = True fst_aircraft.Enabled = True pvs_aircraft.Enabled = True nxt_aircraft.Enabled = True lst_aircraft.Enabled = True Case 2: If rs.EditMode = adEditAdd Then rs("flightno") = Text13.Text rs("deptime") = Text14.Text rs("arrtime") = Text15.Text rs("aircrafttypeID") = Combo1.Text rs("sectorID") = Combo2.Text Else rs("flightno") = Text13.Text rs("deptime") = Text14.Text rs("arrtime") = Text15.Text rs("aircrafttypeID") = Combo1.Text rs("sectorID") = Combo2.Text End If rs.Update MsgBox "DATA SAVED" add_flights.Enabled = True

Page 42: Report

delete_flights.Enabled = True fst_flights.Enabled = True pvs_flights.Enabled = True nxt_flights.Enabled = True lst_flights.Enabled = True Case 3: If rs.EditMode = adEditAdd Then rs("flightno") = Combo3.Text rs("flightdate") = Text19.Text rs("firstclassseatsavail") = Text20.Text rs("busiclassseatsavail") = Text21.Text rs("ecoclassseatsavail") = Text22.Text Else rs("flightno") = Combo3.Text rs("flightdate") = Text19.Text rs("firstclassseatsavail") = Text20.Text rs("busiclassseatsavail") = Text21.Text rs("ecoclassseatsavail") = Text22.Text End If rs.Update MsgBox "DATA SAVED" add_schedule.Enabled = True delete_schedule.Enabled = True fst_schedule.Enabled = True pvs_schedule.Enabled = True nxt_schedule.Enabled = True lst_schedule.Enabled = True Case 4: If rs.EditMode = adEditAdd Then rs("pnrno") = Text23.Text rs("flightno") = Combo4.Text rs("traveldate") = Combo13.Text rs("fname") = Text26.Text rs("lname") = Text27.Text rs("age") = Text28.Text rs("address") = Text25.Text rs("gender") = Combo7.Text rs("class") = Combo8.Text rs("seatpref") = Combo9.Text rs("mealpref") = Combo10.Text rs("SSR") = Combo11.Text rs("status") = Text30.Text Else rs("pnrno") = Text23.Text rs("flightno") = Combo4.Text rs("traveldate") = Combo13.Text rs("fname") = Text26.Text rs("lname") = Text27.Text rs("age") = Text28.Text rs("address") = Text25.Text rs("gender") = Combo7.Text

Page 43: Report

rs("class") = Combo8.Text rs("seatpref") = Combo9.Text rs("mealpref") = Combo10.Text rs("SSR") = Combo11.Text rs("status") = Text30.Text End If rs.Update MsgBox "DATA SAVED" add_passenger.Enabled = True delete_passenger.Enabled = True Command1.Enabled = True Command2.Enabled = True Command3.Enabled = True Command4.Enabled = True Command5.Enabled = True End SelectEnd Sub

Private Sub rtf1_Change() rtf1.RefreshEnd Sub

Private Sub sav_sec_Click()On Error GoTo e: If Text2.Text = "" Then MsgBox "Field Description cannot be left blank" Exit Sub End If If Combo12.Text = "" Then MsgBox "Field WeekDay 1 cannot be left blank" Exit Sub End If If Combo14.Text = "" Then MsgBox "Field WeekDay 2 cannot be left blank" Exit Sub End If If Text5.Text = "" Then MsgBox "Field First Calss Fare cannot be left blank" Exit Sub End If If Text6.Text = "" Then MsgBox "Field Business Calss Fare cannot be left blank" Exit Sub End If If Text7.Text = "" Then MsgBox "Field Economy Calss Fare cannot be left blank" Exit Sub End If Call savefield_Click

Page 44: Report

e: If Err.Number = -2147352571 Then MsgBox "Only NUMERIC DATA is allowed" End IfEnd Sub

Private Sub SSTab1_gotfocus() Call rsini Select Case SSTab1.Tab Case 0 add_sec.Enabled = True rs.Open "select * from sector", Module1.con, adOpenDynamic If Not rs.BOF Then Call fillfield_check Else MsgBox "no record found" End If Case 1 add_air.Enabled = True rs.Open "select * from aircraft", Module1.con If Not rs.BOF Then Call fillfield_check Else MsgBox "no record found" End If Case 2 add_flights.Enabled = True rs.Open "select * from flights", Module1.con If Not rs.BOF Then Call fillfield_check Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select AIRCRAFTTYPEID from aircraft", Module1.con Combo1.Clear Combo1.Text = rst(0) Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select sectorID from sector", Module1.con Combo2.Clear Combo2.Text = rst(0) Else MsgBox "no record found" End If

Page 45: Report

Case 3 add_schedule.Enabled = True rs.Open "select * from scheduled_flights", Module1.con If Not rs.BOF Then Call fillfield_check Else MsgBox "no record found" End If Case 4 add_passenger.Enabled = True rs.Open "select * from passenger", Module1.con If Not rs.BOF Then Call fillfield_check Else MsgBox "no record found" End If Case 5 rs.Open "select * from daily_collection", Module1.con If Not rs.BOF Then Call fillfield_check Else MsgBox "no record found" End If Case 6 Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select description from sector", Module1.con Combo6.Clear Do While Not rst.EOF Combo6.AddItem rst(0) rst.MoveNext Loop rst.Close End SelectEnd Sub

Private Sub SSTab1_Click(previousTab As Integer) Call rsini Select Case SSTab1.Tab Case 0 add_sec.Enabled = True rs.Open "select * from sector", Module1.con, adOpenDynamic If Not rs.BOF Then add_sec.Enabled = True sav_sec.Enabled = True del_sec.Enabled = True

Page 46: Report

fst_sector.Enabled = True pvs_sector.Enabled = True nxt_sector.Enabled = True lst_sector.Enabled = True Call fillfield_check Else MsgBox "no record found" End If Case 1 add_air.Enabled = True rs.Open "select * from aircraft", Module1.con If Not rs.BOF Then add_air.Enabled = True display_aircraft.Enabled = True delete_aircraft.Enabled = True fst_aircraft.Enabled = True pvs_aircraft.Enabled = True nxt_aircraft.Enabled = True lst_aircraft.Enabled = True Call fillfield_check Else MsgBox "no record found" End If Case 2 add_flights.Enabled = True rs.Open "select * from flights", Module1.con If Not rs.BOF Then add_flights.Enabled = True display_flights.Enabled = True delete_flights.Enabled = True fst_flights.Enabled = True pvs_flights.Enabled = True nxt_flights.Enabled = True lst_flights.Enabled = True Call fillfield_check Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select AIRCRAFTTYPEID from aircraft", Module1.con Combo1.Clear Combo1.Text = rst(0) Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select sectorID from sector", Module1.con

Page 47: Report

Combo2.Clear Combo2.Text = rst(0) Else MsgBox "no record found" End If Case 3 add_schedule.Enabled = True rs.Open "select * from scheduled_flights", Module1.con If Not rs.BOF Then add_schedule.Enabled = True display_schedule.Enabled = True delete_schedule.Enabled = True fst_schedule.Enabled = True pvs_schedule.Enabled = True nxt_schedule.Enabled = True lst_schedule.Enabled = True Call fillfield_check Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select flightno from flights", Module1.con Combo3.Clear Combo3.Text = rst(0) Else MsgBox "no record found" End If Case 4 If Text30.Text = "CANCELED" Then Text30.FontItalic = True End If add_passenger.Enabled = True rs.Open "select * from passenger", Module1.con If Not rs.BOF Then add_passenger.Enabled = True display_passenger.Enabled = True delete_passenger.Enabled = True Command1.Enabled = True Command2.Enabled = True Command3.Enabled = True Command4.Enabled = True Command5.Enabled = True Call fillfield_check Else MsgBox "no record found" End If Case 5 rs.Open "select * from daily_collection", Module1.con If Not rs.BOF Then

Page 48: Report

Call fillfield_check Else MsgBox "no record found" End If Case 6 Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End With rst.Open "select description from sector", Module1.con Combo6.Clear Do While Not rst.EOF Combo6.AddItem rst(0) rst.MoveNext Loop rst.Close End SelectEnd Sub

Public Sub fillfield_check()Select Case SSTab1.Tab Case 0 Text1.Text = rs("sectorID") Text2.Text = rs("description") Combo12.Text = rs("weekday1") Combo14.Text = rs("weekday2") Text5.Text = rs("firstclassfare") Text6.Text = rs("busiclassfare") Text7.Text = rs("ecoclassfare") Case 1 Text8.Text = rs("aircrafttypeID") Text9.Text = rs("description") Text10.Text = rs("firstclassseats") Text11.Text = rs("busiclassseats") Text12.Text = rs("ecoclassseats") Case 2 Text13.Text = rs("flightno") Text14.Text = rs("deptime") Text15.Text = rs("arrtime") Combo1.Text = rs("aircrafttypeID") Combo2.Text = rs("sectorID") Case 3 Combo3.Text = rs("flightno") Text19.Text = rs("flightdate") Text20.Text = rs("firstclassseatsavail") Text21.Text = rs("busiclassseatsavail") Text22.Text = rs("ecoclassseatsavail") Case 4 Text23.Text = rs("pnrno")

Page 49: Report

Combo4.Text = rs("flightno") Combo13.Text = rs("traveldate") Text26.Text = rs("fname") Text27.Text = rs("lname") Text28.Text = rs("age") Text25.Text = rs("address") Combo7.Text = rs("gender") Combo8.Text = rs("class") Combo9.Text = rs("seatpref") Combo10.Text = rs("mealpref") Combo11.Text = rs("SSR") Text30.Text = rs("status") Case 5 Combo5.Text = rs("PNRno") Text36.Text = rs("transdate") Text37.Text = rs("trantype") Text38.Text = rs("amount") End SelectEnd Sub

Public Sub addfield_check()Select Case SSTab1.Tab Case 0 Text1.Text = "" Text2.Text = "" Combo12.Text = "" Combo14.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Case 1 Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Text = "" Case 2 Text13.Text = "" Text14.Text = "" Text15.Text = "" Combo1.Text = "" Combo2.Text = "" Case 3 Combo3.Text = "" Text19.Text = "" Text20.Text = "" Text21.Text = "" Text22.Text = "" Case 4 Text23.Text = "" Combo4.Text = ""

Page 50: Report

Combo13.Text = "" Text26.Text = "" Text27.Text = "" Text28.Text = "" Text25.Text = "" Combo7.Text = "" Combo8.Text = "" Combo9.Text = "" Combo10.Text = "" Combo11.Text = "" Text30.Text = "" End SelectEnd Sub

Public Sub rsini() Set rs = New ADODB.Recordset With rs .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End WithEnd Sub

Public Sub rstini() Set rst = New ADODB.Recordset With rst .CursorType = adOpenDynamic .CursorLocation = adUseServer .LockType = adLockOptimistic End WithEnd Sub

Page 51: Report

Bibliography

Taken Help from Books like

Software Engineering by Roger.S.Pressmen

Basics of Visual Basics 6.0Black Book

Also from Internet, from sites like -:

www.google.com

www.yahoo.com