pre-feasibility report feasibility report feasibility report
Report
-
Upload
ranaindia2011 -
Category
Documents
-
view
2 -
download
0
description
Transcript of Report
A
ON
Submitted in partial fulfillment of the requirement for the award of Degree of
BACHELOR OF COMPUTER APPLICATION (BCA)
SUBMITTED TO
SUBMITTED BY
MR. PRAMOD SHARMA
AARTI ASTHANA
ANUSHRI AGGARWAL
VINAY BHARDWAJ
SUBMITTED AT
SHRI 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-2007
AARTI ASTHANA
ANUSHRI AGGARWAL
VINAY BHARDWAJ
DECLARATION
WE 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 ASTHANA
ANUSHRI AGGARWAL
VINAY 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: MUZAFFARNAGAR
Date:
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 systematically keep records about the customers and tickets.
Multiplex control system process data reflecting changes to tickets. Once data about customer ticket is received from any customer a computer based multiplex control system records changes to multiples levels and prepares appropriate documents. Then it may notify managers about tickets that need recording and provide them with a variety of status reports. Computer based multiplex control system thus help a business; provide high quality service to customer while minimizing manpower in multiplex and their carrying costs.
The Multiplex Ticket Booking System is a software application to assist a Multiplex with transactions related to making ticket booking, which includes adding new movies details.
We need to develop multiplex management software because now- a- days to manage multiplex system manually becomes more critical, because of the great crowd in multiplexes .It is necessary to manage the multiplex system with the help of a software, which can easily manage the working of any multiplex such as to keeping details of the tickets, the categories of the movies shown on the multiple screens in a single time. Which movie is shown on which screen on a particular time/show. The customer wants golden ticket or silver ticket etc. He or she wants single or family ticket. Are there seats left or all the seats are booked. To check the advance ticket booking etc. To keep the details of the employees .It is easy to manage all these things with the help of software instead of manually.
From the viewpoint of the Multiplex -
Proper arrangement of control on distribution of tickets.
Proper control of issuing of tickets.
Decrease in cost of manpower.
No investment of unnecessary capital
Moral effect on employees
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 Multiplex
A few factors that direct us to develop a new system are given below -:
1) Faster System
2) Accuracy
3) Reliability
4) Informative
5) Adding new movies detail.
FEASIBILITY STUDY:-
Feasibility study before development or customization of software we think following of the major points, which includes following: -
a) Economical
b) Technical
c) 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 compression 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.
Receiver Customer Request
Flight Maintenance,
Receiver Customer Request
Booking , Cancellling Passenger List
Confirmed List
Data Storage Data Access Ticket Passenger List,
Reservation Fleet info
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 an 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 come 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 affect 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 consolidated
Identifying 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 Rule
3. Check Validation Text
4. Primary Keys
5. Unique Keys
6. 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.else
Visual Basic helps of creation Menus, Master-Details Form.
MS-ACCESS 2007 used as BACK END
Ms-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
PASSWORDText
MOVIES DETAIL:-
InDateOutDateMNameTheaterNoCollection
5/6/20095/7/2009RAAZ23$0.00
5/6/20095/7/2009DIL1$1,425.00
5/6/20095/7/2009AWARAPAN2$0.00
5/6/20095/6/2009DHOOM3$1,710.00
5/6/20095/6/2009RAAZ2$570.00
5/7/20095/7/2009AAA2$1,026.00
5/7/20095/7/2009MAD1$855.00
5/7/20095/7/2009WAQT3$0.00
TICKET DETAIL :-
THEATER DETAILS:Theater
TheaterNoCapacityShow1Show2Show3Show4Show5
167212:00:00 PM12:00:00 AM12:00:00 AM12:00:00 AM12:00:00 AM
26729:00:00 AM12:00:00 AM12:00:00 AM12:00:00 AM12:00:00 AM
36729:00:00 AM12:00:00 PM12:00:00 AM12:00:00 AM12:00:00 AM
BOOKING DETAIL:
Booking
SeatNoTheaterNoShowDateShowTimeBookingTypeAmountEnterTaxServiceTaxTotal
A000A001A002A003B003B00421/29/20078:45:00 AMA$600.00$60.00$24.00$684.00
A000A001A002B000B001B002C000C001C00211/28/20078:40:00 AMC$900.00$90.00$36.00$1,026.00
F006F00721/30/200711:15:00 AMA$300.00$30.00$12.00$342.00
P041P04031/29/200710:30:00 AMC$500.00$50.00$20.00$570.00
I018I020A010A01131/31/200710:30:00 AMC$400.00$40.00$16.00$456.00
A004A005A007A008A009A010B000B001A011A012F000F00111/31/200710:15:00 AMC$1,800.00$180.00$72.00$2,052.00
A000A00112/20/200710:15:00 AMA$200.00$20.00$8.00$228.00
A005A00722/19/200710:00:00 AMC$200.00$20.00$8.00$228.00
A005A007A000A00122/19/200710:00:00 AMC$400.00$40.00$16.00$456.00
A000112/7/200810:15:00 AMC$100.00$10.00$4.00$114.00
L000L001L003L002L00431/16/200210:00:00 AMC$1,250.00$125.00$50.00$1,425.00
G000G009G010G007G003G002G00124/20/200912:00:00 PMA$1,050.00$105.00$42.00$1,197.00
F000F001F003F002F00421/18/200212:00:00 PMC$750.00$75.00$30.00$855.00
G000G005G006G009G011G015G018G023G025H02926/5/200912:00:00 PMC$1,500.00$150.00$60.00$1,710.00
H001H003H007H009H013H016I01836/5/200912:00:00 PMC$1,050.00$105.00$42.00$1,197.00
G000G002G005G006H011H014H019H026H035H03936/5/200912:00:00 PMC$1,500.00$150.00$60.00$1,710.00
L000L001L002L003L005L004L00627/5/200912:00:00 PMC$1,750.00$175.00$70.00$1,995.00
M002M004M006M009M013B000B003B008B011C026B03117/5/200912:00:00 PMC$1,100.00$110.00$44.00$1,254.00
G002G007G012G024G031G03627/5/20099:00:00 AMC$900.00$90.00$36.00$1,026.00
G003G009G014G019G02318/5/200912:00:00 PMA$750.00$75.00$30.00$855.00
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 passwordABOUT 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.Show
USERPWD.Show
End Sub
LOGIN FORM
Option Explicit
Dim CN As New Connection
Dim LRS As New Recordset
Dim MYPWD As String
Public LoginSucceeded As Boolean
Private Sub Form_Activate()
txtPassword.SetFocus
End Sub
Private Sub Form_Load()
CN.Provider = "MICROSOFT.JET.OLEDB.3.51"
CN.ConnectionString = "C:\Program files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
CN.Open
LRS.Open "projectpassword", CN, adOpenDynamic
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblok.ForeColor = Label1.ForeColor
lblcancel.ForeColor = Label1.ForeColor
End Sub
Private Sub lblcancel_Click()
LoginSucceeded = False
Unload USERPWD
End Sub
Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = vbYellow
End Sub
Private 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 If
End Sub
Private Sub lblok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblok.ForeColor = vbYellow
End Sub
Private Sub txtusername_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtPassword.SetFocus
End If
End Sub
AIRWAYS RESERVATION
Private Sub MNUABOUTUS_Click()
aboutus.Show
End Sub
Private Sub MNUADMIN_Click()
ADMINPWD.Show
End Sub
Private Sub MNUCA_Click()
COUNTERASSISTANT.Show
End Sub
Private Sub MNUCANCEL_Click()
CANCELLATION.Show
End Sub
Private Sub MNUCHANGEADMIN_Click()
CHANGEADMIN.Show
End Sub
Private Sub MNUCHANGEUSER_Click()
CHANGEUSER.Show
End Sub
Private Sub MNUEXIT_Click()
End
End Sub
COUNTER ASSISTANT
Dim CN As New Connection
Dim rs1 As New Recordset
Dim totalseats As Integer
Dim RS As New Recordset
Private Sub cmbflightno_Click()
Set rs1 = CN.Execute("select res_sector from flightdetails where flight_no=" & " '" & cmbflightno.Text & "'")
TXTSECTOR.Text = rs1("res_sector")
rs1.Close
End Sub
Private Sub cmbflightno_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
CMBRESCLASS.SetFocus
End If
End Sub
Private Sub CMBRESCLASS_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTSEATS.SetFocus
End If
End Sub
Private Sub Form_Activate()
rs1.CursorLocation = adUseClient
rs1.Open "flightdetails", CN, adOpenDynamic
For i = 1 To rs1.RecordCount
cmbflightno.AddItem rs1("flight_no")
rs1.MoveNext
Next
CMBRESCLASS.AddItem "EXECUTIVE"
CMBRESCLASS.AddItem "ECONOMIC"
rs1.Close
End Sub
Private Sub Form_Load()
On Error GoTo BLANK
CN.Provider = "Microsoft.Jet.OLEDB.3.51"
CN.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
CN.Open
OPTCANCEL.Value = False
BLANK:
If Err.Number = 3021 Then
MsgBox "There is no record.", vbInformation + vbSystemModal, "RECORD NOT AVAILABLE"
OPTCANCEL.Value = False
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ok.ForeColor = Label1.ForeColor
OPTCANCEL.ForeColor = Label1.ForeColor
End Sub
Private Sub ok_Click()
Dim STORE As Integer
Dim mystore As Integer
rs1.Open "flightdetails", CN, adOpenDynamic
Set rs1 = CN.Execute("select bal_seats from flightdetails where flight_no= " & " '" & cmbflightno & "' ")
mystore = rs1("bal_seats")
STORE = rs1("bal_seats") - TXTSEATS.Text
CN.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 If
RESERVATION.Show
COUNTERASSISTANT.Hide
rs1.Close
End Sub
Private Sub ok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ok.ForeColor = vbYellow
End Sub
Private Sub OPTCANCEL_Click()
Unload COUNTERASSISTANT
End Sub
Private Sub OPTCANCEL_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
OPTCANCEL.ForeColor = vbYellow
End Sub
Private Sub TXTRESDATE_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbflightno.SetFocus
End If
End Sub
Private Sub txtresdate_LostFocus()On Error GoTo RAK
Dim STR As Date
Dim STR1 As String
Dim STORE As Integer
STORE = 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 If
RAK:
If Err.Number = 13 Then
MsgBox "Enter in date format.", vbSystemModal + vbInformation, "DATE ERROR"
TXTRESDATE.SetFocus
End If
End Sub
Private Sub TXTSEATS_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call TXTSEATS_LostFocus
ok.Enabled = True
End If
End Sub
Private 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 If
End Sub
Public Function BLANKFIELDS()
TXTRESDATE.Text = ""
TXTSECTOR.Text = "SECTOR"
TXTSEATS.Text = ""
End Function
RESERVATION
Dim CN As New Connection
Dim RS As New Recordset
Dim flightRS As New Recordset
Dim ticketrs As New Recordset
Dim X As Integer
Private Sub Form_Activate()
MsgBox "Enter details of passengers.", vbInformation + vbSystemModal, "DETAIL INFORMATION"
DISPFIELDS
TXTNAME.SetFocus
TXTNAME.Locked = False
txtage.Locked = False
txtphoneno.Locked = False
txtaddress.Locked = False
txtpnrno.Text = ""
txtticketno.Text = ""
BLANKFIELDS
End Sub
Private Sub Form_Deactivate()
equalseats = 0
X = 0
End Sub
Private Sub Form_Load()
CN.Provider = "MicroSoft.Jet.OLEDB.3.51"
CN.ConnectionString = "C:\Program files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
CN.Open
RS.CursorLocation = adUseClient
End Sub
Public Function DISPFIELDS()
TXTRESDATE.Text = COUNTERASSISTANT.TXTRESDATE.Text
txtressector.Text = COUNTERASSISTANT.TXTSECTOR.Text
TXTCLASS.Text = COUNTERASSISTANT.CMBRESCLASS.Text
End Function
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LBLPRINT.ForeColor = Label1.ForeColor
LBLSAVE.ForeColor = Label1.ForeColor
End Sub
Private Sub LBLDELETE_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LBLDELETE.ForeColor = vbYellow
End Sub
Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
MsgBox "Please enter details", vbInformation + vbSystemModal, "Reservation"
cancel = 1
RESERVATION.Show
End If
End Sub
Private Sub LBLPRINT_Click()
Dim J As Integer
Dim X As Integer
Dim Y As Integer
RS.CursorLocation = adUseClient
Set 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 With
TICKET.Show
J = 0
RS.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 i
TICKET.Show
RESERVATION.Hide
ticketrs.Close
RS.Close
End Sub
Private Sub lblsave_Click()
Dim J As Integer
Dim A, count As Integer
Dim i As Integer
Dim TAKE As Integer
Dim take1 As Integer
Dim STR As String
Dim STR1 As String
Dim STORE As Integer
Dim check As Integer
Dim myval As Integer
Dim myphoneno$
Static equalseats As Integer
Dim totalfare As Single
RS.Open "RESERVATION", CN, adOpenDynamic, adLockOptimistic
flightRS.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 If
STORE = 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
Next
txtaddress.Text = z
txtaddress.Text = StrConv(txtaddress.Text, vbProperCase)
End Sub
Private Sub txtage_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call txtage_LostFocus
LBLSAVE.Enabled = True
End If
End Sub
Private Sub txtage_LostFocus()
Dim X As String
Dim length As Integer
Dim Y As Integer
Dim STR As String
Dim i As Integer
Dim z As Integer
STR = txtage.Text
length = 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
Next
End Sub
Private Sub txtcode_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtphoneno.SetFocus
End If
End Sub
Private Sub txtcode_LostFocus()
On Error GoTo RAK
Dim k As Integer
Dim i As Integer
Dim STR2 As String
Dim Y
Dim X As Integer
Dim CLENGTH As Integer
STR2 = txtcode.Text
CLENGTH = 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
Next
RAK:
If Err.Number = 13 Then
MsgBox "Enter correct code.", vbSystemModal + vbInformation, "CODE ERROR"
txtcode.SetFocus
End If
End Sub
Public Function BLANKFIELDS()
TXTNAME.Text = ""
txtage.Text = ""
txtaddress.Text = ""
txtphoneno.Text = ""
txtcode.Text = ""
End Function
Public 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 With
End Function
Private Sub txtname_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtaddress.SetFocus
End If
End Sub
Private Sub TXTNAME_LostFocus()
BLANK
End Sub
Public Function BLANK()
Dim X As String
Dim length As Integer
Dim STR1 As String
Dim Y As Integer
Dim z As String
Dim J As Integer
STR1 = TXTNAME.Text
z = 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
Next
TXTNAME = z
TXTNAME = StrConv(TXTNAME, vbProperCase)
End Function
Private Sub txtphoneno_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtage.SetFocus
End If
End Sub
Private Sub txtphoneno_LostFocus()
Dim X As String
Dim length As Integer
Dim i As Integer
Dim Y As Integer
Dim J As String
J = txtphoneno.Text
length = 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
Next
End Sub
TICKET
Dim resrs As New Recordset
Public rescn As New Connection
Private Sub Form_Load()
rescn.Provider = "Microsoft.Jet.OLEDB.3.51"
rescn.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
rescn.Open
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LBLPRINT.ForeColor = Label1.ForeColor
End Sub
Private Sub LBLPRINT_Click()
Set resrs = rescn.Execute("select * from TICKETDETAILS where TICKET_NO= " & " '" & txtticketno & "' ")
Set DataReport1.DataSource = resrs
DataReport1.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 With
DataReport1.Show
Unload TICKET
End Sub
Private Sub LBLPRINT_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LBLPRINT.ForeColor = vbGreen
End Sub
DATA REPORT 1
Private Sub DataReport_Terminate()
TICKET.rescn.Close
COUNTERASSISTANT.Show
End Sub
ADMINISTRATOR PASSWORD
Option Explicit
Dim CN As New Connection
Dim ARS As New Recordset
Dim MYPWD As String
Public LoginSucceeded As Boolean
Private Sub Form_Activate()
txtPassword.SetFocus
End Sub
Private Sub Form_Load()
CN.Provider = "MICROSOFT.JET.OLEDB.3.51"
CN.ConnectionString = "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VB98\RESERVATION.mdb"
CN.Open
ARS.Open "ADMINPASSWORD", CN, adOpenDynamic
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblok.ForeColor = Label1.ForeColor
lblcancel.ForeColor = Label1.ForeColor
End Sub
Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)
CN.Close
End Sub
Private Sub lblcancel_Click()
LoginSucceeded = False
Unload Me
End Sub
Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = vbWhite
End Sub
Private 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 If
End Sub
Private Sub lblok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblok.ForeColor = vbWhite
End Sub
Private Sub txtusername_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtPassword.SetFocus
End If
End Sub
FLIGHT DETAIL
Dim CN As New Connection
Dim RS As New Recordset
Private Sub cmbflightno_Click()
Set RS = CN.Execute("select * from flightdetails where flight_no=" & " '" & cmbflightno.Text & "' ")
DISPFIELDS
lblupdate.Enabled = True
RS.Close
End Sub
Private Sub Form_Load()
CN.Provider = "Microsoft.Jet.OLEDB.3.51"
CN.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
CN.Open
RS.CursorLocation = adUseClient
End Sub
Private Sub Form_Unload(cancel As Integer)
CN.Close
End Sub
Private Sub Frame4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblfind.ForeColor = Label1.ForeColor
lblmodify.ForeColor = Label1.ForeColor
lblsave.ForeColor = Label1.ForeColor
lblupdate.ForeColor = Label1.ForeColor
lblcancel.ForeColor = Label1.ForeColor
lblclose.ForeColor = Label1.ForeColor
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblfind.ForeColor = Label1.ForeColor
lblmodify.ForeColor = Label1.ForeColor
lblsave.ForeColor = Label1.ForeColor
lblupdate.ForeColor = Label1.ForeColor
lblcancel.ForeColor = Label1.ForeColor
lblclose.ForeColor = Label1.ForeColor
End Sub
Private Sub lblcancel_Click()
lblnew.Visible = True
lblsave.Visible = True
lblfind.Visible = True
lblcancel.Visible = False
lblupdate.Visible = False
lblmodify.Visible = True
BLANKFIELDS
cmbflightno.Visible = False
txtflightno.Visible = True
txtfare1.Locked = True
txtfare2.Locked = True
TXTDEPTTIME.Locked = True
txtseats1.Locked = True
txtseats2.Locked = True
lblclose.Visible = True
End Sub
Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = vbGreen
End Sub
Private 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 If
End Sub
Private Sub lblclose_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblclose.ForeColor = vbGreen
End Sub
Private Sub lblfind_Click()
FLIGHT.Hide
FIND.Show
End Sub
Private Sub lblfind_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblfind.ForeColor = vbGreen
End Sub
Private Sub lblmodify_Click()
Dim i As Integer
RS.Open "flightdetails", CN, adOpenDynamic
cmbflightno.Visible = True
txtflightno.Visible = False
cmbflightno.SetFocus
For i = 1 To RS.RecordCount
cmbflightno.AddItem RS("flight_no")
RS.MoveNext
Next i
lblnew.Visible = False
lblsave.Visible = False
lblfind.Visible = False
lblupdate.Visible = True
lblupdate.Enabled = False
lblcancel.Visible = True
lblmodify.Visible = False
TXTDEPTTIME.Locked = False
txtfare1.Locked = False
txtfare2.Locked = False
txtseats1.Locked = False
txtseats2.Locked = False
lblclose.Visible = False
RS.Close
End Sub
Private Sub lblmodify_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblmodify.ForeColor = vbGreen
End Sub
Private Sub lblnew_Click()
BLANKFIELDS
cmbflightno.Visible = False
txtflightno.Visible = True
TXTDEPTTIME.Locked = False
txtsector.Locked = False
txtfare1.Locked = False
txtfare2.Locked = False
txtseats1.Locked = False
txtseats2.Locked = False
txtsector.SetFocus
lblsave.Enabled = True
lblclose.Caption = "Cancel"
lblfind.Enabled = False
lblmodify.Enabled = False
lblclose.Enabled = True
End Sub
Private Sub lblnew_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblnew.ForeColor = vbGreen
End Sub
Private Sub lblsave_Click()
Dim i, k As Integer
Dim length As Integer
Dim STORE As Integer
Dim TAKE As Integer
Dim STR As String
Dim STR1 As String
Dim myflight As String
Dim 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 If
STORE = 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 If
RS.Close
End Sub
Private Sub lblsave_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblsave.ForeColor = vbGreen
End 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 = True
lblsave.Visible = True
lblfind.Visible = True
lblcancel.Visible = False
lblupdate.Visible = False
lblmodify.Visible = True
lblclose.Visible = True
txtfare1.Locked = True
txtfare2.Locked = True
TXTDEPTTIME.Locked = True
txtseats1.Locked = True
txtseats2.Locked = True
lblclose.Visible = T
End Sub
Private Sub lblupdate_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblupdate.ForeColor = vbGreen
End Sub
Private Sub TXTDEPTTIME_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtfare1.SetFocus
End If
End Sub
Private Sub TXTDEPTTIME_LostFocus()
Dim T As Integer
Dim J As Integer
Dim STR As String
Dim i As Integer
Dim X As String
Dim Y As Integer
Dim M As Integer
Dim length As Integer
STR = Format(TXTDEPTTIME.Text, "HH:MM")
If TXTDEPTTIME.Text STR Then
TXTDEPTTIME.SetFocus
MsgBox "Enter the correct time ", vbInformation + vbSystemModal, "TIME ERROR"
Exit Sub
End If
length = 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
Next
End Sub
Private Sub txtfare1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtfare2.SetFocus
End If
End Sub
Private Sub txtfare1_LostFocus()
Dim i As Integer
Dim length As Integer
Dim STR As String
Dim X
Dim Y As Integer
STR = txtfare1.Text
length = 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
Next
End Sub
Private Sub txtfare2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtseats1.SetFocus
End If
End Sub
Private Sub txtfare2_LostFocus()
Dim i As Integer
Dim length As Integer
Dim STR1 As String
Dim X As String
Dim Y As Integer
STR1 = txtfare2.Text
length = 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
Next
End Sub
Private Sub txtseats1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtseats2.SetFocus
End If
End Sub
Private Sub txtseats1_LostFocus()
Dim i As Integer
Dim length As Integer
Dim STR2 As String
Dim X As String
Dim Y As Integer
STR2 = txtseats1.Text
length = 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
Next
End Sub
Private Sub txtseats2_LostFocus()
Dim i As Integer
Dim length As Integer
Dim STR3 As String
Dim X As String
Dim Y As Integer
STR3 = txtseats2.Text
length = 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 If
If 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
Next
End Sub
Private Sub txtsector_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTDEPTTIME.SetFocus
End If
End Sub
Private Sub txtsector_LostFocus()
Dim i As Integer
Dim length As Integer
Dim STR2 As String
Dim X As String
Dim Y As Integer
Dim z As String
str4 = txtsector.Text
z = 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 i
txtsector = z
txtsector = StrConv(txtsector, vbProperCase)
End Sub
FIND
Dim CN As New Connection
Dim RS As New Recordset
Dim myvar As Integer
Private Sub Form_Load()
Dim i As Integer
CN.Provider = "Microsoft.Jet.OLEDB.3.51"
CN.ConnectionString = "C:\Program Files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
CN.Open
RS.CursorLocation = adUseClient
RS.Open "FLIGHTDETAILS", CN, adOpenDynamic, adLockOptimistic
For i = 1 To RS.RecordCount
cmbfind.AddItem RS("FLIGHT_NO")
RS.MoveNext
Next
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = Label2.ForeColor
lblok.ForeColor = Label2.ForeColor
End Sub
Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
myvar = 0
CN.Close
Unload Me
FLIGHT.Show
End If
End Sub
Private Sub Form_Unload(cancel As Integer)
If myvar = 1 Then
CN.Close
End If
End Sub
Private Sub lblcancel_Click()
MsgBox "The record can't be found.", vbSystemModal + vbInformation, "FIND CANCELLED"
myvar = 0
FLIGHT.Show
CN.Close
Unload Me
End Sub
Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = vbWhite
End Sub
Private Sub lblok_Click()
On Error GoTo RAK
Set RS = CN.Execute("select * from flightdetails where flight_no=" & " '" & cmbfind.Text & "' ")
DISPFIELDS
myvar = 1
FLIGHT.Show
Unload Me
RAK:
If Err.Number = 3021 Then
MsgBox "Flight No. does not exist", vbInformation + vbSystemModal, "FIND ERROR"
End If
End Sub
Private Sub lblok_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblok.ForeColor = vbWhite
End 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 = True
FLIGHT.txtsector.Locked = True
FLIGHT.TXTDEPTTIME.Locked = True
FLIGHT.txtfare1.Locked = True
FLIGHT.txtfare2.Locked = True
FLIGHT.txtseats1.Locked = True
FLIGHT.txtseats2.Locked = True
End Function
FLIGHT NUMBER
Dim CN As New Connection
Dim flightRS As New Recordset
Dim ticketrs As New Recordset
Dim resrs As New Recordset
Dim FRS As New Recordset
Dim MYTICKET As String
Dim ourTICKET As String
Private Sub cancelprint_Click()
Dim i As Integer
Dim myf As Integer
Dim fare As Integer
FRS.CursorLocation = adUseClient
FRS.Open "FLIGHTNUMBER", CN, adOpenDynamic
FRS.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 If
CN.Execute ("DELETE FROM TICKETDETAILS WHERE TICKET_NO=" & "'" & ourTICKET & "'")
FRS.Close
End Sub
Private Sub cancelprint_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
cancelprint.ForeColor = vbGreen
End 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.Close
Set 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.Close
End Sub
Private Sub Form_Activate()
CN.Provider = "MicroSoft.Jet.OLEDB.3.51"
CN.ConnectionString = "C:\Program files\Microsoft Visual Studio\VB98\RESERVATION.mdb"
CN.Open
resrs.CursorLocation = adUseClient
resrs.Open " SELECT * from RESERVATION where ticket_no= " & " '" & ticketno1.TXTTICKETNO & "' ", CN, adOpenDynamic
For i = 1 To resrs.RecordCount
cmbpnrno.AddItem resrs("PNR_NO")
resrs.MoveNext
Next
resrs.Close
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
NO.ForeColor = Label1.ForeColor
YES.ForeColor = Label1.ForeColor
LBLYES.ForeColor = Label1.ForeColor
LBLNO.ForeColor = Label1.ForeColor
cancelprint.ForeColor = Label1.ForeColor
End Sub
Private Sub Form_Unload(cancel As Integer)
Unload ticketno1
CN.Close
End Sub
Private Sub LBLNO_Click()
FLIGHTNUMBER.cancelprint.Visible = True
LBLYES.Visible = False
Label9.Visible = False
LBLNO.Visible = False
End Sub
Private Sub LBLNO_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LBLNO.ForeColor = vbGreen
End Sub
Private 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 With
End Sub
Private Sub LBLYES_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LBLYES.ForeColor = vbGreen
End Sub
Private Sub NO_Click()
Unload ticketno1
Unload FLIGHTNUMBER
AIRWAYSRESERVATION.Show
End Sub
Private Sub NO_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
NO.ForeColor = vbGreen
End Sub
Private Sub YES_Click()
Dim X As Integer
Dim 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 If
End Sub
Private Sub YES_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
YES.ForeColor = vbGreen
End Sub
Public Function BLANKFIELDS()
TXTNAME.Text = ""
TXTFARE.Text = ""
TXTSECTOR.Text = ""
TXTCLASS.Text = ""
TXTFLIGHTNO.Text = ""
TXTSEATS.Text = ""
txtdate.Text = ""
TXTTICKETNO.Text = ""
End Function
Public 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 With
End Function
CHANGE ADMINISTRATOR
PASSWORDDim CN As New Connection
Dim ARS As New Recordset
Dim 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.Open
ARS.Open "ADMINPASSWORD", CN, adOpenDynamic
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblchange.ForeColor = Label1.ForeColor
lblcancel.ForeColor = Label1.ForeColor
End Sub
Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)
CN.Close
End Sub
Private Sub lblcancel_Click()
Unload CHANGEADMIN
End Sub
Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = vbGreen
End Sub
Private 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 If
End Sub
Private Sub lblchange_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblchange.ForeColor = vbGreen
End Sub
Private Sub txtnewpwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtconfirmpwd.SetFocus
End If
End Sub
Private Sub txtoldpwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call txtoldpwd_LostFocus
End If
End Sub
Private 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 If
End Sub
Private Sub txtusername_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtoldpwd.SetFocus
End If
End Sub
CHANGE USER PASSWORDDim CN As New Connection
Dim urs As New Recordset
Dim 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.Open
urs.Open "PROJECTPASSWORD", CN, adOpenDynamic
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblchange.ForeColor = Label1.ForeColor
lblcancel.ForeColor = Label1.ForeColor
End Sub
Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)
CN.Close
End Sub
Private Sub Label2_Click()
End Sub
Private Sub lblcancel_Click()
Unload CHANGEUSER
End Sub
Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.ForeColor = vbWhite
End Sub
Private 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 If
End Sub
Private Sub lblchange_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblchange.ForeColor = vbWhite
End Sub
Private Sub txtnewpwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtconfirmpwd.SetFocus
End If
End Sub
Private Sub txtoldpwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnewpwd.SetFocus
End If
End Sub
Private 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 If
End Sub
Private Sub txtusername_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtoldpwd.SetFocus
End If
End Sub
ABOUT US
Private Sub Form_QueryUnload(cancel As Integer, UnloadMode As Integer)
Unload aboutus
End Sub
Private Sub Timer1_Timer()
Label2.Top = Label2.Top - 100
Label3.Top = Label3.Top - 100
Label4.Top = Label4.Top - 100
Label5.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 If
End 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 TESTING
Unit 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 TESTING
Integration 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 TESTING
System 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 )
Minimizatio