Railway Ticket Booking BCA Pro

264

description

BCA Project

Transcript of Railway Ticket Booking BCA Pro

A

ON

Submitted in partial fulfillment of the requirement for the award of Degree ofBACHELOR OF COMPUTER APPLICATION (BCA)

SUBMITTED TODepartment of Computer Science

SUBMITTED TO SUBMITTED BYMR. PRAMOD SHARMASAKSHI TAYAL SAURABH SHARMAANKIT SHARMA SUBMITTED ATSHRI RAM GROUP OF COLLEGES

I would like to take this opportunity to express my gratitude towards all the people who have in various ways, helped in the successful completion of my project. I must convey my gratitude to Mr. PRAMOD SHARMA for giving me the constant source of inspiration and help in preparing the project, personally correcting my work and providing encouragement throughout the project.I also thank all my faculty members for steering me through the tough as well as easy phases of the project in a result oriented manner with concern attention.

DATE: 14-06-2007SAKSHI TAYAL

DECLARATIONWE ARE THE STUDENT OF BCA STUDENTS 6TH SEM SHRI RAM COLLEGE MUZAFFARNAGAR (AFFILATED TO CCS UNIVERSITY MEERUT). HERE BY DECLARE THAT THE PROJECT REPORT ON AIRLINE RESERVATION SYSTEM IS OUR ORIGINAL WORK WE ALSO DECLARE THAT WE HAVE DONE OUR WORK SELF ACCURATELY EVEN THEN IF OVER MISTAKE OR ERROR HAD KEPT IN, WE REQUEST TO OUR FACULTIS TO POINTS OUT THESE ERROR AND GUIDE OUR TO REMOVE THESE ERROR FOR OUR FUTURE. WE ARE ALSO THANKS FUL FOR OUR FACULTIES.

CERTIFICATEThis is to certify that the Project Report entitled AIRWAYS RESERVATION is the bona fide project work carried out by Mr., students of BCA, SHRI RAM COLLEGE, Muzaffarnagar during the year 2009, in partial fulfillment of the requirements for the award of the Degree of Bachelor of Computer Application and that the project report has not formed the basic for the award previously of any degree, diploma or any other similar title.

Place: MUZAFFARNAGARDate:Signature of the Guide

Title (cover page) Title of the Project Acknowledgement Certificate from Study Center Contents Introduction System Objectives Problem Definition Project Analysis Feasibility study Cost & benefit analysis Project Design System Analysis Design Hints & Guidelines System Design & Development System Design System Development Data Structure Diagram Tables Description Coding System Evaluation and Testing System Implementation System Maintenance System Documentation GLOSSARY CONCLUSION BIBLOGRAPHY

ThisProjectisbuilttomodelthereservationsystemascloselyaspossible.Some featuresare:

Separateprofilesforusers,containingalltheirpersonaldata.Possibilityofmultiplebookingsperprofile.Findingflightscheduleinformationaccordingtovariousconstraintsandconditions.Handlingofdifferentkindsofschemesforfrequentfliers,andforflights.Separateprofiletypeforofficials.Appropriateerrorchecking.

Alltheseandothertransactionsandfeatureshavebeendescribedindetailinthefollowingsection.

1.1 The Airline Reservation System (ARS) is a software application to assist an airline with transactions related to making ticket reservations, which includes blocking, reserving, canceling and rescheduling tickets.1.2From the viewpoint of the airline - 1.2.1Minimize repetitive work done by the system administrator and reservation clerks.1.2.2Maintain consistency among different access modes, e.g. by phone, , at the information desk and across different physical locations. The users should be basically taken through the same steps by the system as they go through in conventional desk-reservation systems. 1.2.3Maintain customer information in case of emergency, e.g. flight cancellation due to inclement weather. The profile can also be used by the airline company to track user preferences 1.2.4 Maximize the revenue of the airline company by various means:1.2.4.1Increase awareness among frequent travelers about various special offers and discounts. 1.2.4.2Minimize the number of vacant seats on a flight and maximize flight capacity utilization.1.2.4.3Maintain the capability to adopt a flexible pricing policy. The price of the tickets should be dynamically determined based on how early, before the date of departure, the customer buys the ticket.1.3A survey conducted by airline companies shows that users of an existing reservation system would respond favorably to an ARS that satisfied or helped them satisfy the following objectives:1.3.1Reduce effort and frustration for travelers in scheduling a trip, especially by reducing the search effort for the flight they need to take.1.3.2Show all possible combinations and itineraries available for a pair of origin-destination cities.1.3.3Reduce redundancy in the information required from the customers in order for them to buy tickets, create user accounts etc. 1.3.4Check the validity of input data and give a feedback to the user in case of errors or inconsistency.1.3.5Provide flexible access modes to users internet, telephone, PDA.1.3.6Protect customers privacy concerns.1.3.7Make it easy for travelers to check the ticket status or make changes to their trip.

The definition of our problem lies in manual system and a fully automated system.

Manual system : The system is very time consuming and lazy. This system is more prone to errors and sometimes the approach to various problems is unstructured.

Technical system : With the advent of latest technology if we do not update our system then our business result in losses gradually with time. The technical systems contains the tools of latest trend i.e. computers printers, fax, Internet etc. The systems with this technology are very fast, accurate, user-friendly and reliable..

Need of Airlines system

A few factors that directs us to develop a new system are given below -:1) Faster System2) Accuracy3) Reliability4) Informative5) Reservations and cancellations from any where to any place

AIRWAYS SYSTEM

CANCELLATIONRESERVATION

UPDATION

FEASIBILITY STUDY :-Feasibility study before development or customization of software we think following of the major points, which includes following: -

a) Economicalb) Technicalc) Duration

Economical :-This study about the software basically give the suggestion like if we develop software for our organization than how much it will forfeitable, workable as well as economical. If we developing a software which very economical but not profitable there it is also wrong decision. So for we economical study about the system table following of the point. How much costing of the software? What is the output of the customization? What are the advantages in c0ompression manual we check whether it is time or not? Whether it is use friendly or not? It is mountable for long term. Understanding about the software Corrective of software.

Technical :-We also consider some technical points about development of software. We see whether the software is reliable or not. Whether it is work time for long time or not. What are the languages as well as OS is used for development of software. It provides security or not. Software is reusable or not. Software is updated or not. Software is flexible or not whether software can maintain.

Duration :-It is also a major point when we develop software. We also consider about time, how much time software place to complete because for a big organization time factor is money for full successful of the software also Tax some times so we have consider from starting to last that means beginning to software.

BOOKING DEPARTMENT Receiver Customer Request Flight Maintenance, Receiver Customer Request Booking , Cancellling Passenger List Confirmed List

PASSENGERREPORTS Data Storage Data Access Ticket Passenger List, Reservation Fleet info

Database Cancellation , Request Cancellation For enquiry Flight information Fare details In developing cost estimates for a system, we need to consider servable cost elements. Among them hardware, personnel, facility, operating, & supply costs.Hardware Cost :-Hardware cost relate to the actual purchase or lease of the computer & peripherals Ex. Printer, disk, floppy drive, the best way to control for this cost is to treat it as an operating cost.Personnel Cost :-This includes staff salaries & benefits (health insurance, vocation time, sick pay etc.) as well as pay for those involved in developing system. Costs incurred during the development of a system are one time costs & are labeled developmental costs. Once the system is installed the costs of operating &maintaining the system become recurring costs.Facility Costs :-Facility costs are expenses incurred in the preparation of the physical site where the application or the computer will be i operation. This includes wiring, flooring, acoustics, lighting & air conditioning. These costs are treated as one time costs.

Operating Cost :-Operating costs include all costs associated with the day to day operating system.The amount depends on the number of sifts the nature of the application & the caliber of the operating staff. There are various ways of covering operating costs to overhead. Another approach is to change each authorized user for the amount of processing they request from the system. The amount charged is based on the computer time, staff time & the volume of output produced.Supply Cost :-These costs are variable costs that increase with increased use of paper, ribbon, disks & the like they should be estimated & include in the overall cost of the system.Equipment Cost :-Equipment costs include rental & annual deprecation of any equipment such as typewriter, copies, computer terminals & microcomputers used in connection with the system. Other costs associated with the equipment, such as insurance & maintenance should also be included.

SYSTEM :-A system can be defined as A set of arrangement of elements that are organized to accomplish some method, procedure or control by processing information. System Analysis stages down the broad frame work of strategy stage into its minute details. This is the stage where intensive user interaction assumes a lot of importance.System Development :-Development Phase, translates a set of requirements into an operational system that we call Software. At early stages of hardware development a hardware engineer does not reach for a soldering iron, similarly the Software engineer should not reach the compiler. Design is accomplished first.The first phase of development concentrates on design. The design phase for software with a description of architecture and data design. That is a modular structure is developed first, interfaces are defined and data structure is established. Design criteria are used for the assessment of quality. This preliminary design step is reviewed for completeness and tractability to software requirements.Procedural aspects of each modular component of the software design are considered next, and is following by the CODING the generation of program using an appropriate programming language or CASE tool occurs after the design is complete. Software engineering methodology views coding as a consequence of good design. Code is then reviewed for style and clarity, but should otherwise be directly traceable to a detailed design description.

DETAILED ENTITY RELATIONSHIP DIAGRAM :-Identification of all the Entities of importance for which data need to be stored and defined their relationship with each other was a major task at this level. All the identified entities were mapped on a E-R-diagram. It is of utmost importance to cover all the necessary entities and defined their relationship with each other correctly because any errors at this stage would result in the reworking in the further stages.Unique Identification, UID :-A unique identification is required to be identified and associated with each other at this stage.Function Hierarchy :-Function hierarchy Is used for grouping related functions under a parent function. The hierarchy is balanced so that all elementary functions comes in the same level of hierarchy. A good hierarchy drawn at this stage helped in menu generation at a later stage.

The Basic Objective :-The basic objective of the system design was the system being developed should be able to fit into the existing system, that is it become a part of the system and it should not lead to any changes which can adversely affect the existing system. The airways having many activities which effect one another so the approach of airways reservation is generated for the simplification of data handling.The approach would bring in the following benefits :- Standardization of the methods and procedures. Availability of information centrally. Minimizing future maintenance requirements. Reduction in the learning process for new personal.

Packaged systems :-The systems would have the following features:- Completely menu drive interface with the provision of initiating even the batch jobs by the user himself. On Line help Strong documentation Validation checks done by the system itself Minimization of input to the system to produce maximum output.

Designing is the most important part of the software development. It requires a careful planning and logical thinking on the system designer. Designing a software means to plan how the various parts of the software are going to achieve the desired goal. It should done with the utmost care because if this phase contains any errors then that will be going to affect the performance of the system, as a result it may take more processing time, more coding, extra work load etc.As the software is to be designed in MS-ACCESS RDBMS, the concept of the database is must for quality designing. It will be designing of the database, designing of forms, designing of reports.Separate tables have been created for each entity of the system. In order to make the response time negligible, all the tables have been created in the Memory File System. Moreover indexes have been created on the tables in the number of records have been made random.

The design stages takes the final specification of the system from the analysis stages and finds the best way of fulfilling them, given the technical environment and previous decision on required level of automationThe system design is carried out in two phases :- Architectural Design Detailed Design ARCHITECTURAL DESIGN :-The high level design maps the business system described in the program requirement specification to logical data structure, it involves:Identification of the entities that constitutes the system :-All the entities related to the module were identified, checked and consolidatedIdentifying the Relationships :-The relationships between the entities, within and outside the system were identified.Attribute definition:-The pertaining of the entities was identified and their field characteristics were specified.Normalization :-The entities were normalization, after first and the second normalization was achieved for all the entities.

Interface :-Interface with the other systems were done and attributes related to external entities identified.DETAILED DESIGN :-The low level design maps the logical model of the system to a physical database design.Table Mapping :-The Table was created for the system using the design view, which is the part of the MS_ACCESS. This has provision to create the entities and attributes into the Tables. The name of the entity is taken as the table name.Default Database Design :-In Access we can create the tables very easily. The tables divide into two parts. These names are as follow: - ROWS COLUMNSThe steps involved here were :-1. Generation of table 2. Check Validation Rule3. Check Validation Text4. Primary Keys5. Unique Keys6. Foreign Keys

Relationship :-

Ms-Access allows many types of relationship between the tables. These relationship names are as follow: -

One to One Relationship Many to One Relationship Many to Many Relationship

Program specifications :-The program specifications were written for the master, transactions, reports and queries. The logic for each field, block and form were written so that anyone who does not know the system will be able to code the logic. Field validations and user-friendly error messages were written as part of the program specification.

WINDOW 98 used as PLATFORM Windows 98 is latest version of windows and also GUI. This is best then another Operating system and easy.Windows 98 has come up with another bonanza, that is, Network Communication with other users. The users can connect with other users to share data files and peripheral devices, like Printers.The Communication tools of Windows 98 include E-Mail and connection to Internet.VISUAL BASIC used as FRONT ENDVisual Basic uses front-end programming because VB use Back end as like MS-ACCESS and any other Database.In VB we can use easy database connectivity and design the Form, Report, and others MDI applications with the help of Database.VB facility the database controls which helps the changing, modifying, deleting and adding facility in database with the help of command buttons and controls.VB is used for see the Data in many modes such as with the help of MSFlexiGrid Controls, Textbox, Combo box, List box, Image, Picture control and other.Visual Basic gives the different types of accessing the Database (RDO, ADO and DAO)Visual Basic is complete programming language that supports programming constructs for looping, decision making and efficient processing. These constructs include For.next Do.loop Selectcase Withend with If.then.elseVisual Basic helps of creation Menus, Master-Details Form.

MS-ACCESS 2007 used as BACK ENDMs-Access is a database and partially RDBMS. In Access we can easily create Database design and give the validations. Access allows the many types of relations between the tables. Access used as Backend with the Visual Basic. Access allows creating the Primary Key, Foreign Key and Unique Key. In Access we can store the data in to the table for using the wizard options.

ADMIN_PASSWORD :- FIELDS NAME DATA TYPE

LOGIN_NAMEText

PASSWORDText

FLIGHT DETAIL :- FIELDS NAME DATA TYPE

FLIGHT_NUMBERNumber

DEPARTURE_TIMENumber

RESERVATION_SECTORText

TRAVELLING_FARE 1Number

NUMBER_OF_SEATS 1Number

RESERVATION_CLASS 1Text

TRAVELLING_FARE 2Number

NUMBER_OF_SEATS 2Number

RESERVATION_CLASS 2Text

BALANCE_SHEETNumber

TICKET DETAIL :-FIELDS NAMEDATA TYPE

FLIGHT_NUMBERNumber

TICKET_NUMBERNumber

NUMBER _OF_SEATSNumber

RESERVATION_SECTORText

RESERVATION_CLASSText

RESERVATION_DATEDate

TOTAL_FARENumber

FLIGHT NUMBER :-FIELDS NAMEDATA TYPE

RESERVATION_CLASSText

RESERVATION_SECTORText

NUMBER_OF_SEATSNumber

PNR_NUMBERNumber

TICKET_NUMBERNumber

FLIGHT_NUMBERNumber

TOTAL_FARENumber

NAMEText

RESERVATION_DATEDate

FIELDS NAMEDATA TYPE

LOGIN_NAMEText

PASSWORDText

PROJECT PASSWORD :-

FIELDS NAMEDATA TYPE

PASSENGER_NAMEText

PASSENGER_AGENumber

PASSENGER_PHONENumber

RESERVATION_DATEDate

RESERVATION_SECTORText

RESERVATION_CLASSText

TICKET_NUMBERNumber

RESERVATION_STATUSText

PNR_NUMBERText

PASSENGER_ADDRESSText

RESERVATION :-

SPALSH FORM

LOGIN FORM

This is login form. In this form we login to enter the new form. It has two attributes i.e. user name and password and two option button OK and CANCLE through which we confirm or cancel the login form.

AIRWAYS RESERVATION FORM

This is the MDI (Multiple document interface) form . In this form we can open multiple forms one forms after the other. In this form we have menu editor and the contents of menu editor are counter assistant, flight detail , cancellation , change password , help , about us and exit.

COUNTER ASSISTANT

This is the counter assistant form. In this form we enter the reservation details like reservation date, flight no., reservation sector, class of travel i.e. executive or economic and no. of seats. There are two option command button to confirm or cancel the reservation details.

RESERVATION FORM

This is the reservation form. In this form we input the passenger details like passenger no. ,ticket no. ,passenger name, passenger address, passenger phone no. passenger age, reservation date, reservation sector, class of travel either executive or economic, reservation status either confirmed or in waiting list. Then by using two commands i.e. save record and print ticket we can save or take the printout of the ticket.

TICKET DETAIL FORM

This is the ticket detail form. In this form we can the ticket information like name of passenger, pnr no., ticket no. , no. of seats, total fare, sector, class, date, flight no. also we take the printout of ticket. DATA REPORT OF RESERVATION FORM

In this form we can see the reservation slip of passenger and take printout of ticket by applying print command.

ADMIN PASSWORD FORM

This is the form of administrator password . By going through this form we can do manipulation in the flight detail .In this form we have user id and password and two commands i.e. OK and CANCEL through which we can confirm or cancel the admin password form.

FLIGHT DETAIL FORM

This is the flight detail form .In this form we can save , new, find, update and close the record. The attributes are flight no. , reservation sector, departure time, class of travel , travelling fare, number of seats.

FIND FORM

This is the form of find. In this form we can find the flight detail by giving the flight number of the related flight.

TICKET DETAIL FORM

This is the ticket detail form .In this form we can see the ticket detail like sector flight no. , date, class, ticket no. , no. of seats, fare. If we want to cancel the reservation then we can cancel the reservation by clicking YES/NO.

CHANGE ADMIN PASSWORD FORM

This is the change admin password form .In this form we can change the admin password by giving new user name,old password, new password ,and confirm password.

CHANGE USER PASSWORD FORM

This is the change user password form .In this form we can change the user password by giving new user name,old password, new password ,and confirm password

ABOUT US FORM

This is about us form. In this form we can give the information of students involve in this project.

SPLASH FORM

Option ExplicitPrivate Sub Timer1_Timer()Unload SPLASH'aboutus.ShowUSERPWD.ShowEnd Sub

LOGIN FORM

Option ExplicitDim CN As New ConnectionDim LRS As New RecordsetDim MYPWD As StringPublic LoginSucceeded As BooleanPrivate Sub Form_Activate()txtPassword.SetFocusEnd SubPrivate Sub Form_Load()CN.Provider = "MICROSOFT.JET.OLEDB.3.51"CN.ConnectionString = "C:\Program files\Microsoft Visual Studio\VB98\RESERVATION.mdb"CN.OpenLRS.Open "projectpassword", CN, adOpenDynamicEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblok.ForeColor = Label1.ForeColorlblcancel.ForeColor = Label1.ForeColorEnd SubPrivate Sub lblcancel_Click()LoginSucceeded = FalseUnload USERPWDEnd SubPrivate Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = vbYellowEnd SubPrivate Sub lblok_Click()MYPWD = LRS("PASSWORD") If txtPassword.Text = MYPWD Then LoginSucceeded = True Unload USERPWD AIRWAYSRESERVATION.Show Else MsgBox "Invalid Password, try again!", vbSystemModal + vbExclamation, "USER PASSWORD" txtPassword.SetFocus SendKeys "{Home}+{End}" End IfEnd SubPrivate Sub lblok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblok.ForeColor = vbYellowEnd SubPrivate Sub txtusername_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtPassword.SetFocus End IfEnd Sub

AIRWAYS RESERVATION

Private Sub MNUABOUTUS_Click()aboutus.ShowEnd SubPrivate Sub MNUADMIN_Click()ADMINPWD.ShowEnd SubPrivate Sub MNUCA_Click()COUNTERASSISTANT.ShowEnd SubPrivate Sub MNUCANCEL_Click()CANCELLATION.ShowEnd SubPrivate Sub MNUCHANGEADMIN_Click()CHANGEADMIN.ShowEnd SubPrivate Sub MNUCHANGEUSER_Click()CHANGEUSER.ShowEnd SubPrivate Sub MNUEXIT_Click()EndEnd Sub

COUNTER ASSISTANT

Dim CN As New ConnectionDim rs1 As New RecordsetDim totalseats As IntegerDim RS As New RecordsetPrivate Sub cmbflightno_Click()Set rs1 = CN.Execute("select res_sector from flightdetails where flight_no=" & " '" & cmbflightno.Text & "'")TXTSECTOR.Text = rs1("res_sector")rs1.CloseEnd SubPrivate Sub cmbflightno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then CMBRESCLASS.SetFocus End IfEnd SubPrivate Sub CMBRESCLASS_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TXTSEATS.SetFocus End IfEnd Sub

Private Sub Form_Activate()rs1.CursorLocation = adUseClientrs1.Open "flightdetails", CN, adOpenDynamic For i = 1 To rs1.RecordCount cmbflightno.AddItem rs1("flight_no") rs1.MoveNext NextCMBRESCLASS.AddItem "EXECUTIVE"CMBRESCLASS.AddItem "ECONOMIC"rs1.CloseEnd SubPrivate Sub Form_Load()On Error GoTo BLANKCN.Provider = "Microsoft.Jet.OLEDB.3.51"CN.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"CN.OpenOPTCANCEL.Value = FalseBLANK: If Err.Number = 3021 Then MsgBox "There is no record.", vbInformation + vbSystemModal, "RECORD NOT AVAILABLE" OPTCANCEL.Value = False End IfEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)ok.ForeColor = Label1.ForeColorOPTCANCEL.ForeColor = Label1.ForeColorEnd SubPrivate Sub ok_Click()Dim STORE As IntegerDim mystore As Integerrs1.Open "flightdetails", CN, adOpenDynamicSet rs1 = CN.Execute("select bal_seats from flightdetails where flight_no= " & " '" & cmbflightno & "' ")mystore = rs1("bal_seats")STORE = rs1("bal_seats") - TXTSEATS.TextCN.Execute ("update flightdetails set bal_seats= " & " '" & STORE & "' where flight_no=" & " '" & cmbflightno.Text & "' ") If STORE >= Val(TXTSEATS.Text) Then MsgBox "Your seats are confirmed.", vbSystemModal + vbInformation, "CONFIRMED/WAITING SEATS" ElseIf STORE < 0 And STORE >= -10 Then If mystore > 0 Then MsgBox mystore & " Seats are confirmed.", vbSystemModal + vbInformation, "CONFIRMED/WAITING SEATS" MsgBox STORE & " Seats are in waiting.", vbSystemModal + vbInformation, "CONFIRMED/WAITING SEATS" End If If mystore < 0 Then MsgBox "Your seats are in waiting list.", vbSystemModal + vbInformation, "CONFIRMED/WAITING SEATS" End If ElseIf STORE < -10 Then MsgBox "Sorry, we can't reserve because of inavailability of seats.", vbSystemModal + vbInformation, "INDIAN AIRWAYS" Exit Sub End IfRESERVATION.ShowCOUNTERASSISTANT.Hiders1.CloseEnd SubPrivate Sub ok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)ok.ForeColor = vbYellowEnd SubPrivate Sub OPTCANCEL_Click()Unload COUNTERASSISTANTEnd Sub

Private Sub OPTCANCEL_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)OPTCANCEL.ForeColor = vbYellowEnd Sub Private Sub TXTRESDATE_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmbflightno.SetFocus End IfEnd SubPrivate Sub txtresdate_LostFocus()On Error GoTo RAKDim STR As DateDim STR1 As StringDim STORE As IntegerSTORE = Month(Date)STORE = STORE + 3 If Month(TXTRESDATE.Text) > STORE Then MsgBox "Enter the date within three months.", vbSystemModal + vbInformation, "DATE ERROR" TXTRESDATE.SetFocus Exit Sub End If If Year(TXTRESDATE.Text) > Year(Date) Then MsgBox "Enter the date with current year", vbSystemModal + vbInformation, "Date Error" TXTRESDATE.SetFocus Exit Sub End If STR = Format(TXTRESDATE, "mm/dd/yy") If STR < Date Then MsgBox "Enter the current or coming date.", vbSystemModal + vbInformation, "DATE ERROR" TXTRESDATE.SetFocus ElseIf STR >= Date Then Label8.Visible = False cmbflightno.SetFocus End IfRAK: If Err.Number = 13 Then MsgBox "Enter in date format.", vbSystemModal + vbInformation, "DATE ERROR" TXTRESDATE.SetFocus End IfEnd SubPrivate Sub TXTSEATS_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call TXTSEATS_LostFocus ok.Enabled = True End IfEnd SubPrivate Sub TXTSEATS_LostFocus() If TXTSEATS.Text = "" Then MsgBox "Enter the seats.", vbInformation + vbSystemModal, "CONFIRMATION SEATS" TXTSEATS.SetFocus ElseIf TXTSEATS.Text > 6 Then MsgBox "More than six seats are not allowed.", vbSystemModal + vbInformation, "CONFIRMATION SEATS" TXTSEATS.SetFocus ElseIf TXTSEATS.Text 0 Then ok.Enabled = True ElseIf TXTSEATS.Text = 0 Then MsgBox "Enter seats greater than 0.", vbSystemModal + vbInformation, "CONFIRMATION SEATS" ok.Enabled = False TXTSEATS.SetFocus End IfEnd Sub

Public Function BLANKFIELDS()TXTRESDATE.Text = ""TXTSECTOR.Text = "SECTOR"TXTSEATS.Text = ""End Function

RESERVATIONDim CN As New ConnectionDim RS As New RecordsetDim flightRS As New RecordsetDim ticketrs As New RecordsetDim X As IntegerPrivate Sub Form_Activate()MsgBox "Enter details of passengers.", vbInformation + vbSystemModal, "DETAIL INFORMATION"DISPFIELDSTXTNAME.SetFocusTXTNAME.Locked = Falsetxtage.Locked = Falsetxtphoneno.Locked = Falsetxtaddress.Locked = Falsetxtpnrno.Text = ""txtticketno.Text = ""BLANKFIELDSEnd SubPrivate Sub Form_Deactivate()equalseats = 0X = 0End SubPrivate Sub Form_Load()CN.Provider = "MicroSoft.Jet.OLEDB.3.51"CN.ConnectionString = "C:\Program files\Microsoft Visual Studio\VB98\RESERVATION.mdb"CN.OpenRS.CursorLocation = adUseClientEnd SubPublic Function DISPFIELDS()TXTRESDATE.Text = COUNTERASSISTANT.TXTRESDATE.Texttxtressector.Text = COUNTERASSISTANT.TXTSECTOR.TextTXTCLASS.Text = COUNTERASSISTANT.CMBRESCLASS.TextEnd FunctionPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)LBLPRINT.ForeColor = Label1.ForeColorLBLSAVE.ForeColor = Label1.ForeColorEnd SubPrivate Sub LBLDELETE_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)LBLDELETE.ForeColor = vbYellowEnd Sub

Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)If UnloadMode = 0 ThenMsgBox "Please enter details", vbInformation + vbSystemModal, "Reservation"cancel = 1RESERVATION.ShowEnd IfEnd SubPrivate Sub LBLPRINT_Click()Dim J As IntegerDim X As IntegerDim Y As IntegerRS.CursorLocation = adUseClientSet ticketrs = CN.Execute("select no_of_seats,total_fare,flight_no,ticket_no from ticketdetails where ticket_no=" & "'" & txtticketno.Text & "'") With TICKET .TXTFARE.Text = ticketrs("total_fare") .TXTFLIGHTNO.Text = ticketrs("flight_no") .TXTSEATS.Text = ticketrs("no_of_seats") .txtticketno.Text = ticketrs("ticket_no") End WithTICKET.ShowJ = 0RS.Open ("select res_class,res_date,res_sector,pnr_no,pas_name from reservation where TICKET_NO=" & "'" & txtticketno.Text & "'") With TICKET .TXTCLASS.Text = RS("res_class") .TXTDATE.Text = RS("res_date") .TXTSECTOR.Text = RS("res_sector") End With For i = 0 To RS.RecordCount - 1 If i >= COUNTERASSISTANT.TXTSEATS Then Exit For Else TICKET.txtpnrno(i).Visible = True TICKET.TXTNAME(i).Visible = True TICKET.txtpnrno(i).Text = RS("pnr_no") TICKET.TXTNAME(i).Text = RS("pas_name") Load TICKET.txtpnrno(i + 1) Load TICKET.TXTNAME(i + 1) Y = Y + 600 TICKET.txtpnrno(i + 1).Top = TICKET.txtpnrno(i).Top + Y TICKET.TXTNAME(i + 1).Top = TICKET.TXTNAME(i).Top + Y RS.MoveNext End If Next iTICKET.ShowRESERVATION.Hideticketrs.CloseRS.CloseEnd SubPrivate Sub lblsave_Click()Dim J As IntegerDim A, count As IntegerDim i As IntegerDim TAKE As IntegerDim take1 As IntegerDim STR As StringDim STR1 As StringDim STORE As IntegerDim check As IntegerDim myval As IntegerDim myphoneno$Static equalseats As IntegerDim totalfare As SingleRS.Open "RESERVATION", CN, adOpenDynamic, adLockOptimisticflightRS.Open "flightdetails", CN, adOpenDynamic If TXTNAME.Text = "" Then MsgBox "Enter your name.", vbSystemModal + vbInformation, "NAME ERROR" TXTNAME.SetFocus RS.Close flightRS.Close Exit Sub ElseIf txtaddress.Text = "" Then MsgBox "Enter your address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus RS.Close flightRS.Close Exit Sub ElseIf txtage.Text = "" Then MsgBox "Enter your age.", vbSystemModal + vbInformation, "AGE ERROR" txtage.SetFocus RS.Close flightRS.Close Exit Sub End IfSTORE = MsgBox("Do you want to save the record?", vbYesNo + vbSystemModal + vbQuestion + vbDefaultButton1, "CONFIRMATION SAVE") If STORE = vbNo Then TXTRESDATE.Text = "" txtressector.Text = "" TXTCLASS.Text = "" ElseIf STORE = vbYes Then If RS.RecordCount = 0 Then STR1 = "P000" Else RS.MoveLast STR1 = RS("pnr_no") End If take1 = Val(Right(STR1, 3)) take1 = take1 + 1 If take1 >= 1 And take1 < 10 Then txtpnrno.Text = "P00" & take1 ElseIf take1 >= 10 And take1 = 1 Or TAKE < 10 Then txtticketno.Text = "T00" & TAKE ElseIf TAKE >= 10 Or TAKE 14 And Y < 32 Then MsgBox "Enter correct address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus Exit For ElseIf Y > 32 And Y < 44 Or Y = 46 Then MsgBox "Enter correct address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus Exit For ElseIf Y > 57 And Y < 65 Then MsgBox "Enter correct address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus Exit For ElseIf Y > 90 And Y < 97 Then MsgBox "Enter correct address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus Exit For ElseIf Y > 122 Then MsgBox "Enter correct address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus Exit For ElseIf IsNumeric(STR) Then MsgBox "Enter correct address.", vbSystemModal + vbInformation, "ADDRESS ERROR" txtaddress.SetFocus Exit For End If Nexttxtaddress.Text = ztxtaddress.Text = StrConv(txtaddress.Text, vbProperCase)End SubPrivate Sub txtage_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call txtage_LostFocus LBLSAVE.Enabled = True End IfEnd SubPrivate Sub txtage_LostFocus()Dim X As StringDim length As IntegerDim Y As IntegerDim STR As StringDim i As IntegerDim z As IntegerSTR = txtage.Textlength = Len(STR) For i = 1 To length X = Mid(STR, i, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter correct age.", vbSystemModal + vbInformation, "AGE ERROR" txtage.SetFocus Exit Sub ElseIf txtage.Text = "00" Or txtage.Text = "0" Then MsgBox "Enter correct age.", vbSystemModal + vbInformation, "AGE ERROR" txtage.SetFocus Exit Sub ElseIf txtage.Text >= "80" Then MsgBox "This age group is not allowed.", vbSystemModal + vbInformation, "AGE ERROR" txtage.SetFocus Exit Sub End If If length > 2 Then MsgBox "Enter correct age within two characters.", vbSystemModal + vbInformation, "AGE ERROR" txtage.SetFocus Exit Sub End If NextEnd SubPrivate Sub txtcode_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtphoneno.SetFocus End IfEnd SubPrivate Sub txtcode_LostFocus()On Error GoTo RAKDim k As IntegerDim i As IntegerDim STR2 As StringDim YDim X As IntegerDim CLENGTH As IntegerSTR2 = txtcode.TextCLENGTH = Len(STR2) For k = 1 To CLENGTH X = Mid(STR2, k, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter correct code.", vbSystemModal + vbInformation, "PHONE NUMBER ERROR" txtcode.SetFocus Exit Sub End If If CLENGTH < 3 Then MsgBox "Enter correct code.", vbInformation + vbSystemModal, "CODE ERROR" txtcode.SetFocus Exit Sub ElseIf txtcode.Text = "00000" Or txtcode.Text = "0000" Or txtcode.Text = "000" Or txtcode.Text = "000000" Then MsgBox "Enter correct code.", vbInformation + vbSystemModal, "CODE ERROR" txtcode.SetFocus Exit Sub End If NextRAK: If Err.Number = 13 Then MsgBox "Enter correct code.", vbSystemModal + vbInformation, "CODE ERROR" txtcode.SetFocus End IfEnd Sub

Public Function BLANKFIELDS()TXTNAME.Text = ""txtage.Text = ""txtaddress.Text = ""txtphoneno.Text = ""txtcode.Text = ""End FunctionPublic Function SHOWFIELDS() With TICKET .TXTCLASS.Text = RS("RES_CLASS") .TXTDATE.Text = RS("RES_DATE") .TXTSECTOR.Text = RS("res_sector") .txtticketno.Text = RS("ticket_no") End WithEnd FunctionPrivate Sub txtname_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtaddress.SetFocus End IfEnd Sub

Private Sub TXTNAME_LostFocus()BLANKEnd SubPublic Function BLANK()Dim X As StringDim length As IntegerDim STR1 As StringDim Y As IntegerDim z As StringDim J As IntegerSTR1 = TXTNAME.Textz = Trim(STR1)length = Len(z) For J = 1 To length X = Mid(z, J, 1) Y = Asc(X) If Y < 31 Or Y > 33 And Y < 65 Or Y > 90 And Y < 97 Or Y > 122 Then MsgBox "Enter correct name.", vbSystemModal + vbInformation, "NAME ERROR" TXTNAME.SetFocus Exit Function End If NextTXTNAME = zTXTNAME = StrConv(TXTNAME, vbProperCase)End FunctionPrivate Sub txtphoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtage.SetFocus End IfEnd SubPrivate Sub txtphoneno_LostFocus()Dim X As StringDim length As IntegerDim i As IntegerDim Y As IntegerDim J As StringJ = txtphoneno.Textlength = Len(J) For i = 1 To length X = Mid(J, i, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter correct phone number.", vbSystemModal + vbInformation, "PHONE NUMBER ERROR" txtphoneno.SetFocus Exit Sub End If If length < 6 Then MsgBox "Enter the correct phone no. minimum upto 4 numbers and maximum upto 7.", vbSystemModal + vbInformation, "PHONE NUMBER ERROR" txtphoneno.SetFocus Exit Sub ElseIf txtphoneno.Text = "000000" Or txtphoneno.Text = "0000000" Or txtphoneno.Text = "00000000" Then MsgBox "Enter correct phone number.", vbSystemModal + vbInformation, "PHONE NUMBER ERROR" txtphoneno.SetFocus Exit Sub End If NextEnd Sub

TICKET

Dim resrs As New RecordsetPublic rescn As New ConnectionPrivate Sub Form_Load()rescn.Provider = "Microsoft.Jet.OLEDB.3.51"rescn.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"rescn.OpenEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)LBLPRINT.ForeColor = Label1.ForeColorEnd SubPrivate Sub LBLPRINT_Click()Set resrs = rescn.Execute("select * from TICKETDETAILS where TICKET_NO= " & " '" & txtticketno & "' ")Set DataReport1.DataSource = resrsDataReport1.DataMember = "" With DataReport1.Sections("section1").Controls .Item(22).DataField = "FLIGHT_NO" .Item(17).DataField = "TICKET_NO" .Item(18).DataField = "NO_OF_SEATS" .Item(20).DataField = "RES_SECTOR" .Item(19).DataField = "RES_CLASS" .Item(21).DataField = "RES_DATE" .Item(23).DataField = "TOTAL_FARE" For i = 0 To TICKET.txtpnrno.count - 2 .Item(i + 1).Caption = TICKET.txtpnrno(i).Text .Item(i + 1).Visible = True .Item(i + 7).Caption = TICKET.TXTNAME(i) .Item(i + 7).Visible = True Next i End WithDataReport1.ShowUnload TICKETEnd SubPrivate Sub LBLPRINT_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)LBLPRINT.ForeColor = vbGreenEnd Sub

DATA REPORT 1

Private Sub DataReport_Terminate()TICKET.rescn.CloseCOUNTERASSISTANT.ShowEnd Sub

ADMINISTRATOR PASSWORD

Option ExplicitDim CN As New ConnectionDim ARS As New RecordsetDim MYPWD As StringPublic LoginSucceeded As BooleanPrivate Sub Form_Activate()txtPassword.SetFocusEnd SubPrivate Sub Form_Load()CN.Provider = "MICROSOFT.JET.OLEDB.3.51"CN.ConnectionString = "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VB98\RESERVATION.mdb"CN.OpenARS.Open "ADMINPASSWORD", CN, adOpenDynamicEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblok.ForeColor = Label1.ForeColorlblcancel.ForeColor = Label1.ForeColorEnd SubPrivate Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)CN.CloseEnd SubPrivate Sub lblcancel_Click()LoginSucceeded = FalseUnload MeEnd SubPrivate Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = vbWhiteEnd SubPrivate Sub lblok_Click()MYPWD = ARS!PASSWORD If txtPassword = MYPWD Then LoginSucceeded = True Unload Me FLIGHT.Show Else MsgBox "Invalid Password, try again!", vbExclamation + vbSystemModal, "ADMINISTRATOR PASSWORD" txtPassword.SetFocus SendKeys "{Home}+{End}" End IfEnd SubPrivate Sub lblok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblok.ForeColor = vbWhiteEnd SubPrivate Sub txtusername_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtPassword.SetFocus End IfEnd Sub

FLIGHT DETAIL

Dim CN As New ConnectionDim RS As New RecordsetPrivate Sub cmbflightno_Click()Set RS = CN.Execute("select * from flightdetails where flight_no=" & " '" & cmbflightno.Text & "' ")DISPFIELDSlblupdate.Enabled = TrueRS.CloseEnd SubPrivate Sub Form_Load()CN.Provider = "Microsoft.Jet.OLEDB.3.51"CN.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"CN.OpenRS.CursorLocation = adUseClientEnd SubPrivate Sub Form_Unload(cancel As Integer)CN.CloseEnd Sub

Private Sub Frame4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblfind.ForeColor = Label1.ForeColorlblmodify.ForeColor = Label1.ForeColorlblsave.ForeColor = Label1.ForeColorlblupdate.ForeColor = Label1.ForeColorlblcancel.ForeColor = Label1.ForeColorlblclose.ForeColor = Label1.ForeColorEnd SubPrivate Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblfind.ForeColor = Label1.ForeColorlblmodify.ForeColor = Label1.ForeColorlblsave.ForeColor = Label1.ForeColorlblupdate.ForeColor = Label1.ForeColorlblcancel.ForeColor = Label1.ForeColorlblclose.ForeColor = Label1.ForeColorEnd SubPrivate Sub lblcancel_Click()lblnew.Visible = Truelblsave.Visible = Truelblfind.Visible = Truelblcancel.Visible = Falselblupdate.Visible = Falselblmodify.Visible = TrueBLANKFIELDScmbflightno.Visible = Falsetxtflightno.Visible = Truetxtfare1.Locked = Truetxtfare2.Locked = TrueTXTDEPTTIME.Locked = Truetxtseats1.Locked = Truetxtseats2.Locked = Truelblclose.Visible = TrueEnd SubPrivate Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = vbGreenEnd SubPrivate Sub lblclose_Click() If lblclose.Caption = "Cancel" Then lblfind.Enabled = True lblmodify.Enabled = True lblclose.Caption = "Close" lblsave.Enabled = False lblnew.ForeColor = Label1.ForeColor Exit Sub End If If lblclose.Caption = "Close" Then Unload FLIGHT AIRWAYSRESERVATION.Show End IfEnd SubPrivate Sub lblclose_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblclose.ForeColor = vbGreenEnd Sub

Private Sub lblfind_Click()FLIGHT.HideFIND.ShowEnd SubPrivate Sub lblfind_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblfind.ForeColor = vbGreenEnd SubPrivate Sub lblmodify_Click()Dim i As IntegerRS.Open "flightdetails", CN, adOpenDynamiccmbflightno.Visible = Truetxtflightno.Visible = Falsecmbflightno.SetFocus For i = 1 To RS.RecordCount cmbflightno.AddItem RS("flight_no") RS.MoveNext Next ilblnew.Visible = Falselblsave.Visible = Falselblfind.Visible = Falselblupdate.Visible = Truelblupdate.Enabled = Falselblcancel.Visible = Truelblmodify.Visible = FalseTXTDEPTTIME.Locked = Falsetxtfare1.Locked = Falsetxtfare2.Locked = Falsetxtseats1.Locked = Falsetxtseats2.Locked = Falselblclose.Visible = FalseRS.CloseEnd SubPrivate Sub lblmodify_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblmodify.ForeColor = vbGreenEnd SubPrivate Sub lblnew_Click()BLANKFIELDScmbflightno.Visible = Falsetxtflightno.Visible = TrueTXTDEPTTIME.Locked = Falsetxtsector.Locked = Falsetxtfare1.Locked = Falsetxtfare2.Locked = Falsetxtseats1.Locked = Falsetxtseats2.Locked = Falsetxtsector.SetFocuslblsave.Enabled = Truelblclose.Caption = "Cancel"lblfind.Enabled = Falselblmodify.Enabled = Falselblclose.Enabled = TrueEnd SubPrivate Sub lblnew_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblnew.ForeColor = vbGreenEnd SubPrivate Sub lblsave_Click()Dim i, k As IntegerDim length As IntegerDim STORE As IntegerDim TAKE As IntegerDim STR As StringDim STR1 As StringDim myflight As StringDim seats As Integer If txtsector.Text = "" Then MsgBox "Enter the sector.", vbSystemModal + vbInformation, "SECTOR ERROR" txtsector.SetFocus Exit Sub ElseIf TXTDEPTTIME.Text = "" Then MsgBox "Enter the departure time.", vbSystemModal + vbInformation, "DEPARTURE TIME ERROR" TXTDEPTTIME.SetFocus Exit Sub ElseIf txtfare1.Text = "" Then MsgBox "Enter the fare.", vbSystemModal + vbInformation, "FARE ERROR" txtfare1.SetFocus Exit Sub ElseIf txtfare2.Text = "" Then MsgBox "Enter the fare.", vbSystemModal + vbInformation, "FARE ERROR" txtfare2.SetFocus Exit Sub ElseIf txtseats1.Text = "" Then MsgBox "Enter the seats.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats1.SetFocus Exit Sub ElseIf txtseats2.Text = "" Then MsgBox "Enter the seats.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats2.SetFocus Exit Sub End IfSTORE = MsgBox("Do you want to save the record?", vbQuestion + vbYesNo + vbSystemModal + vbDefaultButton1, "CONFIRMATION SAVE") If STORE = vbNo Then BLANKFIELDS txtsector.SetFocus txtsector.Locked = True TXTDEPTTIME.Locked = True txtfare1.Locked = True txtfare2.Locked = True txtseats1.Locked = True txtseats2.Locked = True lblclose.Caption = "Close" lblfind.Enabled = True lblmodify.Enabled = True lblsave.Enabled = False Exit Sub ElseIf STORE = vbYes Then length = Len(txtsector.Text) STR = Mid(txtsector.Text, 1, 1) For i = 1 To length If (Mid(txtsector.Text, i, 1) = Chr(32)) Then STR = UCase(STR + Mid(txtsector.Text, i + 1, 1)) End If Next i RS.Open "FLIGHTDETAILS", CN, adOpenDynamic, adLockOptimistic For k = 1 To RS.RecordCount If STR = Mid(RS("flight_no"), 1, 3) Then myflight = RS("flight_no") End If RS.MoveNext Next If myflight = "" Then STR1 = STR + "000" Else STR1 = myflight End If TAKE = Val(Right(STR1, 3)) TAKE = TAKE + 1 If TAKE >= 1 And TAKE < 10 Then STR1 = STR & "00" & TAKE ElseIf TAKE >= 10 And TAKE < 100 Then STR1 = STR & "0" & TAKE End If txtflightno.Text = STR1 seats = Val(txtseats1) + Val(txtseats2) CN.Execute ("INSERT INTO FLIGHTDETAILS(FLIGHT_NO,RES_SECTOR,RES_CLASS1,RES_CLASS2,DEPT_TIME,TRAVELLING_FARE1,TRAVELLING_FARE2,NO_OF_SEATS1,NO_OF_SEATS2,bal_seats)VALUES(" & "'" & txtflightno.Text & "','" & txtsector.Text & "','" & txtfirst.Text & "','" & txtsecond.Text & "','" & TXTDEPTTIME.Text & "','" & txtfare1.Text & "','" & txtfare2.Text & "','" & txtseats1.Text & "','" & txtseats2.Text & "', '" & seats & "')") MsgBox "The record has been saved.", vbSystemModal + vbInformation, "RECORD SAVED" lblnew.ForeColor = Label1.ForeColor lblsave.Enabled = False lblclose.Caption = "Close" lblfind.Enabled = True lblmodify.Enabled = True End IfRS.CloseEnd Sub

Private Sub lblsave_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblsave.ForeColor = vbGreenEnd Sub

Public Function BLANKFIELDS()txtseats1.Text = ""txtseats2.Text = ""txtflightno.Text = ""TXTDEPTTIME.Text = ""txtsector.Text = ""txtfare1.Text = ""txtfare2.Text = ""End Function

Public Function DISPFIELDS()txtsector.Text = RS("res_sector")TXTDEPTTIME.Text = RS("DEPT_TIME")txtfare1.Text = RS("TRAVELLING_FARE1")txtfare2.Text = RS("TRAVELLING_FARE2")txtseats1.Text = RS("NO_OF_SEATS1")txtseats2.Text = RS("NO_OF_SEATS2")End Function

Private Sub lblupdate_Click()CN.Execute ("update flightdetails set travelling_fare1=" & " '" & txtfare1.Text & "',travelling_fare2='" & txtfare2.Text & "',dept_time='" & TXTDEPTTIME.Text & "',no_of_seats1='" & txtseats1.Text & "',no_of_seats2='" & txtseats2.Text & "' where flight_no=" & " '" & txtflightno.Text & "' ")MsgBox "The record has been updated.", vbSystemModal + vbInformation, "UPDATION CONFIRMED"lblnew.Visible = Truelblsave.Visible = Truelblfind.Visible = Truelblcancel.Visible = Falselblupdate.Visible = Falselblmodify.Visible = Truelblclose.Visible = Truetxtfare1.Locked = Truetxtfare2.Locked = TrueTXTDEPTTIME.Locked = Truetxtseats1.Locked = Truetxtseats2.Locked = Truelblclose.Visible = TEnd Sub

Private Sub lblupdate_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblupdate.ForeColor = vbGreenEnd Sub

Private Sub TXTDEPTTIME_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtfare1.SetFocus End IfEnd Sub

Private Sub TXTDEPTTIME_LostFocus()Dim T As IntegerDim J As IntegerDim STR As StringDim i As IntegerDim X As StringDim Y As IntegerDim M As IntegerDim length As IntegerSTR = Format(TXTDEPTTIME.Text, "HH:MM") If TXTDEPTTIME.Text STR Then TXTDEPTTIME.SetFocus MsgBox "Enter the correct time ", vbInformation + vbSystemModal, "TIME ERROR" Exit Sub End Iflength = Len(STR) For J = 1 To length X = Mid(STR, J, 1) Y = Asc(X) If Y = 58 Then T = Left(STR, 2) M = Right(STR, 2) If T > 24 Then MsgBox "Enter hours less than or equal to 24.", vbSystemModal + vbInformation, "HOUR ERROR" TXTDEPTTIME.SetFocus End If If M >= 60 Then MsgBox "Enter minutes less than 60.", vbSystemModal + vbInformation, "MINUTE ERROR" TXTDEPTTIME.SetFocus End If End If Next For i = 1 To length X = Mid(STR, i, 1) Y = Asc(X) If Y < 48 Or Y > 58 Then MsgBox "Enter the correct time.", vbSystemModal + vbInformation, "TIME ERROR" TXTDEPTTIME.SetFocus Exit For End If NextEnd SubPrivate Sub txtfare1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtfare2.SetFocus End IfEnd SubPrivate Sub txtfare1_LostFocus()Dim i As IntegerDim length As IntegerDim STR As StringDim XDim Y As IntegerSTR = txtfare1.Textlength = Len(STR) For i = 1 To length X = Mid(STR, i, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter number in fare.", vbSystemModal + vbInformation, "FARE ERROR" txtfare1.SetFocus Exit For End If If length < 3 Then MsgBox "Enter fare not less than 3 digits.", vbSystemModal + vbInformation, "FARE ERROR" txtfare1.SetFocus Exit For End If If Val(STR) > 10000 Then MsgBox "Enter fare between 100 and 10000.", vbSystemModal + vbInformation, "FARE ERROR" txtfare1.SetFocus Exit For End If NextEnd SubPrivate Sub txtfare2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtseats1.SetFocus End IfEnd Sub

Private Sub txtfare2_LostFocus()Dim i As IntegerDim length As IntegerDim STR1 As StringDim X As StringDim Y As IntegerSTR1 = txtfare2.Textlength = Len(STR1) For i = 1 To length X = Mid(STR1, i, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter numbers in fare.", vbSystemModal + vbInformation, "FARE ERROR" txtfare2.SetFocus Exit For End If If length < 3 Then MsgBox "Enter fare not less than 3 digits.", vbSystemModal + vbInformation, "FARE ERROR" txtfare2.SetFocus Exit For End If If STR1 > 10000 Then MsgBox "Enter fare between 100 and 10000.", vbSystemModal + vbInformation, "FARE ERROR" txtfare2.SetFocus Exit For End If NextEnd SubPrivate Sub txtseats1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtseats2.SetFocus End IfEnd SubPrivate Sub txtseats1_LostFocus()Dim i As IntegerDim length As IntegerDim STR2 As StringDim X As StringDim Y As IntegerSTR2 = txtseats1.Textlength = Len(STR2) For i = 1 To length X = Mid(STR2, i, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter numbers in seats.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats1.SetFocus Exit For End If If length < 2 Then MsgBox "Enter seats greater than 10.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats1.SetFocus Exit For End If If STR2 > 100 Then MsgBox "Enter seats between 10 and 100.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats1.SetFocus Exit For End If NextEnd Sub

Private Sub txtseats2_LostFocus()Dim i As IntegerDim length As IntegerDim STR3 As StringDim X As StringDim Y As IntegerSTR3 = txtseats2.Textlength = Len(STR3) For i = 1 To length X = Mid(STR3, i, 1) Y = Asc(X) If Y < 48 Or Y > 57 Then MsgBox "Enter number in seats.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats2.SetFocus Exit For End IfIf length < 2 Then MsgBox "Enter seats greater than 10.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats2.SetFocus Exit For End If If STR2 > 100 Then MsgBox "Enter seats between 10 and 100.", vbSystemModal + vbInformation, "SEATS ERROR" txtseats2.SetFocus Exit For End If NextEnd SubPrivate Sub txtsector_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then TXTDEPTTIME.SetFocus End IfEnd SubPrivate Sub txtsector_LostFocus()Dim i As IntegerDim length As IntegerDim STR2 As StringDim X As StringDim Y As IntegerDim z As Stringstr4 = txtsector.Textz = Trim(str4)length = Len(z) For i = 1 To length X = Mid(z, i, 1) Y = Asc(X) If Y < 31 Or Y > 33 And Y < 65 Or Y > 90 And Y < 97 Or Y > 122 Then MsgBox "Enter correct sector.", vbSystemModal + vbInformation, "SECTOR ERROR" txtsector.SetFocus Exit For End If Next itxtsector = ztxtsector = StrConv(txtsector, vbProperCase)End Sub

FIND

Dim CN As New ConnectionDim RS As New RecordsetDim myvar As IntegerPrivate Sub Form_Load()Dim i As IntegerCN.Provider = "Microsoft.Jet.OLEDB.3.51"CN.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"CN.OpenRS.CursorLocation = adUseClientRS.Open "FLIGHTDETAILS", CN, adOpenDynamic, adLockOptimistic For i = 1 To RS.RecordCount cmbfind.AddItem RS("FLIGHT_NO") RS.MoveNext NextEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = Label2.ForeColorlblok.ForeColor = Label2.ForeColorEnd SubPrivate Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer) If UnloadMode = 0 Then myvar = 0 CN.Close Unload Me FLIGHT.Show End IfEnd SubPrivate Sub Form_Unload(cancel As Integer) If myvar = 1 Then CN.Close End IfEnd SubPrivate Sub lblcancel_Click()MsgBox "The record can't be found.", vbSystemModal + vbInformation, "FIND CANCELLED"myvar = 0FLIGHT.ShowCN.CloseUnload MeEnd SubPrivate Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = vbWhiteEnd SubPrivate Sub lblok_Click()On Error GoTo RAKSet RS = CN.Execute("select * from flightdetails where flight_no=" & " '" & cmbfind.Text & "' ")DISPFIELDSmyvar = 1FLIGHT.ShowUnload MeRAK: If Err.Number = 3021 Then MsgBox "Flight No. does not exist", vbInformation + vbSystemModal, "FIND ERROR" End IfEnd SubPrivate Sub lblok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblok.ForeColor = vbWhiteEnd Sub

Public Function DISPFIELDS()FLIGHT.txtflightno.Text = RS("FLIGHT_NO")FLIGHT.txtsector.Text = RS("res_sector")FLIGHT.TXTDEPTTIME.Text = RS("DEPT_TIME")FLIGHT.txtfare1.Text = RS("TRAVELLING_FARE1")FLIGHT.txtfare2.Text = RS("TRAVELLING_FARE2")FLIGHT.txtseats1.Text = RS("NO_OF_SEATS1")FLIGHT.txtseats2.Text = RS("NO_OF_SEATS2")FLIGHT.txtflightno.Locked = TrueFLIGHT.txtsector.Locked = TrueFLIGHT.TXTDEPTTIME.Locked = TrueFLIGHT.txtfare1.Locked = TrueFLIGHT.txtfare2.Locked = TrueFLIGHT.txtseats1.Locked = TrueFLIGHT.txtseats2.Locked = TrueEnd Function

FLIGHT NUMBER

Dim CN As New ConnectionDim flightRS As New RecordsetDim ticketrs As New RecordsetDim resrs As New RecordsetDim FRS As New RecordsetDim MYTICKET As StringDim ourTICKET As StringPrivate Sub cancelprint_Click()Dim i As IntegerDim myf As IntegerDim fare As IntegerFRS.CursorLocation = adUseClientFRS.Open "FLIGHTNUMBER", CN, adOpenDynamicFRS.MoveFirst If cmbpnrno.Visible = False Then Set FRS = CN.Execute("SELECT * FROM FLIGHTNUMBER WHERE TICKET_NO=" & "'" & MYTICKET & "'") DISPFIELDS cancel.TXTPNRNO(J).Visible = False cancel.TXTNAME(J).Visible = False cancel.Label2.Visible = False cancel.Label3.Visible = False cancel.Show FLIGHTNUMBER.Hide ElseIf cmbpnrno.Visible = True Then Label8.Visible = True TXTNAME.Visible = True FRS.Close FRS.Open ("SELECT * FROM FLIGHTNUMBER WHERE TICKET_NO=" & "'" & MYTICKET & "'") fare = FRS("Total_fare") / FRS("no_of_seats") myf = FRS("no_of_seats") myf = myf - cmbpnrno.ListCount fare = fare * myf FRS.MoveFirst DISPFIELDS cancel.Label2.Visible = True cancel.Label3.Visible = True J = 0 For i = 0 To FRS.RecordCount - 1 cancel.TXTPNRNO(i).Visible = True cancel.TXTNAME(i).Visible = True cancel.TXTPNRNO(i).Text = FRS("pnr_no") cancel.TXTNAME(i).Text = FRS("name") J = J + 1 Load cancel.TXTPNRNO(i + 1) Load cancel.TXTNAME(i + 1) Y = Y + 600 cancel.TXTPNRNO(i + 1).Top = cancel.TXTPNRNO(i).Top + Y cancel.TXTNAME(i + 1).Top = cancel.TXTNAME(i).Top + Y FRS.MoveNext Next i cancel.Show cancel.TXTSEATS.Text = myf cancel.TXTFARE = fare storeticket = TXTTICKETNO.Text FLIGHTNUMBER.Hide End IfCN.Execute ("DELETE FROM TICKETDETAILS WHERE TICKET_NO=" & "'" & ourTICKET & "'")FRS.CloseEnd Sub

Private Sub cancelprint_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)cancelprint.ForeColor = vbGreenEnd Sub

Private Sub cmbpnrno_Click()Set ticketrs = CN.Execute("SELECT NO_OF_SEATS,FLIGHT_NO,TOTAL_FARE FROM TICKETDETAILS WHERE TICKET_NO=" & "'" & ticketno1.TXTTICKETNO & "'")TXTSEATS.Text = ticketrs("NO_OF_SEATS")TXTFARE.Text = ticketrs("TOTAL_FARE")TXTFLIGHTNO.Text = ticketrs("FLIGHT_NO")ticketrs.CloseSet resrs = CN.Execute("SELECT RES_DATE,RES_SECTOR,RES_CLASS,TICKET_NO,PAS_NAME FROM RESERVATION WHERE PNR_NO=" & "'" & cmbpnrno.Text & "'")TXTTICKETNO.Text = resrs("TICKET_NO")txtdate.Text = resrs("RES_DATE")TXTSECTOR.Text = resrs("RES_SECTOR")TXTCLASS.Text = resrs("RES_CLASS")TXTNAME.Text = resrs("PAS_NAME")resrs.CloseEnd Sub

Private Sub Form_Activate()CN.Provider = "MicroSoft.Jet.OLEDB.3.51"CN.ConnectionString = "C:\Program files\Microsoft Visual Studio\VB98\RESERVATION.mdb"CN.Openresrs.CursorLocation = adUseClientresrs.Open " SELECT * from RESERVATION where ticket_no= " & " '" & ticketno1.TXTTICKETNO & "' ", CN, adOpenDynamic For i = 1 To resrs.RecordCount cmbpnrno.AddItem resrs("PNR_NO") resrs.MoveNext Nextresrs.CloseEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)NO.ForeColor = Label1.ForeColorYES.ForeColor = Label1.ForeColorLBLYES.ForeColor = Label1.ForeColorLBLNO.ForeColor = Label1.ForeColorcancelprint.ForeColor = Label1.ForeColorEnd Sub

Private Sub Form_Unload(cancel As Integer)Unload ticketno1CN.CloseEnd SubPrivate Sub LBLNO_Click()FLIGHTNUMBER.cancelprint.Visible = TrueLBLYES.Visible = FalseLabel9.Visible = FalseLBLNO.Visible = FalseEnd SubPrivate Sub LBLNO_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)LBLNO.ForeColor = vbGreenEnd SubPrivate Sub LBLYES_Click() With FLIGHTNUMBER .YES.Visible = True .NO.Visible = True .Label4.Visible = True .cmbpnrno.Enabled = True '.cancelprint.Visible = True .Label9.Visible = False .LBLNO.Visible = False .LBLYES.Visible = False End WithEnd SubPrivate Sub LBLYES_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)LBLYES.ForeColor = vbGreenEnd SubPrivate Sub NO_Click()Unload ticketno1Unload FLIGHTNUMBERAIRWAYSRESERVATION.ShowEnd SubPrivate Sub NO_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)NO.ForeColor = vbGreenEnd SubPrivate Sub YES_Click()Dim X As IntegerDim Y As Integer If cmbpnrno.Visible = False Then flightRS.Open "FLIGHTDETAILS", CN, adOpenDynamic, adLockOptimistic ticketrs.Open "TICKETDETAILS", CN, adOpenDynamic, adLockOptimistic FRS.Open "FLIGHTNUMBER", CN, adOpenDynamic X = flightRS("BAL_SEATS") + Val(TXTSEATS.Text) MYTICKET = TXTTICKETNO.Text CN.Execute ("INSERT INTO FLIGHTNUMBER(RES_CLASS,FLIGHT_NO,TICKET_NO,RES_SECTOR,RES_DATE,TOTAL_FARE,NO_OF_SEATS) VALUES(" & " '" & TXTCLASS.Text & "','" & TXTFLIGHTNO.Text & "','" & TXTTICKETNO.Text & "','" & TXTSECTOR.Text & "','" & txtdate.Text & "','" & TXTFARE.Text & "','" & TXTSEATS.Text & "')") CN.Execute ("DELETE FROM TICKETDETAILS WHERE TICKET_NO=" & "'" & TXTTICKETNO.Text & "'") CN.Execute ("UPDATE FLIGHTDETAILS SET BAL_SEATS=" & "' " & X & "' WHERE FLIGHT_NO=" & "'" & TXTFLIGHTNO.Text & "'") CN.Execute ("DELETE FROM RESERVATION WHERE TICKET_NO=" & "'" & TXTTICKETNO.Text & "'") BLANKFIELDS 'cancelprint.Visible = True flightRS.Close ticketrs.Close FRS.Close ElseIf cmbpnrno.Visible = True Then ticketrs.Open "TICKETDETAILS", CN, adOpenDynamic flightRS.Open "FLIGHTDETAILS", CN, adOpenDynamic, adLockOptimistic X = flightRS("BAL_SEATS") + 1 Y = ticketrs("NO_OF_SEATS") - 1 ourTICKET = TXTTICKETNO.Text MYTICKET = TXTTICKETNO.Text CN.Execute ("INSERT INTO FLIGHTNUMBER(RES_CLASS,FLIGHT_NO,TICKET_NO,RES_SECTOR,RES_DATE,TOTAL_FARE,NO_OF_SEATS,PNR_NO,NAME) VALUES(" & " '" & TXTCLASS.Text & "','" & TXTFLIGHTNO.Text & "','" & TXTTICKETNO.Text & "','" & TXTSECTOR.Text & "','" & txtdate.Text & "','" & TXTFARE.Text & "','" & TXTSEATS.Text & "','" & cmbpnrno.Text & "','" & TXTNAME.Text & "')") CN.Execute ("UPDATE TICKETDETAILS SET NO_OF_SEATS=" & "'" & Y & "' WHERE TICKET_NO=" & "'" & TXTTICKETNO.Text & "'") CN.Execute ("DELETE FROM RESERVATION WHERE PNR_NO=" & "'" & cmbpnrno.Text & "'") CN.Execute ("UPDATE FLIGHTDETAILS SET BAL_SEATS=" & "'" & X & "' WHERE FLIGHT_NO=" & "'" & TXTFLIGHTNO.Text & "'") cmbpnrno.RemoveItem (cmbpnrno.ListIndex) ticketrs.Close flightRS.Close BLANKFIELDS With FLIGHTNUMBER .Label9.Visible = True .LBLNO.Visible = True .LBLYES.Visible = True .YES.Visible = False .NO.Visible = False .Label4.Visible = False ' .cancelprint.Visible = True .cmbpnrno.Enabled = False End With If cmbpnrno.ListCount = 0 Then With FLIGHTNUMBER .LBLNO.Visible = False .LBLYES.Visible = False .Label9.Visible = False .cancelprint.Visible = True End With End If End IfEnd Sub

Private Sub YES_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)YES.ForeColor = vbGreenEnd Sub

Public Function BLANKFIELDS()TXTNAME.Text = ""TXTFARE.Text = ""TXTSECTOR.Text = ""TXTCLASS.Text = ""TXTFLIGHTNO.Text = ""TXTSEATS.Text = ""txtdate.Text = ""TXTTICKETNO.Text = ""End FunctionPublic Function DISPFIELDS() With cancel .TXTCLASS.Text = FRS("res_class") .txtdate.Text = FRS("res_date") .TXTFARE.Text = FRS("total_fare") .TXTFLIGHTNO.Text = FRS("flight_no") .TXTSEATS.Text = FRS("no_of_seats") .TXTSECTOR.Text = FRS("res_sector") .TXTTICKETNO.Text = FRS("ticket_no") End WithEnd Function

CHANGE ADMINISTRATOR PASSWORDDim CN As New ConnectionDim ARS As New RecordsetDim MYPWD As StringPrivate Sub Form_Load()CN.Provider = "MICROSOFT.JET.OLEDB.3.51"CN.ConnectionString = "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VB98\RESERVATION.mdb"CN.OpenARS.Open "ADMINPASSWORD", CN, adOpenDynamicEnd SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblchange.ForeColor = Label1.ForeColorlblcancel.ForeColor = Label1.ForeColorEnd SubPrivate Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)CN.CloseEnd Sub

Private Sub lblcancel_Click()Unload CHANGEADMINEnd SubPrivate Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = vbGreenEnd SubPrivate Sub lblchange_Click() If txtoldpwd.Text = "" Then MsgBox "Enter old password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtoldpwd.SetFocus Exit Sub ElseIf txtnewpwd.Text = "" Then MsgBox "Enter new password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtnewpwd.SetFocus Exit Sub ElseIf txtconfirmpwd.Text = "" Then MsgBox "Enter confirm password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtconfirmpwd.SetFocus Exit Sub ElseIf txtconfirmpwd.Text txtnewpwd.Text Then MsgBox "Reconfirm your password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtconfirmpwd.SetFocus Exit Sub ElseIf txtconfirmpwd.Text = txtnewpwd.Text Then CN.Execute ("update ADMINPASSWORD set PASSWORD=" & "'" & txtconfirmpwd.Text & "'") MsgBox "Your password has been changed.", vbSystemModal + vbInformation, "PASSWORD CHANGED" End IfEnd Sub

Private Sub lblchange_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblchange.ForeColor = vbGreenEnd Sub

Private Sub txtnewpwd_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtconfirmpwd.SetFocus End IfEnd Sub

Private Sub txtoldpwd_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call txtoldpwd_LostFocus End IfEnd SubPrivate Sub txtoldpwd_LostFocus()MYPWD = ARS("PASSWORD") If txtoldpwd.Text MYPWD Then MsgBox "Password can't be changed, old password doen't matches, reenter your password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtoldpwd = "" txtoldpwd.SetFocus ElseIf txtoldpwd.Text = MYPWD Then txtnewpwd.SetFocus End IfEnd SubPrivate Sub txtusername_KeyPress(KeyAscii As Integer)If KeyAscii = 13 Then txtoldpwd.SetFocus End IfEnd Sub

CHANGE USER PASSWORD

Dim CN As New ConnectionDim urs As New RecordsetDim MYPWD As String

Private Sub Form_Load()CN.Provider = "MICROSOFT.JET.OLEDB.3.51"CN.ConnectionString = "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VB98\RESERVATION.mdb"CN.Openurs.Open "PROJECTPASSWORD", CN, adOpenDynamicEnd Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblchange.ForeColor = Label1.ForeColorlblcancel.ForeColor = Label1.ForeColorEnd SubPrivate Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)CN.CloseEnd SubPrivate Sub Label2_Click()End SubPrivate Sub lblcancel_Click()Unload CHANGEUSEREnd SubPrivate Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblcancel.ForeColor = vbWhiteEnd SubPrivate Sub lblchange_Click() If txtoldpwd.Text = "" Then MsgBox "Enter old password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtoldpwd.SetFocus Exit Sub ElseIf txtnewpwd.Text = "" Then MsgBox "Enter new password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtnewpwd.SetFocus Exit Sub ElseIf txtconfirmpwd.Text = "" Then MsgBox "Enter confirm password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtconfirmpwd.SetFocus Exit Sub ElseIf txtconfirmpwd.Text txtnewpwd.Text Then MsgBox "Reconfirm your password.", vbSystemModal + vbInformation, "PASSWORD ERROR" txtconfirmpwd.SetFocus Exit Sub ElseIf txtconfirmpwd.Text = txtnewpwd.Text Then CN.Execute ("update projectpassword set PASSWORD=" & "'" & txtconfirmpwd.Text & "'") MsgBox "Your password has been changed.", vbSystemModal + vbInformation, "PASSWORD CHANGED" End IfEnd SubPrivate Sub lblchange_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)lblchange.ForeColor = vbWhiteEnd SubPrivate Sub txtnewpwd_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtconfirmpwd.SetFocus End IfEnd SubPrivate Sub txtoldpwd_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtnewpwd.SetFocus End IfEnd SubPrivate Sub txtoldpwd_LostFocus()MYPWD = urs("PASSWORD") If txtoldpwd.Text MYPWD Then MsgBox "Password can't be changed, old password doen't matches, reenter old password", vbSystemModal + vbInformation, "PASSWORD ERROR" txtoldpwd.Text = "" txtoldpwd.SetFocus ElseIf txtoldpwd.Text = MYPWD Then txtnewpwd.SetFocus End IfEnd SubPrivate Sub txtusername_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txtoldpwd.SetFocus End IfEnd Sub

ABOUT USPrivate Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)Unload aboutusEnd SubPrivate Sub Timer1_Timer()Label2.Top = Label2.Top - 100Label3.Top = Label3.Top - 100Label4.Top = Label4.Top - 100Label5.Top = Label5.Top - 100 If Label2.Top < aboutus.Top And Label3.Top < aboutus.Top And Label4.Top < aboutus.Top And Label5.Top < aboutus.Top Then Label2.Top = aboutus.Height Label3.Top = aboutus.Height Label4.Top = Label2.Top + 480 Label5.Top = Label4.Top + 360 End IfEnd Sub

During system testing, the system is used experimentally to ensure that the software does not fall, i.e. it will run according to specification and in the way users expect. Special test data input for processing and the result examination. A limited number of users may be allowed to use the system so that analysis can seen whether they use it in unforeseen ways. It is preferable to discover any surprises the organization implements the system and encounters them later on. This type of testing which allows only a few, selected users to work on the system is known as BETA TESTING. On the other hand the testing done by the developer (s), themselves is known as ALPHA TESTING.Testing is generally performed by persons other than those who the original programs to ensure complete and unbiased testing and more reliable software.The norms followed during the testing phase were thoroughly tested by me, the developer, I was required to release the programs source code. The source code was copied into the area. If some changes were desired in the program, I was suitably informed and was required to made the necessary modifications.Following testing procedures were used

UNIT TESTINGUnit testing is the testing of a single program module in an isolated environment. The testing of the processing procedure is the main focus. In this regard, all the modules were separately tested first as isolated and complete entities. This helped a lot in discovering problems related to a single module and rectifying them in the contest of the module itself, rather than considering module-related problem in a global context.

INTEGRATION TESTINGIntegration testing is the process of testing the interfaces among system modules. Some testing ensures that data moves between system as intended. In the regard of a particular module was obtained in correct format, so that the next module could accept it appropriately. This could be done either after the entire system was developed, or in stages than one module was developed.

SYSTEM TESTINGSystem testing is the testing of the system against its initial objectives. Such testing is done either in a simulated environment or in a live environment.In the case of the system which I developed, the testing was done in a pseudo-real environment. The organization has an area called the Development , where all development work is carried out, whereas the Client is the area where all on-line work is undertaken. Since the kind of work which I was involved dealt with insertion, updating and in tables, all the work was developed in the Development area. I call the environment pseudo-real since all data which is being used for on-line transaction can be copied into the tables of the Development and live data can be worked on. Thus whatever would be the output on the Client is reflected exactly on the Development also. Thus, discovery of error became simpler in that the errors which would occurs in the real-time environment were exactly duplicated in the Development environment. All the above types of testing were carried out and various extreme cases were also introduced to check for whether the system responded as expected. The various Forms, database packages, procedures, function; visual basic programs and functions were tested to discover they behaved in the manner expected of them and gave accurate results. However, the factor, which helped most in the modification and rectification of the system, was the user response. The user after using the system would invariably come up with some idea to improve the system. Such ideas, if feasible, were incorporated into the system, thus leading to an improvement in the overall efficiency of the system.

Implementation, literally, means to put into effect or to carry out. The system implementation phase of software engineering deals with all activities that take place to convert from the old system to the new. Proper implementation is essential to provide system to meet organizations requirements.During the implementation phase debugging, documentation of the system was created out, module in the project for

Accuracy of Results, Minimization of response Time, Clarity and Simplicity of the code, Minimization of Hard Coding i.e. (a generic approach was followed ) Minimization of amount of memory used.

Various types of errors were discovered while debugging the modules. These ranged from errors to failure to account for various processing cases. Proper documentation of each module was done by embedding comments in the executable portion of the code. To enhance the readability, comments, indentation, parenthesis, black spaces, blank lines and borders were around the blocks of comments. Care was taken to use descriptive names for table, field, modules, forms etc., The proper use of indentation, parenthesis and blank lines was also ensured during coding.Testing of the Report Generation module was carried out to find out the response time of the system for the generating reports. To make the response time negligible

Maintenance is a fact of life in the development of information systems. However the making of changes & adjustments dont necessarily signal correction of error or the occurrence of problems.Among the most frequent changes requested by end users is the addition of information to a report format. Information requirements may be revised as the result of system usage or changing operational needs. Perhaps oversights that occurred during the development process need to be corrected.Often, the need arises to capture additional data for storage in a database or perhaps when it is necessary to add error detection features to prevent system users from inadvertently taking an unwanted action.

These are the realities of application maintenance, when they occur, however they are an indication that the system is being used & that it is serving a useful function rather than being shelved by the intended, such as : More accurately defining the users requirements during system development. Assembling better systems documentation. Making better use of existing tools & techniques. Including proper comments.

Documentation is the process of collecting, organizing, storing and maintaining on paper (or some relatively permanently medium ) a complete record of why application were developed, for whom , what function they perform, and how these functions are carried out. Thus it provides an explanation of how a system operates & what feature characterize models & algorithms. Producing documentation is an important but often neglected activity of programmers.Documentation of the system always reduces maintenance costs and makes maintenance much more easier. Documentation can be broadly classified as :1. INTERNAL DOCUMENTATION2. EXTERNAL DOCUMENTATION

INTERNAL DOCUMENTATIONInternal documentation in the code can be extremely useful in enhancing the understandability of programs. Internal documentation of programs is done by the use of comments. All the languages provide means of writing comments in the programs. Comments are textual statements that are meant for the reader and are not executed. Comments , if properly written, and if kept consistent with the code, can be invaluable during maintenance.The purpose of comments is not to explain the internal logic of the program the program itself is the best documentation for the details of logic. The comments should explain what the code is done is doing, and not how it is done it.Comments should be provided for the block of code, particularly those parts of code which are hard to follow.Providing comments for module is most useful as module form the unit testing , compiling , verification and modification. Comments for a module are often called prologue for the module. It is best to standardized the structure of the prologue of the module. It is desirable that prologue contains the following information :a) Module functionality or what the module is doingb) Parameters are their purposec) Assumptions about the input, if anyd) Global variable accessed and or modified in the moduleAs explanation of parameters ( whether they are input only, output only or both input and output , why they are needed by the module and how the parameters are modified ) can be quite useful during maintenance.In addition to that given above , often information can be included, depending on the local coding standards. Example include : Name of the author, Date of compilation Last date of modification.Note that if the module is modified, then the prologue should also be modified, if necessary. A prologue that is inconsistent with the internal logic of the module is prologue worse than having no prologue at all. While coding programs for the Station Coding System special attention has been paid to the internal documentation of the system, in addition to the external documentation. Each program/module has :

Program/module name on top Date of creation of the program Last modification date The S/W tool used to developed the program Description of input to the program/module Description of the output produced How the module is related to other modules Purpose of variables/constants used

Apart from this comment lines have been inserted wherever it was felt that they were necessary. Moreover meaningful variable names/constants have been assigned to different variable/constants used in the programs.

The project made me realize the significance of developing software for client, where all the eventualities have to be taken care of, unlike at educational institution, where the sole aim is to learn. What may be seen to the developed to be a software complete in all respects, I was required to meet the stringent demands of the in-house client in the materials department. Through this seemed tough at first, I realized that pressure goaded us on to develop better and better applications.During the project, the real importance for following all the principle of System Analysis and Design drawled on me. I felt the necessity of going through the several stages, because only such a process could make one understand the problems at hand, more so due to the enormous size of data stores involved and their manipulationIn retrospect, I would like to say that the institute provided us with sample opportunities to learn Oracle 8 and its tools. I specifically was able to learn MS-ACCESS and its Tools. I specially was able to learn VISUAL BASIC 6.0. I also succeeded in understanding a number of tricky concept in database, which were earlier only hazy blobs in the realm of our comprehension.However my project library management is an asset to the organization, even then FURTHER ENHANCEMENT are possible in this project such as new forms & reports can be included as and when required.Unfortunately due to lack of time we can developed any report in this system but this is not the end of this system software, it is beginning. We can change and modify this software due to more requirement of needs and also removed some errors which is finding in this system software. We also developed some complex reports which is required and makes this software more powerful and friendly for user by which user can handle library data more easily and can calculate all the calculation without any other software i.e., users all the requirements will be fulfill by this software and user can manage all the numeric data calculations.

S.No.TermsDescription

1BACK UPA copy of something preserved to insure against the damage of primary copy.

2DATA BASEA repository of stored data.

3DBMSData Base Management System is a layer if Software between the physical database itself & the users of the system.

4DDData Dictionary, which is a data base that Contains data about data i.e. description of other in the system

5FLOW CHARTFLOW CHART which depicts relation between different entities in the system.

6HARDWAREThe physical equipment in a system comprising of computers, terminals, Keyboards & Other ancillary items.

7ITDInformation Technology Division.

8MENUA group of options from which Selection is to be made.

9MODULEA small components of a larger system

10ON-LINEA term describing people, equipment or Devices that are in direct communication with the computer

11PIPreliminary Investigation

12PROGRAMA sequence of instruction given to the Computer to solve a particular problem.

13PROTOTYPEA development model of the system for test Purpose

14RDBMSA data Base/ Management System in which Relationships are defined by tables.

15RSDRequirement Specification Document.

16SCALABILITYThe ability to increase the performance With the growth in Hardware.

17SOFTWAREComputer program, procedure & Associated documentation concerned with the operator of a system.

BOOK NAMEAUTHOR

1. Complete Reference of MS-OfficeTechmedia2. An Introduction to Database SystemsC. J. Date3. System Analyses and Design E M. Awad4. The Complete VISUAL BASICTulec5. Programming in VBP.K.M Bride6. Visual Basic from the Ground UpGary Cornell7. Mastering in VBSteve 8. VB with MS-AccessRita Sahoo9. Visual Basic 6.0Smith

A

ON

Submitted in partial fulfillment of the requirement for the award of Degree ofBACHELOR OF COMPUTER APPLICATION (BCA)

SUBMITTED TODepartment of Computer Science

SUBMITTED TO SUBMITTED BYMR. PRAMOD SHARMAAARTI ASTHANAANUSHRI AGGARWALVINAY BHARDWAJ SUBMITTED ATSHRI RAM GROUP OF COLLEGES

I would like to take this opportunity to express my gratitude towards all the people who have in various ways, helped in the successful completion of my project. I must convey my gratitude to Mr. PRAMOD SHARMA for giving me the constant source of inspiration and help in preparing the project, personally correcting my work and providing encouragement throughout the project.I also thank all my faculty members for steering me through the tough as well as easy phases of the project in a result oriented manner with concern attention.

DATE: 14-06-2007AARTI ASTHANAANUSHRI AGGARWALVINAY BHARDWAJ

DECLARATIONWE ARE THE STUDENT OF BCA STUDENTS 6TH SEM SHRI RAM COLLEGE MUZAFFARNAGAR (AFFILATED TO CCS UNIVERSITY MEERUT). HERE BY DECLARE THAT THE PROJECT REPORT ON MULTIPLEX TICKET BOOKING SYSTEM IS OUR ORIGINAL WORK WE ALSO DECLARE THAT WE HAVE DONE OUR WORK SELF ACCURATELY EVEN THEN IF OVER MISTAKE OR ERROR HAD KEPT IN, WE REQUEST TO OUR FACULTIS TO POINTS OUT THESE ERROR AND GUIDE OUR TO REMOVE THESE ERROR FOR OUR FUTURE. WE ARE ALSO THANKS FUL FOR OUR FACULTIES.

AARTI ASTHANAANUSHRI AGGARWALVINAY BHARDWAJ

CERTIFICATEThis is to certify that the Project Report entitled MULTIPLEX TICKET BOOKING SYSTEM is the bona fide project work carried out by Mr., students of BCA, SHRI RAM COLLEGE, Muzaffarnagar during the year 2009, in partial fulfillment of the requirements for the award of the Degree of Bachelor of Computer Application and that the project report has not formed the basic for the award previously of any degree, diploma or any other similar title.

Place: MUZAFFARNAGARDate:Signature of the Guide

Title (cover page) Title of the Project Acknowledgement Certificate from Study Center Contents Introduction System Objectives Problem Definition Project Analysis Feasibility study Cost & benefit analysis Project Design System Analysis Design Hints & Guidelines System Design & Development System Design System Development Data Structure Diagram Tables Description Coding System Evaluation and Testing System Implementation System Maintenance System Documentation GLOSSARY CONCLUSION BIBLOGRAPHY

The name of the software developed is Multiplex Management system. It is specifically for management purposes. The main aim of the system is to keep the daily record of the multiplex.

There has been lot of problems in the past with the existing manual system. Therefore, this system will replace the existing manual system to an automated system. By using this system we can syste