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

1.

1) INTRODUCTION
I am preparing the software program to automate the railway reservation system. This Railway Reservation System makes the reservation system efficient and less time consuming. In this automated reservation system the chances of error occurrence is minimized This project includes the following features: Reservation Cancellation of reservation Current states of particular train . In reservation process firstly asks for information relevant to the process like date, number of seats etc and then system checks current status of the train according to the requirement. If the requirement is fulfill, system makes the reservation. Cancellation system simply cancels the reservations before doing it, it asks for PNR number and whether cancellation is to be done for all seats/berths. Reservation cancellation process can be performed at least two hours before the departure of the train. System also provide the information of the train like how many seats are available in a particular date and in which class and many more such details. Reservation system is an attempt to enhance the speed and efficiency of the system.

1.2) ORGANISATION DESCRIPTION


Consider the scope of the operation. Indian Railways is the worlds secondlargest railway, with 6,853 stations, 63,028 kilometers of track, 37,840 passenger coaches and 222,147 freight cars. Annually it carries some 4.83 billion passengers and 492 million tons of freight. Of the 11 million passengers who climb aboard one of 8,520 trains each day, about 550,000 have reserved accommodations. Their journeys can start in any part of India and end in any other part, with travel times as long as 48 hours and distances up to several thousand kilometers. The challenge is to provide a reservation system that can support such a huge scale of operations regardless of whether its measured by kilometers, passenger numbers, routing complexity, or simply the sheer scale of India. PRS started in 1985 as a pilot project in New Delhi. The avowed objective was to provide reserved accommodation on any train from any counter preparation of train charts and accountable of the money collected. When initial pilot project was implemented at Delhi, the software (referred to as version I) had a number of limitations. These were mainly removed in next version i.e. version II implemented in 1987.With the addition of new locations and many redefinitions needed the new version III evolved in 1990.Even the version III of the earlier software called Impress fell far short of the growing expectations of he traveling public and the need was felt to have a software which has the capabilities of providing the Networking of

the five independent PRS nodes namely Secundrabad, Delhi, Calcutta, Mumbai and Chennai On 18th April 1999, with the networking of Chennai PRS, all the five PRS namely Secunderabad, New Delhi, Kolkata, Mumbai and Chennai were finally networked together. Now anywhere to anywhere reserved ticketing became a possibility on any PRS booking terminal. In order to facilitate the availability, PNR status and other journey planning information to the common public various interfaces like the Interactive Voice Response System (IVRS) on the telephone, Touch

Screens at selective locations, RAPID, DISPLAY, Passenger Operated Enquiry Terminals (POET) and Daily Press Availability Reports through newspapers have been provided.

1.3 PROJECT DESCRIPTION 1.3 a) ABOUT EXISTING SYSTEM 1.3 b) ABOUT PROPOSED SYSTEM

1.3a) ABOUT EXISTING SYSTEM:


Existing system here is manual i.e all transaction or the information is recorded in the registers and as simple text files on the computers. The person in need of particular information has to go to through the registers and the text files and then prepare the information needed by him manually. Besides this, there are many other drawbacks with the existing system which are listed as under, Flexibility in generation of information The generation of information in the proposed system takes llong time and they are manually prepared. Long time take to draw conclusions As individual files are maintained for each information, it is very difficult to compile information, measure performance over a period and draw conclusions from the information stored in two different files. User Friendliness The system is not easy to learn and understand .A native user cannot use the system effectively. User satisfaction The system is such that it does not stand up to the user satisfaction like easy and faster retrieval of information Response Time Being manually driven, the responses the operations are very slow. Error Handling

In case there arise some error in recovering or computation of the information it is very cumbersome to trace it Safety and Robustness The informative media is accessible by everyone .As information being the most crucial for the organization, there are no safety measures for the security of information. Furthermore, information is lying in the organization in an unorganized Manner and does not resemble the real world model. Lack of accuracy Information being prepared manually cannot be said as accurate, which is the first and the foremost condition for taking a crucial decision by the management. More time consuming Work carried out by the staff at various stages is highly time consuming. Error prone resources Resources being used by the information media were provided by the organization long ago. Due to wear and tear with the resources, they are highly error prone.

1.3b) ABOUT PROPOSED SYSTEM:

After a detailed study of the existing system, it is evident that it does not fulfill the objectives of the organization to make that objective possible for the organization it is required to have a computerized information system with the help of which all the tasks can be processed more accurately and quickly .To achieve that, it is necessary to design and develop a new system which will have the following benefits over the existing system. Flexibility in generation of information The generation of reports in the proposed system will take minimal time and they are electronically prepared. As a result, it is highly accurate. Less time is taken to draw conclusion It will be easy for the user (s) of the system to compile information at a very high pace, measure the performance over a period and draw conclusion from the information retrieved by using the proposed system. Ease in maintaining information As new information is being added to and released from their respective courses every year, it will be highly user friendly to track. User satisfaction

The system is much that is stands up to the user expectations like easy and faster retrieval of information. Safety and Robustness The system will be accessible by only the authorized users. As information being the most crucial for organization there are safety

measures for the security of information. Furthermore data is stored by the system in an organized manner and resembles the real world model. Highly accurate Information being prepared electronically can be said as accurate, which is the first and the foremost condition for taking a crucial decision by the management. Less time consuming Work carried out by the staff at various stages will be less time consuming. Error free resources Resources being used by the system will be compatible with the latest technologies available in the market .As proposed system uses highly technically compatible resources, there will be very less wear and tear .so the resources are error free.

1.4) ADVANTAGE OF THE PROJECT


1. This project is user-friendly based on Graphical user interface. 2. This system can be easily handled no special training is required. Anyone who have the basic idea about computer, can simple use it. 3. According to time we have to add more new training .In this system we can add new training from front end. 4. If there is any change in the status of a train like as source, destination, number of the seats in a particular coach .We can simply update the required record from the front end. 5. We can get any information related to train by doing a simple query.

2 PROJECT CATEGORY TOOLS AND ENVIORNMENT 2.1PROJECT CATEGORY 2.2FRONT END 2.3BACK END 2.4H/W AND S/W REQUIREMENTS

2.1) PROJECT CATEGORY


There exist three main categories of the project: 1. HIGH LEVEL 2. MIDDLE LEVEL 3. LOW LEVEL
1. HIGH LEVEL

A high level project is that project have been developed with the help of the front end as well as backend. But we will take mostly in the backend .It is useful and specified for large projects 2. MIDDLE LEVEL A middle level project is that project which has developed with the help of the front end as well as backend. But as we will take mostly give importance to the backend .It is useful and specified for large projects. 3. LOW LEVEL A low level project is that project which has developed with the help of the front end only. It is useful and specified for small projects. This project is the software, which come under the category of middle level. Taking VB in the front end and MS ACCESS in the backend develops this project.

2.2) FRONT END COVERAGE


Visual Basic is a highly interactive programming language .I t has several features that allow programmers to develop the applications for Microsoft windows in an easy and efficient manner .The Visual Basic environment increases the productivity of the programmer by providing the tools necessary to develop extremely sophisticated application s, Visual basic realize very heavily on the windows graphical user interface. Therefore the only prerequisite to work in Visual basic environment is to have firm understanding of mouse, window, and pull down menu and dialog boxes. OBJECTIVES OF VISUAL BASIC Visual basic has following objectives 1. Provide facility to spend more time on mastering the application and less time worrying about which key strokes to what within menu and Dialog boxes. 2. To provide programmer to have long and mixed feeling about graphic user interface (GUI). 3. The objectives is to remove the headache of the programmer that what the mouse was doing, where the user was inside a menu and whether he or she clicking or double clicking at a given place. 4. It helps us to create effective and robust application packed with impressive outlook in minimum time The main objective of the Visual basic is to provide an integrated development environment (IDE).

VERSION OF VISUAL BASIC In our project we have used 6.0. Usually there are different versions available in the market as Visual basic 6.0 available as follows: 1. Learning 2. Pro 3. Enterprise They differ in their features and price considerably. Version 6.0 of VISUAL BASIC is window 95, window 98 and window NT specific .It cannot run or build in window 3.1 approaches.

2.3) BACKEND COVERAGE


MS Access 2000 is a super powerful program with dozens of features to help you with your information management. Because MS constantly expands the capabilities of access for both new database users and programmer, it includes an amazing array of tools. Access 2000 explains how to accomplish basics like planning a database, creating tables, designing forms and reports to prevent your information and automating tasks such as navigating through a database.

2.4) HARDWARE AND SOFTWARE REQUIREMENTS


HARDWARE REQUIREMENTS
1. 1.2 GB Hard disk 2. 32 MB RAM 3. Floppy drive 1.44 MB 4. Monitor 5. Keyboard 6. Processor P1 or high

SOFTWARE REQUIREMENTS
1. Visual basic 6.0 2. Windows 95/98 3. Ms Access

3) PROJECT DEVELOPMENT STAGES 3.1) SYSTEM INVESTIGATION 3.2) FEASIBILITY STUDY 3.3) ANALYSIS 3.4) DESIGN 3.5) DEVELOPMENT 3.6) IMPLEMENTATION AND TESTING

3.1) SYSTEM INVESTIGATION


Being the first phase of SDLC, high level management identifies and assesses all development projects that as organization unit could under take. Organizations vary in their approach to identifying and selecting projects .In some organizations, project identification and selection is a very formal process are outcomes of a larger overall planning process. Alternatively a small organization may use informal project selection processes, that allow the highest ranking IS manager to independently select projects or allow individual business units to decide on the projects after agreeing to provide project funding. Organizations vary as to how they identify projects. This process can be performed by A key member of top management A steering committee composed of a cross section of managers. User departments, in which either the head of the requesting department decides which projects to, submit. The development group or a senior IS manager. INFORMATION GATHERING TOOLS 1. Onsite observation 2. Interviews and Questionnaires Onsite observation: It is the process of recognizing and noting people, object and occurrences to obtain information.

Interviews and Questionnaires: Interview is a face-to-face interpersonal role situation in which a person called the interviewer asks a person being interviewed questions designed to gather information about a problem area. Questionnaire is usually associated with self-administered tools with items of the closed or fixed alternative type. Questionnaire used for this project was set up in consideration with the travelers questions structured for the questionnaire is: 1. How frequent are you to the reservation center? Hardly Often Frequently 2. How long does it take to get a reservation done most of the time Few minutes Few hours It is not done the same day Questionnaire for end users 1. How long does it take to make a reservation for a traveler? Few minutes Takes much longer time Not sure 2. Are you satisfied with the working speed of the current system? Yes No Not sure

3.2) FEASIBILITY STUDY


Many feasibility studies are disillusioning for both users and analysts. First, the study often presupposes that when the feasibility document is being prepared, the analyst is in a position to evaluate solutions. Key considerations are involved in the feasibility analysis: Economic Technical Behavioral Legal Economic feasibility Economic analysis is the most frequently used method for evaluating the effectiveness of a candidate system. More commonly known as COST BENEFIT ANALYSIS, the procedure is to determine the benefits and the savings that are expected from a candidate system and compare them with costs .If the benefits outweigh costs, and then the decision is made to design and implement the system. Technical feasibility Technical feasibility centers on the existing computer system (hardware, software etc) and to what extent it can support the proposed addition. Behavioral feasibility People are inherently resistant to change and computers have been known to facilitate change .An estimate should be made up of how strong a reaction

the user staff is likely to have towards the development of a computerized system .It is common knowledge that the computer installation s have something to do with turn over, transfers, training And changes in employee job status. Therefore it is understable that the introduction candidate system requires special effort to educate, sell and train the staff on new ways of conducting business. Legal feasibility Project proposed should be legally accepted.

3.3) ANALYSIS
Analysis is a detailed study of the various operations performed by a system and their relationships within and outside of the system. One aspect of analysis is defining the boundaries of the system and determining whether or not a candidate system should consider other related systems. During analysis data are collected on available files, decision points and transaction handled by the present system. Depending on the results of the initial investigation, the survey is expanded to a more detailed feasibility study. A feasibility study is a test of the system proposal according to it workability, impact on the organization, ability to meet user needs, and effective use of the resources. It focuses on three major questions 1. What are the users demonstrable needs and how does a candidate system meet them? 2. What resources are available for a given candidate system? Is the problem worth solving? 3. What are the likely impacts of the candidate system on the organization? How well does it fit with in the organizations master plan?

3.4) DESIGN
The purpose of design phase is to plan a solution of the problem specified by the requirement document. This phase is the first step in moving from problem to solution domain .It is also most creative & challenging phase in the SDLC. The key question here is how should the problem is solved. The design activity is often divided into two separate phases: SYSTEM DESIGN DETAIL DESIGN SYSTEM DESIGN System design which is sometimes also called top level design, aims identify the modules that should be in the system then specifications of these modules, and how they interact with each other to produce the desired results .At the end of the system design all the major data structures, file formats, output formats and the major modules in the system and their specifications are decided. DETAIL DESIGN During detail design, the internal logic of each of the modules specified. During this phase further details of the data structures and algorithm design of each of the module is specified. During detail design, the focus is on the designing logic for each of the models. There are two possible approaches involved in development phase: a) Top down b) Bottom up TOP DOWN DESIGN:

The top down approach starts from highest level component and proceeds through low level of hierarchy .A top design starts by identifying the major components of a system, decomposing them into their lower level components and iterating until the desired level of detail is achieved. BOTTOM UP DESIGN: A bottom up approach starts with the lowest level component of the hierarchy and proceeds through progressive higher level components to the top level components .A bottom up design approach starts with designing the most basic or primitive components and proceeds to higher level components that used these lower level components.

TOOLS FOR DESIGN FLOWCHART DATA FLOW DIAGRAM E-R DIAGRAM

FLOW CHART

FLOWCHART
Flowchart is the graphic picture the logical steps and the sequence in procedure or a program. Normally an algorithm is first represented in the form of flowchart and the flowchart is then expressed in the form of flowchart and the flowchart is then expressed in some programming language to prepare computer program .The main advantages of these two steps in program writing is that while drawing a flowchart one is not concerned with the details of the elements of the programming language. Hence he can fully concentrate on the logic of the procedure. Moreover since the flowchart shows the flow of operation s in the pictorial form, any error in the logic of the procedure can be detected more easily than in case of program. Once flowchart is ready, the programmer can forget about the logic and concentrate only on the coding operation in each box of the flowchart in the terms of the statement of the programming language. This will normally ensure a error free program.

SYMBOLS OF FLOWCHART
The flowchart uses boxes of different shapes to denote different types of instruction.. The American Standard Institute (ANSI) has standardized these symbols. The function of these symbols is

Terminal processing

I/O Box

Process

Flow lines

Decision box

Connectors

FLOWCHART FOR RESERVATION

START

SELECT A TRAIN

FILL RESERVATION FORM

IS SEAT AVAILA BLE

NO YES

RESERVATION AND GENERATION OF TICKET A

STOP

FLOWCHART FOR CANCELLATION

START

SELEC T TRAIN

ENTER PNR NO.

IS RECORD PRESENT

NO

YES

CANCEL THE RECORD A STOP

FLOWCHART FOR QUERY

START

SELECT A TRAIN

ENTER PASSEN GER

IS RECOR D EXIST

NO

RECOR D NOT AVAIL ABLE

YES
DISPLAY THE RECORD A STOP

DATA FLOW DIAGRAM

DATA FLOW DIAGRAM


LARRY CONSTANTINE developed first DFD as a way of expressing system requirement in a graphical form, this lead to modular design. A DFD is also known as bubble chart. A DFD is represented by bubbles joined by lines. Bubbles represent transformation and lines show the flow of data. DFD SYMBOLS A SQUARE represents source and destination of system data. AN ARROW represents a pipeline through which data flows. AN OPEN RECTANGLE represents temporary repository of data. A BUBBLE represents process that transforms incoming data in form of outgoing data. CONSTRUCTING DFD Processes should be named and numbered for easy references. The direction of flow is from top to bottom or left to right. When process is explored into lower details they are numbered. The names of the data store, source and destination are in capital letters.

TRAINNO.

FARE

PASSENGER

Ticket Generation

TICKET PRINT

DFD 0 -Level

TRAIN

DETAIL

Passenger request

Reservation /Cancellation System

PASSENGER

Reservvation

Cancella tion

Fare

PNR_DETAIL

Check SeatStatus

PASSENGER

PNR_DETAIL

Ticket confirm

Waiting Ticket

FARE

TICKET GENERATE

Money

PNR_DETAIL Details for Cancellation

Cancell ation Change in No. Of seats

SEAT

Deduct Money

PASSENGER

ENTITY RELATIONSHIP DIAGRAM

E-R DIAGRAM
E-R DIAGRAM can express the overall logical structure of a database graphically .E-R diagram are simple and clear, qualities that may account in large part for the widespread use of the E-R model. Such a diagram consists of the following major components: Rectangle: represents Entity sets. Ellipse: Lines represents Attributes. Diamonds: represents Relationship. :represents Links attributes to entity to attributes and relationship as well. Double Ellipse: represents total participation of an entity in a relationship set. Double Rectangle: represents weak entity sets.

RESERVATION

Age

Name

Sex

Coach

Source

Destination

Class

Passenger
o ati rv se Re n

Train

Train Name aa

No.of Trainno. Source/ Destination Seats SeatNo . Pnrno Train No.

CANCELLATION
Ca nc e

Pnrn o

Passenger

lla tio Trainno n Coach No.

Pnrno Source Train

Seat Destination No.

Train Name

QUERY

Resdat e

Source Coach Destination

Class

Passenger

In St qui at ry us

Train

Trainno Source/ Destination

Seat No. Pnrno

Trainno

3.5) DEVELOPMENT
The development of the project involves the formulation of codes. Front end is Visual basic, which causes generation of forms providing interface with the user requirements. Further tables are generated to provide database. Various forms are developed as project involves reservation, updation, cancellation thus it necessitates necessary information. Development involves various modules. Modules are for reservation, cancellation and query. Thus forms appears on the screen asking for details like train number, class of berth, train number, class of berth, date. Then after processing results in generation of ticket. Similarly Cancellation requires PNR no and thus cancellation is done. For query detail like train number and type of berth is given for date and it gives necessary information.

3.6) IMPLEMENTATION AND TESTING


During the implementation phase, the system actually takes physical shape .As in the other two stages, the analyst, his or her associates and the user performs many tasks including: Writing, testing, debugging and documenting systems. Converting data from the old to the new system. Training the systems users. Ordering and installing any new hardware required by the system. Developing operating procedures for the computer center staff. Establishing a maintenance procedure to repair and enhance the system. Completing system documentation. Evaluating the final system to make sure that it is fulfilling original need and that it began operation on time and within budget. The analyst involvement in each of these activities varies from organization to organization .For a small organizations, specialists may work on different phases and tasks, such as training, ordering

equipment, converting data from old methods to the new or certifying the correctness of the system. The implementation phase with an evaluation of the system after placing it into operation for a period of time .by then, most program errors will have shown up and most costs will have become clear .To make sure that the system audit is a last check or review of a system to ensure that it meets design criteria. Evaluation forms the feedback part of the cycle that keeps implementation going as long as the system continues operation.

TESTING
Testing is the major quality content measure used during software development .The basic function is to detect errors in the software. After the implementation phase, computer programs are available that can be executed for testing purposes. The goal of the testing is to uncover requirement. Consequently, different levels of testing are used namely: UNIT TESTING INTEGRATION TESTING SYSTEM TESTING USER ACCEPTANCE TESTING UNIT TESTING The starting point of testing is unit-testing .In this module is tested separately and is often performed by the coder himself. Simultaneously along with the coding of the module .The purpose is to exercise the different parts of the module code to detect coding errors. INTEGRATION TESTING After unit testing, the modules are gradually integrated into subsystems, which are then integrated to eventually form the entire system. During integration of the modules, integration testing is performed to detect design errors by focusing on testing the interconnection between modules.

SYSTEM TESTING After the system is put together, system testing is performed. Here the system is tested against the system requirements to see if all the requirements are met and if the system performs as specified by the requirements. USER ACCEPTANCE TESTING User acceptance testing is performed to demonstrate to the client, on the real life data of the client, the operations of the system.

4) PROJECT FORMS

5) CODING

CODE FOR MAIN MENU


Dim J%, X%

Dim STR1$, STR$ Private Sub ABOUTFARE_Click() DataReport3.Show End Sub Private Sub ABOUTPASSENGER_Click() DataReport2.Show End Sub Private Sub ABOUTTRAINS_Click() DataReport1.Show End Sub Private Sub cancellation_Click() CANCEL.Show Unload Me End Sub Private Sub CANCL_Click() CANCEL.Show Unload Me End Sub Private Sub CONTENT_Click() contents.Show End Sub Private Sub exit_Click() Exitfrm.Show End Sub Private Sub MAIN_Click() main.Show Unload Me End Sub Private Sub EXT_Click() Exitfrm.Show End Sub Private Sub QUEARY_Click()

query1.Show End Sub Private Sub query_Click() query1.Show End Sub Private Sub RESERV_Click() reservation_Click End Sub Private Sub reservation_Click() RES.Show Unload Me End Sub Private Sub SYSTEM_Click() aboutsystem.Show End Sub Private Sub Timer1_Timer() Label2.Caption = Time Label3.Caption = Date End Sub Private Sub Timer3_Timer() If Label4.Caption = "INDIAN RAILWAYS" Then Label4.Caption = "Indian Railways" Else Label4.Caption = "INDIAN RAILWAYS" End If End Sub Private Sub FORM_LOAD() Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2 STR1 = main.Caption X = Len(STR1) End Sub Private Sub Timer5_Timer()

J=1+J If J = X Then J = 1 STR = Mid$(STR1, J, X) main.Caption = STR End Sub Private Sub TRAIN_DETAIL_Click() Addtrains.show End Sub

Private Sub FORM_LOAD() LoadingWindowstate=2 Label1.FontSize = 20 Label3.FontSize = 24 Label1.Caption = "Loading........" End Sub Private Sub Timer1_Timer() Timer1.Interval = 1000 Static P As Integer Static s As Integer P = (P + 1) Mod 60 s = s + 10 'Label2.ForeColor = RGB(0, 0, 200) 'Label2.FontSize = 12 'Label2.Caption = str$(s) & " % Completed " ProgressBar1.Value = P If s = 100 Then main.Show Unload Loading End If End Sub

CODE FOR RESERVATION Dim J, c, K As Integer Dim SOURCE, RESERVED, TEMPCLASS As String '**************CHECKING FOR RESERVATION DATE************* '******************************************************** Private Sub Combo1_GotFocus() If Text2.Text = "" Then MsgBox "PLEASE ENTER THE RESERVATION DATE" Combo1.Clear Text2.SetFocus Exit Sub End If resdate = Text2.Text If (resdate - Date) > 60 Then MsgBox "RESERVATION CAN BE GIVEN UPTO 60 DAYS AHEAD" Text2.Text = "" Combo1.Clear Text2.SetFocus End If If (Date - resdate) > 0 Then MsgBox "RESERVATION IS NOT POSSIBLE ,PLEASE ENTER VALID DATE" Text2.Text = "" Combo1.Clear Text2.SetFocus End If End Sub Private Sub COMBO2_GOTFOCUS() Combo2.Clear Data1.Recordset.MoveFirst Data1.Recordset.FindFirst "trainno =" & Combo1.Text TRAINTYPE = Data1.Recordset.Fields("traintype").Value Combo2.AddItem UCase$(Data1.Recordset.Fields("s1").Value) Combo2.AddItem UCase$(Data1.Recordset.Fields("s2").Value) Combo2.AddItem UCase$(Data1.Recordset.Fields("s3").Value) Combo2.AddItem UCase$(Data1.Recordset.Fields("s4").Value)

Combo2.AddItem UCase$(Data1.Recordset.Fields("s5").Value) Combo2.AddItem UCase$(Data1.Recordset.Fields("s6").Value) End Sub '*************CALCULATING DISTANCE********************* '******************************************************* Private Sub Combo2_lostfocus() Select Case Combo2.Text Case UCase$(Data1.Recordset.Fields("s1").Value) distance = Data1.Recordset.Fields("d1").Value Case UCase$(Data1.Recordset.Fields("s2").Value) distance = Data1.Recordset.Fields("d2").Value Case UCase$(Data1.Recordset.Fields("s3").Value) distance = Data1.Recordset.Fields("d3").Value Case UCase$(Data1.Recordset.Fields("s4").Value) distance = Data1.Recordset.Fields("d4").Value Case UCase$(Data1.Recordset.Fields("s5").Value) distance = Data1.Recordset.Fields("d5").Value Case UCase$(Data1.Recordset.Fields("s6").Value) distance = Data1.Recordset.Fields("d6").Value End Select End Sub Private Sub Form_Activate() RES.Data2.Recordset.MoveLast PNR = RES.Data2.Recordset.Fields("PNRNO").Value RES.Data2.Recordset.AddNew End Sub Private Sub text2_lostfocus() Data1.Recordset.MoveLast c = Data1.Recordset.RecordCount Data1.Recordset.MoveFirst For J = 1 To c Combo1.AddItem Data1.Recordset.Fields("trainno").Value Data1.Recordset.MoveNext Next End Sub Private Sub FORM_LOAD() i=1 P=1

End Sub Private Sub OK_Click() trainno = Combo1.Text sd = Combo2.Text class = Combo3.Text trainname = Data1.Recordset.Fields("trainname").Value Data2.Recordset.Fields("PNRNO").Value = PNR + 1 P = Val(Combo4.Text) K = InStr(1, sd, "-") SOURCE = Mid$(sd, 1, K - 1) '****************SEAT ALLOTMENT************************* '******************************************************* ALLOTMENT If J > c Then Data3.Recordset.AddNew Data3.Recordset.Fields("TRAINNO").Value = trainno Data3.Recordset.Fields("RESDATE").Value = resdate Data3.Recordset.Fields("SOURCE").Value = SOURCE Data3.Recordset.Fields("FACSEAT").Value = "S1-01,S1-02,S1-03,S104,S1-05,S1-06,S1-07,S1-08,S1-09,S1-10,S1-11,S1-12,S1-13,S1-14,S115,S1-16,S1-17,S1-18,S1-19,S1-20,S2-01,S2-02,S2-03,S2-04,S2-05,S206,S2-07,S2-08,S2-09,S2-10,S2-11,S2-12,S2-13,S2-14,S2-15,S2-16,S217,S2-18,S2-19,S2-20" Data3.Recordset.Fields("ACCSEAT").Value = "S1-01,S1-02,S1-03,S104,S1-05,S1-06,S1-07,S1-08,S1-09,S1-10,S1-11,S1-12,S1-13,S1-14,S115,S1-16,S1-17,S1-18,S1-19,S1-20,S2-01,S2-02,S2-03,S2-04,S2-05,S206,S2-07, S2-08, S2-09, S2-10, S2-11, S2-12, S2-13, S2-14, S2-15, S2-16, S2- 17,S2-18, S2-19, S2-20" Data3.Recordset.Fields ("ACSSEAT"). Value = "S1-01, S1-02, S1-03, S104,S1-05,S1-06,S1-07,S1-08,S1-09,S1-10,S1-11,S1-12,S1-13,S1-14,S115,S1-16,S1-17,S1-18,S1-19,S1-20,S2-01,S2-02,S2-03,S2-04,S2-05,S206,S2-07,S2-08,S2-09,S2-10,S2-11,S2-12,S2-13,S2-14,S2-15,S2-16,S217,S2-18,S2-19,S2-20" Data3.Recordset.Fields ("FCLASSSEAT"). Value = "S1-01,S1-02,S103,S1-04,S1-05,S1-06,S1-07,S1-08,S1-09,S1-10,S1-11,S1-12,S1-13,S114,S1-15,S1-16,S1-17,S1-18,S1-19,S1-20,S2-01,S2-02,S2-03,S2-04,S2-

05,S2-06,S2-07,S2-08,S2-09,S2-10,S2-11,S2-12,S2-13,S2-14,S2-15,S216,S2-17,S2-18,S2-19,S2-20" Data3.Recordset.Fields ("SLEEPERSEAT"). Value = "S1-01,S1-02,S103,S1-04,S1-05,S1-06,S1-07,S1-08,S1-09,S1-10,S1-11,S1-12,S1-13,S114,S1-15,S1-16,S1-17,S1-18,S1-19,S1-20,S2-01,S2-02,S2-03,S2-04,S205,S2-06,S2-07,S2-08,S2-09,S2-10,S2-11,S2-12,S2-13,S2-14,S2-15,S216,S2-17,S2-18,S2-19,S2-20" Data3.Recordset.Update ALLOTMENT End If Data2.Recordset.Update RESVI.Data1.Recordset.AddNew RESVI.Show Unload Me End Sub Private Sub main1_Click() main.Show Unload Me End Sub Private Sub ALLOTMENT() Data3.Recordset.MoveLast c = Data3.Recordset.RecordCount Data3.Recordset.MoveFirst For J = 1 To c If Data3.Recordset.Fields("trainno").Value = trainno And Data3.Recordset.Fields("SOURCE").Value = SOURCE Then Data3.Recordset.Fields("SOURCE").Value = SOURCE '*********SELECTING THE SEATACCORDINGTOCLASS******************** '************************************************************* ***** Select Case class Case "F.A.C." If P <= (Len(Data3.Recordset.Fields("FACSEAT").Value) + 1) / 6 Then RESERVED = Mid$(Data3.Recordset.Fields("FACSEAT").Value, 1, P * 6 - 1) Data3.Recordset.Edit

Data3.Recordset.Fields("FACSEAT").Value = Mid$ (Data3.Recordset.Fields("FACSEAT").Value, P * 6 + 1) Data3.Recordset.Update For K = 0 To P - 1 coach(K) = Mid$(RESERVED, K * 6 + 1, 2) SEAT(K) = Mid$(RESERVED, K * 6 + 4, 2) Next TEMPCLASS = "FAC" resfee = 20 * P fare End If Case "A.C.C." If P <= (Len(Data3.Recordset.Fields("ACCSEAT").Value) + 1) / 6 Then RESERVED = Mid$(Data3.Recordset.Fields("ACCSEAT").Value, 1, P * 6 - 1) Data3.Recordset.Edit Data3.Recordset.Fields("ACCSEAT").Value = Mid$ (Data3.Recordset.Fields("ACCSEAT").Value, P * 6 + 1) Data3.Recordset.Update For K = 0 To P - 1 coach(K) = Mid$(RESERVED, K * 6 + 1, 2) SEAT(K) = Mid$(RESERVED, K * 6 + 4, 2) Next TEMPCLASS = "ACC" resfee = 20 * P fare End If Case "A.C.S." If P <= (Len(Data3.Recordset.Fields("ACSSEAT").Value) + 1) / 6 Then RESERVED = Mid$(Data3.Recordset.Fields("ACSSEAT").Value, 1, P * 6 - 1) Data3.Recordset.Edit Data3.Recordset.Fields("ACSSEAT").Value = Mid$ (Data3.Recordset.Fields("ACSSEAT").Value, P * 6 + 1) Data3.Recordset.Update For K = 0 To P - 1 coach(K) = Mid$(RESERVED, K * 6 + 1, 2) SEAT(K) = Mid$(RESERVED, K * 6 + 4, 2) Next

TEMPCLASS = "ACS" resfee = 20 * P fare End If Case "F.CLASS" If P <= (Len(Data3.Recordset.Fields("FCLASSSEAT").Value) + 1) / 6 ThenRESERVED = Mid$(Data3.Recordset.Fields("FCLASSSEAT").Value, 1, P * 6 - 1) Data3.Recordset.Edit Data3.Recordset.Fields("FCLASSSEAT").Value = Mid$ (Data3.Recordset.Fields("FCLASSSEAT").Value, P * 6 + 1) Data3.Recordset.Update For K = 0 To P - 1 coach(K) = Mid$(RESERVED, K * 6 + 1, 2) SEAT(K) = Mid$(RESERVED, K * 6 + 4, 2) Next TEMPCLASS = "FCLASS" resfee = 20 * P fare End If Case "SLEEPER" If P <= (Len(Data3.Recordset.Fields("SLEEPERSEAT").Value) + 1) / 6 Then RESERVED=Mid$ (Data3.Recordset.Fields("SLEEPERSEAT").Value, 1, P * 6 - 1) Data3.Recordset.Edit Data3.Recordset.Fields ("SLEEPERSEAT").Value = Mid$ (Data3.Recordset.Fields("SLEEPERSEAT").Value, P * 6 + 1) Data3.Recordset.Update For K = 0 To P - 1 coach(K) = Mid$(RESERVED, K * 6 + 1, 2) SEAT(K) = Mid$(RESERVED, K * 6 + 4, 2) Next TEMPCLASS = "SLEEPER" resfee = 20 * P fare End If End Select Exit For

Else Data3.Recordset.MoveNext End If Next End Sub '*****************CALCULATINGFARE************************ * '********************************************************** Private Sub fare() Data4.Recordset.MoveFirst Data4.Recordset.FindFirst "TRAINTYPE='" & TRAINTYPE & "'" TFARE = Int(P * distance * Data4.Recordset.Fields(TEMPCLASS).Value) + resfee End Sub

CODE FOR CANCELLATION Dim K As Integer Dim STR As String Private Sub main1_Click() main.Show Unload Me End Sub Private Sub FORM_LOAD() Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2 End Sub '*****************FOR CANCELLATION OF THE SEATS*************** '************************************************************ * Private Sub OK_Click() datec = Data1.Recordset.Fields("RESDATE").Value trainnoc = Data1.Recordset.Fields("TRAINNO").Value classc = Data1.Recordset.Fields("CLASS").Value sourcec = Mid$(Data1.Recordset.Fields("SD").Value, 1, K - 1) If Option1.Value = True Then STR = "" Data1.Recordset.Delete Data2.Recordset.FindFirst "PNRNO=" & pnrc While pnrc = Data2.Recordset.Fields("PNRNO").Value Data2.Recordset.Fields("SEATNO").Value Data2.Recordset.Delete Data2.Recordset.MoveFirst Data2.Recordset.FindFirst "PNRNO=" & pnrc Wend Data3.Recordset.MoveLast c = Data3.Recordset.RecordCount Data3.Recordset.MoveFirst For J = 1 To c If Data3.Recordset.Fields("trainno").Value = trainnoc And Data3.Recordset.Fields("RESDATE").Value = datec And Data3.Recordset.Fields("SOURCE").Value = sourcec Then Data3.Recordset.Edit Select Case classc

Case "F.A.C." Data3.Recordset.Fields("facseat").Value = Data3.Recordset.Fields("facseat").Value + STR Case "A.C.C." Data3.Recordset.Fields("accseat").Value = Data3.Recordset.Fields("accseat").Value + STR Case "A.C.S." Data3.Recordset.Fields("acsseat").Value = Data3.Recordset.Fields("acsseat").Value + STR Case "F.CLASS" Data3.Recordset.Fields("fclassseat").Value = Data3.Recordset.Fields("fclassseat").Value + STR Case "SLEEPER" Data3.Recordset.Fields("sleeperseat").Value = Data3.Recordset.Fields("sleeperseat").Value + STR End Select Data3.Recordset.Update Exit For Else Data3.Recordset.MoveNext End If Next Else cancelno.Show Unload Me End If MsgBox "RESERVATION CANCELLED" main.Show Unload Me End Sub Private Sub Option1_GotFocus() If Text1.Text = "" Then MsgBox "PLEASE ENTER THE PNR NUMBER" Text1.SetFocus End If Data1.Recordset.MoveFirst Data1.Recordset.FindFirst " PNRNO = " & Val(Text1.Text)

pnrc = Data1.Recordset.Fields("PNRNO").Value If pnrc <> Val(Text1.Text) Then MsgBox "PLEASE ENTER PROPER PNR NO" Text1.Text = "" Text1.SetFocus End If End Sub CODE FOR QUERY Dim c, J, K As Integer *************CHECKING FOR VALID DATE******************** '******************************************************** Private Sub Combo1_GotFocus() If Text1.Text = "" Then MsgBox "PLEASE ENTER THE RESERVATION DATE" Combo1.Clear Text1.SetFocus Exit Sub End If qdate = Text1.Text If (qdate - Date) > 60 Then MsgBox "RESERVATION IS NOT ALLOWED ON THIS DATE" Text1.Text = "" Combo1.Clear Text1.SetFocus Exit Sub End If qdate = Text1.Text If (Date - qdate) > 0 Then MsgBox "PLEASE ENTER DATE ONWARDS FROM CURRENT DATE" Text1.Text = "" Combo1.Clear Text1.SetFocus Exit Sub End If End Sub Private Sub FORM_LOAD()

Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2 query1.Text1.Text = "" query1.Combo1.Text = "" query1.Combo2.Text = "" query1.Combo3.Text = "" End Sub Private Sub main1_Click() main.Show Unload Me End Sub '****************CHECKING THE AVAILABLTY OF SEATS******************* '************************************************************ ******* Private Sub OK_Click() qtrainno = Combo1.Text qclass = Combo2.Text K = InStr(1, Combo3.Text, "-") qsource = Mid$(Combo3.Text, 1, K - 1) Data2.Recordset.MoveLast c = Data2.Recordset.RecordCount Data2.Recordset.MoveFirst For J=1TOC If Data2.Recordset.Fields("trainno").Value = qtrainno And Data2.Recordset.Fields("RESDATE").Value = qdate And Data2.Recordset.Fields("SOURCE").Value = qsource Then Select Case qclass Case "F.A.C." q_result.Label5.Caption = (Len(Data2.Recordset.Fields("FACSEAT").Value) + 1) / 6 If q_result.Label5.Caption = "0" Then q_result.Label5.Caption = "NOT AVAILABLE" q_result.Label6.Caption = Data2.Recordset.Fields("FACRAC").Value + 1 If Val(q_result.Label6.Caption) - 1 = 6 Then q_result.Label6.Caption = "NOT AVAILABLE" q_result.Label7.Caption = Data2.Recordset.Fields("FACWAIT").Value + 1 Else q_result.Label7.Visible = False

End If Else q_result.Label6.Visible = False q_result.Label7.Visible = False End If Case "A.C.C." q_result.Label5.Caption = (Len(Data2.Recordset.Fields("ACCSEAT").Value) + 1) / 6 If q_result.Label5.Caption = "0" Then q_result.Label5.Caption = "NOT AVAILABLE" q_result.Label6.Caption = Data2.Recordset.Fields("ACCRAC").Value + 1 If Val(q_result.Label6.Caption) - 1 = 6 Then q_result.Label6.Caption = "NOT AVAILABLE" q_result.Label7.Caption = Data2.Recordset.Fields("ACCWAIT").Value + 1 Else q_result.Label7.Visible = False End If Else q_result.Label6.Visible = False q_result.Label7.Visible = False End If Case "A.C.S." q_result.Label5.Caption = (Len(Data2.Recordset.Fields("ACSSEAT").Value) + 1) / 6 If q_result.Label5.Caption = "0" Then q_result.Label5.Caption = "NOT AVAILABLE" q_result.Label6.Caption = Data2.Recordset.Fields("ACSRAC").Value + 1 If Val(q_result.Label6.Caption) - 1 = 6 Then q_result.Label6.Caption = "NOT AVAILABLE" q_result.Label7.Caption = Data2.Recordset.Fields("ACSWAIT").Value + 1 Else q_result.Label7.Visible = False End If Else q_result.Label6.Visible = False q_result.Label7.Visible = False End If Case "F.CLASS"

q_result.Label5.Caption = (Len(Data2.Recordset.Fields("FCLASSSEAT").Value) + 1) / 6 If q_result.Label5.Caption = "0" Then q_result.Label5.Caption = "NOT AVAILABLE" q_result.Label6.Caption = Data2.Recordset.Fields("FCLASSRAC").Value +1 If Val(q_result.Label6.Caption) - 1 = 6 Then q_result.Label6.Caption = "NOT AVAILABLE" q_result.Label7.Caption = Data2.Recordset.Fields("FCLASSWAIT").Value +1 Else q_result.Label7.Visible = False End If Else q_result.Label6.Visible = False q_result.Label7.Visible = False End If Case "SLEEPER" q_result.Label5.Caption = (Len(Data2.Recordset.Fields("SLEEPERSEAT").Value) + 1) / 6 If q_result.Label5.Caption = "0" Then q_result.Label5.Caption = "NOT AVAILABLE" q_result.Label6.Caption = Data2.Recordset.Fields("SLEEPERRAC").Value +1 If Val(q_result.Label6.Caption) - 1 = 6 Then q_result.Label6.Caption = "NOT AVAILABLE" q_result.Label7.Caption = Data2.Recordset.Fields("SLEEPERWAIT").Value + 1 Else q_result.Label7.Visible = False End If Else q_result.Label6.Visible = False q_result.Label7.Visible = False End If End Select Exit For Else

Data2.Recordset.MoveNext End If Next If J > c Then q_result.Label5.Caption = "40" q_result.Label6.Visible = False q_result.Label7.Visible = False End If q_result.Show Unload Me End Sub Private Sub COMBO3_GOTFOCUS() Combo3.Clear Data1.Recordset.MoveFirst Data1.Recordset.FindFirst "trainno =" & Combo1.Text Combo3.AddItem UCase$(Data1.Recordset.Fields("s1").Value) Combo3.AddItem UCase$(Data1.Recordset.Fields("s2").Value) Combo3.AddItem UCase$(Data1.Recordset.Fields("s3").Value) Combo3.AddItem UCase$(Data1.Recordset.Fields("s4").Value) Combo3.AddItem UCase$(Data1.Recordset.Fields("s5").Value) Combo3.AddItem UCase$(Data1.Recordset.Fields("s6").Value) End Sub Private Sub Text1_LostFocus() c = Data1.Recordset.RecordCount Data1.Recordset.MoveFirst For J = 1 To c Combo1.AddItem Data1.Recordset.Fields("trainno").Value Data1.Recordset.MoveNext Next End Sub

6) CONCLUSION

6) CONCLUSION
Once the software will install, the users will be trained and the master data will be created .It will be the time to start full-fledged use of the software. However seldom does it happens that the moment the software is commissioned and goes line, the organization relies solely on it, discarding all the previously used processes and procedure what generally happens is that usage of the software is recommended? In addition the user are confident that the new system is foolproof and so the old can be dispensed with Therefore the basic idea underlying these activities that even after the software is installed, the old system of doing things, be it automated or manual is continued for some period of time. Since both the old and the new system continues in parallel this is called parallel run.

7) FUTURE SCOPE

7) FUTURE SCOPE
Suppose in the future the activities or the method associated with the railway reservation system. System is changed or they want some more activities to be automated, then in such cases this project can be easily to handle and anyone can operate it .It will not only reduce the cost of maintenance of records but it will be also. Improve the efficiency of work. This project can also be used for Airlines reservation system, Hotel reservation system etc by just making some alteration in it.

8) BIBLIOGRAPHY

8) BIBLIOGRAPHY

Mastering Visual Basic 6.0

BY Evangelos Petroutsos BY Steven Holzner BY Harkins, ETAL BY Pankaj Jalote BY E.M Awad

Visual Basic 6.0 programming Microsoft Access Software Engineering Analysis and Design of Information

www.indianrailways.gov.in

TABLE OF CONTENTS
Certificate Declaration Acknowledgement 1. INTRODUCTION TO PROJECT 1.1) INTRODUCTION 1.2) COMPANY DESCRIPTION 1.3) PROJECT DESCRIPTION 1.3a) ABOUT EXISTING SYSTEM 1.3b) ABOUT PROPOSED SYSTEM 1.4) ADVANTAGE OF PROJECT 2. PROJECT CATEGORY TOOLS AND ENVIORNMENT 2.1) PROJECT CATEGORY 2.2) FRONT END COVERAGE 2.3) BACKEND COVERAGE 2.4) HARDWARE AND SOFTWARE REQUIREMENTS 3. PROJECT DEVELOPMENT STAGES 3.1) RECOGNITION OF NEED 3.2) FEASIBILITY STUDY 3.3) ANALYSIS 3.4) DESIGN 3.5) DEVELOPMENT 3.6) IMPLEMENTATION AND TESTING 4. PROJECT FORMS 5. CODING 6.CONCLUSION 7.FUTURE SCOPE 8.BIBLIOGRAPHY

1. INTRODUCTION TO THE PROJECT 1.1) INTRODUCTION 1.2) ORGANISATION DESCRIPTION 1.3) COMPANY DESCRIPTION 1.4) ADVANTAGES OF THE PROJECT

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