Professional Documents
Culture Documents
On
Railway Reservation System-e Rail
Submitted By
(Bhawanjeet Kaur)
MCA (1634)
Lateral Entry
Batch :- 2016-18
Tanya
Name of Project guide
Lecturer(IT)
Designation
1|Page
LOVELY PROFESSIONAL UNIVERSITY, PHAGWARA
Declaration
I hereby declare that the project report entitled “Railway Reservation System – eRail”
submitted in partial fulfillment and requirement for the degree of “Bachelor of Computer
submitted for the award of any other degree, diploma, fellowship, or any similar title of
prizes.
Bhawanjeet Kaur
Reg. No-21600590039
Date :-__________
Certified that the above statement made by the student is coorect to the best of our
knowledge and belief.
Tanya
Lecturer (IT)
Project guide
Date :-__________
2|Page
CERTIFICATE
This Is to Certify That Mrs. Bhawanjeet Kaur Regd. 21600590039 has processed under
by supervision her research project report on “Railway Reservation System – eRail”. The work
embodied in this report is original and is of the standard expected of an MCA Student and has not
been submitted in part or full to this or any other university for the award of any degree or
Diploma. She has completed all requirements of guidlines for research project report and the work
is fit for evaluation.
Name: Tanya
Desgination: Lecturer (IT)
3|Page
Table of Contents
4|Page
Railway Management System Benefits
Complete end to end system for all the activities related to railway
reservation system.
Supports the full life cycle of ticket reservation, seat allocation, and ticket cancellation.
Reschedule the cancel seat to unconfirmed passenger.
It is a scalable system.
Has a clearly arranged and user-friendly interface
Easy to use and minimum data entry, all important details is mater driven
and provide in drop down list to make fast operation and avoid mistake.
Automatic fare calculation from stage master, in new updation of fare in stage
master will automatically reflect in all new reservation.
All important details can be updated by front end master module only.
Retrieval of forgotten passwords.
Integrated security features.
5|Page
Security module
Security modules include security features like user management and application
level password management..
Maintain user master- Each user identified by the user name and user type.
Only admin user can create, edit user information.
Password must be 6 characters long.
Password must be alpha numeric.
While creating user system assign default password for the user, user must
change default password for first time login.
All login time stamp stored in the system for security audit.
Access level and roles and privileges are set for different type of users.
6|Page
Transaction Module
Transaction module includes following sub modules.
Reservation – This module used to make reservation, it asks for input data like
train no, journey date, from station code, end station code. System has powerful
validation rule to check validation like journey date must be greeter than system
date, journey date must be within 90 days. Train should run for the selected day.
Check for from station and to station. Seat availability, While saving the record
system generate PRN no, seat no and coach no. Before save the system ask for final
confirmation. System automatically calculates the fare and save the details.
Cancellation – For cancellation of ticket it ask for PRN no, after entering the correct PRN
no system check for validity of the PRN no, whether it already cancelled, journey date
already expired. I it validate system display all the details of the reservation.
System automatically calculates the cancellation fees from the cancellation
rule master. Before save the record system ask for the confirmation.
Update Seat no for unconfirmed passenger – It is schedule activity, system
query for all cancelled ticket for particular journey date and allocates all vacant
seat to unconfirmed passenger.
Daily Cash Transaction – It shows daily transaction, like how much money received
and how much money refund. All data can be exported to MS Excel for review and
save in file system.
Query Module
A powerful query module give on screen information for particular PRN NO, it shows all the
reservation details and cancellation details, include current status for the seat no, coach no.
Both of these areas of functionality will be delivered as the first version of the
Railway Reservation System is released. Functionality is described in more detail
later in this document.
7|Page
Out of Scope
The following functions are considered out of scope for Version 1 of the Railway Reservation
System. Versions 2.0 address items not in scope and those deemed not feasible during V1.0.
Function
Comment Version
Linking and integration of any Required by management to 2
legacy system for accounting. control and maintain the
accounting activity
Integration with banks and other Help to updated and share 2
credit verification agency the data
Connection to third-party OLAP 2
applications
Sophisticated system to host in 2
internet and used to connect all
travel agents.
Electronic Data Interchange (EDI) Aimed to reduce costs and 2
system between different time in the data sharing
department
This section presents a conceptual overview of the solution, and then provides
an introduction to its requirements.
Solution Concept
The Railway Reservation System consists of:
Security Modules:
Security modules include security features like user management and
application level password management.
Master Management module: It includes all master like station, train, all rules
which are used to calculate fare and cancellation charges.
Transaction Module – It includes reservation, cancellation of ticket. Update of
seat no and coach no for unconfirmed passengers.
Query Modules.
A powerful query module give on screen information for particular PRN no, system
user can view all information for particular ticket in one screen by entering PRN no.
8|Page
Problem Statement
Requirements Summary
The following preliminary lists are based on initial interviews
Business Requirements
The business goal for the application is to support an increase the productivity and complete
automation of existing manual or semi automatic railway reservation process. Business
requirements are discussed in the Scope section, with the following additional detail:
Improve the search facility and system users should get all the information in
a second.
System should have security features in built as it handles sensitive personal
and finance information of the customer.
User must not delete any data, Administrator can only have the rights to delete
the data,
System Administrator must able to control the access rights by each user as per
requirement.
The application should support the capability to use multi user environment.
The system users want to improve their current ability to analyze customer data. In
particular, they want to focus on identifying their best customer and who are defaulter.
To enable them to accomplish this goal, they want to extract meaningful data that easily
answers the following questions:
User Requirements
User requirements are categorized by user type.
System Users
Able to search and view the ticket information by only PRN no..
Able to find all the information like reservation details, seat details, in one screen
to give answer to customer query.
Must able to change the his or her own password
System must able to calculate all fare automatically.
9|Page
Supervisor
Operational Requirements
The following requirements provide a high-level view of how the system will run:
10 | P a g e
System Architecture
Retrieval
Transactional Facade Facade
Data Access
OLTP Access OLAP Access
Data Warehouse
Data
11 | P a g e
User Profiles
The following user types are expected for the Railway Reservation System:
Usage Summary
Railway Reservation System Version 1.0 will address the following use cases. The complete
usage scenarios will be completed during the information-gathering process. Use cases will
be created and prioritized. Selected use cases will be expanded into usage scenarios and
features that are derived from both use cases and the usage scenarios, as represented in
the following diagram:
12 | P a g e
Usage summary use case
13 | P a g e
Software and Hardware Requirement
14 | P a g e
Development Tools and Technologies
Front End
1. VB 6
Why VB6?
VB6 is built on the Windows Server System to take major advantage of the OS and
which comes with a host of different servers which allows for building, deploying,
managing and maintaining Windows Based solutions. The Windows Server System
is designed with performance as priority and it provides scalability, reliability.
Back End
1. MS Access
Why MS Access?
MS Access is desktop RDMS support small application with all features like
relational query, different data types, joins, and query. Includes
Easy to use and easy to deployment.
Integration with Windows OS
Scalability
Import and Export of data in all major database system.
Centralized Management
Reliability
Automating Tasks
15 | P a g e
Development Environment
1. Visual Studio 6.0
2. Microsoft Office
Processor utilization should not exceed 80 percent during all concurrent users are using
the system.
Availability
Because the system is accessed by users of the bank and staff for customer query, and
their should not be any single point of failure.
Reliability
Because of the need no single point failure, automatic failover will be required. In addition,
existing disaster recovery and backup plans and procedures must be revised to
incorporate the Railway Reservation System.
Scalability
Railway Reservation System an average load of 25 concurrent users after the system is
fully operational, and expects that to grow by 5 percent each year for the next five years.
Security
For the sensitive member information, all users will need to log on the system with their
user id and password.
Every resource in the system are defined by the role and privileged. System administrator
assigned user role and privileged for their access rights.
Interoperability
In Version 1.0 of the Railway Reservation System, there are no requirements
for interoperability with other systems.
Location
The Railway Reservation System is implemented in banks existing network.
Setup/Installation
Setup and installation must not interrupt the system user’s daily tasks and work flow.
16 | P a g e
Use Case
Manage Users
Description
This function will enable administrator to modify user information.
Business Need
This function will enable system users to interact with Railway Reservation System
catalog directly without the intervention of any other employees.
Priority
Medium
Manage Reservation
Description
This function allows user of Railway Reservation System to create new ticket reservation.
Business Need
This function will support the system users to create new reservation
Priority
High
Manage Cancellation
Description
This function enables the user to cancel ticket.
Business Need
This function enables user of Railway Reservation System to have enter PRN no and
cancel ticket.
Priority
High
17 | P a g e
PRN Query
Description
This function allows system user query to database for ticket information.
Business Need
This function will allow user to retrieve the latest ticket. Information by providing PRN no
Priority
High
Intent
Scenario Narrative
Administrator may want to modify the contact details of a user.
Assumptions/Preconditions
Actors
Administrator
Basic Course
Use case begins when the actor decides to modify user information.
System opens the user master information.
Actor navigates the required information from.
Actor press Edit button and make the necessary changes in the record.
Actor press Save button to save the record in the user master catalog.
Use case ends when the selected information is passed to a method of delivery.
18 | P a g e
Alternate Course
Future Requirements
The system users may want to apply filters to the retrieved data.
The system users may want to sort the data. For example, the system user want to list
the names of user in chronological order based on the entry date.
Update Master
Apply
Validation
Navigate Users
19 | P a g e
Use Case Manage Reservation
Title: Manage Reservation
Abbreviated Title: Manage Reservation
Requirement ID: 13
Intent
Scenario Narrative
Assumptions/Preconditions
The actor has rights to access to the Railway Reservation System, and having rights to make
new reservation.
Actors
User
Supervisor
Administrator
Basic Course:
20 | P a g e
Use Case Model: Manage Reservation
Check train
schedule
Validation
User
Transaction
Add passenger
details
Supervisor
Administrator
21 | P a g e
Use Case Manage Cancellation
Title: Manage Cancellation
Abbreviated Title: Manage Cancellation
Requirement ID: 16
Intent
Scenario Narrative
Assumptions/Preconditions
The actor has rights to access to the Railway Reservation System, and having rights to cancel
ticket.
Actor
User
Supervisor
Administrator
Basic Course:
22 | P a g e
Use Case Model: Manage Cancellation
Enter PRN No
Reservation
User Deatils
Validate the
PRN No
Cancellation
Rule
Calculate
Cancellation
Transcation
Update Details
23 | P a g e
Use Case PRN Query
Title: PRN Query
Abbreviated Title: PRN Query
Requirement ID: 19
Intent
Scenario Narrative
Assumptions/Preconditions
The actor has rights to access to the Railway Reservation System, and having rights to
query the database for reservation details.
Actors
User
Supervisor
Basic Course:
Use case begins when actor want to view the reservation details.
Actor enters PRN no.
System validates PRN no.
Systems displays latest information related to reservation, seat no coach no..
24 | P a g e
Railway Reservation System Data Dictionary
Table : cancellation_rules
Owner: dbo
Destination DB name: erail
Number of columns: 4
Number of indexes: 1
Number of foreign keys: 0
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
Table : cash_master
Owner: dbo
Destination DB name: erail
Number of columns: 6
Number of indexes: 2
Number of foreign keys: 1
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
25 | P a g e
Table : coach_type_master
Owner: dbo
Destination DB name: erail
Number of columns: 1
Number of indexes: 1
Number of foreign keys: 0
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
Table : other_fees
Owner: dbo
Destination DB name: erail
Number of columns: 3
Number of indexes: 2
Number of foreign keys: 1
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
26 | P a g e
Table : reservation_master
Owner: dbo
Destination DB name: erail
Number of columns: 15
Number of indexes: 3
Number of foreign keys: 2
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
27 | P a g e
Table : reservation_transaction
Owner: dbo
Destination DB name: erail
Number of columns: 9
Number of indexes: 2
Number of foreign keys: 1
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
Table : stage_master
Owner: dbo
Destination DB name: erail
Number of columns: 5
Number of indexes: 2
Number of foreign keys: 1
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
28 | P a g e
Table: station_master
Owner: dbo
Destination DB name: erail
Number of columns: 4
Number of indexes: 1
Number of foreign keys: 0
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
Table : train_master
Owner: dbo
Destination DB name: erail
Number of columns: 11
Number of indexes: 1
Number of foreign keys: 0
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
29 | P a g e
Table : train_schedule
Owner: dbo
Destination DB name: erail
Number of columns: 7
Number of indexes: 2
Number of foreign keys: 1
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
Table : user_master
Owner: dbo
Destination DB name: data
Number of columns: 16
Number of indexes: 2
Number of foreign keys: 0
Extended attributes:
OnFileGroup PRIMARY
Clustered PK Yes
30 | P a g e
Railway Reservation System– Data Schema ER Diagram
31 | P a g e
Railway Reservation System : Main Screen
FrmMain
32 | P a g e
Option Explicit
End Sub
FrmChangePassword.Caption = OldCap
FirstLoin = False
End If
StatusBar1.Panels(1).Text = UserName
StatusBar1.Panels(2).Text = Now
End Sub
33 | P a g e
Railway Reservation System : Train Schedule
FrmTrainSchedule
34 | P a g e
Option Explicit
Dim Rs1 As New ADODB.Recordset
Dim AddEdit As String
Private Sub ChkViewAll_Click()
p = Rs1.AbsolutePosition
'>> Rs1.Requery
Rs1.MoveFirst Rs1.Move
p-1
Call displayRecord
End If
End Sub
35 | P a g e
If MsgBox("Delete the Record ? ", vbCritical + vbYesNo) = vbYes Then
Rs1.Delete
Call ClearText
'>>> show next record
Command4_Click
End If
Exit
Sub myer1:
MsgBox "Error Occured : " & Err.Description,
vbCritical End Sub
Rs1.MoveFirst
End If
Call displayRecord
End Sub
Rs1.MoveLast
End If
Call displayRecord
End Sub
36 | P a g e
Private Sub Command5_Click()
'>>> move record set to last record and display the record
On Error Resume Next
If Rs1.State = adStateClosed Then Exit Sub
If Rs1.RecordCount <= 0 Then Exit Sub
Rs1.MoveLast
Call displayRecord
End Sub
AddEdit = "ADD"
Call ClearText
DE False, True
CmbTrainNo.SetFocus
End Sub
AddEdit = "EDIT"
DE False, True
CmbTrainNo.SetFocus
End Sub
37 | P a g e
If IsNumeric(TxtDistance.Text) = False Then
MsgBox "Enter distance", vbExclamation
TxtDistance.SetFocus
Exit Sub
End If
Rs1.AddNew
Rs1("schedule_id") = LastSno
Rs1("train_no") = Val(CmbTrainNo.Text)
Rs1("station_id") = ReturnText("select station_id from station_master where station_code ='"
& CmbStation.Text & "'")
Rs1("distance") = Val(TxtDistance.Text)
Rs1("arival_time") = DtArrivalTime.Value
Rs1("departure_time") = DtDepartureTime.Value
Rs1("day") = Val(TxtDay.Text)
Rs1.Update
Rs1.MoveLast Call
displayRecord
Else
Rs1("train_no") = Val(CmbTrainNo.Text)
Rs1("station_id") = ReturnText("select station_id from station_master where station_code ='"
& CmbStation.Text & "'")
Rs1("distance") = Val(TxtDistance.Text)
Rs1("arival_time") = DtArrivalTime.Value
Rs1("departure_time") = DtDepartureTime.Value
Rs1("day") = Val(TxtDay.Text)
Rs1.Update Dim
p As Integer
p = Rs1.AbsolutePosition
Rs1.Requery
Rs1.MoveFirst Rs1.Move
p-1
Call displayRecord
End If
38 | P a g e
DE True, False
Exit Sub
myer1:
MsgBox "Error Occured : " & Err.Description,
vbCritical End Sub
End Sub
End Sub
39 | P a g e
Railway Reservation System : Reservation
FrmReservation
Option Explicit
40 | P a g e
FillCombo "SELECT station_master.station_code FROM station_master INNER JOIN train_schedule ON
station_master.station_id = train_schedule.station_id where train_schedule.train_no =" & Val(CmbTrainNo.Text)
& " order by station_master.station_id", CmbStationFrom
FillCombo "SELECT station_master.station_code FROM station_master INNER JOIN train_schedule ON
station_master.station_id = train_schedule.station_id where train_schedule.train_no =" & Val(CmbTrainNo.Text)
& " order by station_master.station_id", CmbUpto
FillCombo "SELECT station_master.station_code FROM station_master INNER JOIN train_schedule ON
station_master.station_id = train_schedule.station_id where train_schedule.train_no =" &
Val(CmbTrainNo.Text) & " order by station_master.station_id", CmbBoardingAt
41 | P a g e
If CheckListValue(CmbStationFrom.Text, CmbStationFrom) = False Then
MsgBox "Select station from.", vbExclamation
CmbStationFrom.SetFocus
Exit Sub
End If
42 | P a g e
End If
If Jday = "FRI" Then
If a(4) = 0 Then
Ch = False
End If
End If
If Jday = "SAT" Then
If a(5) = 0 Then
Ch = False
End If
End If
If Jday = "SUN" Then
If a(6) = 0 Then
Ch = False
End If
End If
If Ch = False Then
MsgBox "Selected Train not start in " & Format(DtJourneyDate.Value, "Dddd"), vbExclamation
Exit Sub
End If
Else
MsgBox "No Details found for the selected train no.", vbExclamation
LblTrainName.Caption = ""
CmbTrainNo.SetFocus
Exit Sub
End If
43 | P a g e
'>>> get the count already booked
If Rs1.State = 1 Then Rs1.Close
Rs1.Open "select count(*) from reservation_master where format(journey_date,'dd-MMM-yy')='" &
Format(DtJourneyDate.Value, "dd-MMM-yy") & "' and coach_type ='" & CmbCoachType.Text & "'", Cn,
adOpenStatic, adLockReadOnly
MsgBox TotalSeat - Rs1(0) & " seats are available.", vbExclamation
Exit Sub
End Sub
'>>> validate
44 | P a g e
If CheckListValue(CmbUpto.Text, CmbUpto) = False Then
MsgBox "Select station upto.", vbExclamation
CmbUpto.SetFocus
Exit Sub
End If
45 | P a g e
End If
If Jday = "SAT" Then
If a(5) = 0 Then
Ch = False
End If
End If
If Jday = "SUN" Then
If a(6) = 0 Then
Ch = False
End If
End If
If Ch = False Then
MsgBox "Selected Train not start in " & Format(DtJourneyDate.Value, "Dddd"), vbExclamation
Exit Sub
End If
Else
MsgBox "No Details found for the selected train no.", vbExclamation
LblTrainName.Caption = ""
CmbTrainNo.SetFocus
Exit Sub
End If
46 | P a g e
If MsgBox(TotalSeat - Rs1(0) & " seats are available. Do you want to continue?", vbExclamation + vbYesNo)
= vbNo Then
Exit Sub
End If
Rs1.MoveFirst
For i = 0 To Rs1.RecordCount
If TotalDistance > Rs1("dis_from") And TotalDistance <= Rs1("dis_upto") Then
TicketFare = Rs1("ticket_amount")
Exit For
End If
Rs1.MoveNext
Next
Else
MsgBox "No fare details found for the train.", vbExclamation
Exit Sub
End If
48 | P a g e
Dim TrnId As Integer
If Rs1.State = 1 Then Rs1.Close
Rs1.Open "select max(trn_id) from reservation_transaction ", Cn, adOpenStatic, adLockReadOnly
TrnId = IIf(IsNull(Rs1(0)) = True, 0, Rs1(0)) + 1
49 | P a g e
SNo = SNo + 1
Rs1("seat_no") = SNo
Rs1("coach") = CNo
End If
Rs1("is_cancel") = 0
Rs1.Update
TrnId = TrnId + 1
Next
Rs1.Update
If MsgBox("Do you want to save the record ?", vbExclamation Or vbYesNo) = vbNo Then
Cn.RollbackTrans
Else
50 | P a g e
Cn.CommitTrans
MsgBox "Ticket saved.", vbInformation
ClearText
End If
End Sub
Dim i As Integer
For i = 0 To 5
CmbSex(i).AddItem "M"
CmbSex(i).AddItem "F"
Next
ClearText
End Sub
Private Sub ClearText()
TxtPrnNo.Text = ""
DtJourneyDate.Value = Date
CmbTrainNo.Text = ""
LblTrainName.Caption = ""
CmbCoachType.Text = ""
CmbStationFrom.Text = ""
CmbUpto.Text = ""
CmbBoardingAt.Text = ""
Dim i As Integer
For i = 0 To 5
TxtPassenger(i).Text = ""
TxtAge(i).Text = ""
CmbSex(i).Text = ""
TxtCoach(i).Text = ""
TxtSeat(i).Text = ""
Next
TxtReservationFees.Text = ""
TxtSuperFastFees.Text = ""
TxtTotalFees.Text = ""
End Sub
51 | P a g e
Railway Reservation System : Cancellation
FrmCancellation
Option Explicit
Dim Rs1 As New ADODB.Recordset
Private Sub Command2_Click()
TxtPrnNo.Text = ""
ClearText
TxtPrnNo.SetFocus
End Sub
52 | P a g e
'>>> check for already journey
start Dim StrStartTime As String
Dim Rs2 As New ADODB.Recordset
If Rs2.State = 1 Then Rs2.Close
Rs2.Open "select * from train_schedule where train_no =" & Rs1("train_no") & " order by schedule_id
", Cn, adOpenStatic, adLockReadOnly
StrStartTime = Format(Rs2("arival_time"), "HH:nn")
If Rs2.State = 1 Then Rs2.Close
Cn.BeginTrans
Cn.Execute " update reservation_master set cancel_fees = " & Val(TxtCancellationFees.Text) & "
, cancel_by =" & UserID & ",cancel_date = now() where prn_no =" & Val(TxtPrnNo.Text)
Cn.Execute "update reservation_transaction set is_cancel = 1 where prn_no = " & Val(TxtPrnNo.Text)
Rs2.Update
53 | P a g e
If MsgBox("Do you want to cancel this ticket?", vbExclamation Or vbYesNo) = vbNo
Then Cn.RollbackTrans
Else
Cn.CommitTrans
MsgBox "Ticket cancelled.", vbInformation
ClearText
TxtPrnNo.Text = ""
TxtPrnNo.SetFocus
End If
Else
MsgBox "Invalid PRN no, no deatils found.", vbExclamation
Exit Sub
End If
End Sub
TxtJourney.Text = ""
TxtTrainNo.Text = ""
LblTrainName.Caption = ""
TxtCoachType.Text = ""
TxtStationFrom.Text = ""
TxtUpto.Text = ""
TxtBoarding.Text = ""
Dim i As Integer
For i = 0 To 5
TxtPassenger(i).Text = ""
TxtAge(i).Text = ""
CmbSex(i).Text = ""
TxtCoach(i).Text = ""
TxtSeat(i).Text = ""
Next
TxtReservationFees.Text = ""
TxtSuperFastFees.Text = ""
TxtTotalFees.Text = ""
TxtCancellationFees.Text = ""
TxtTotalRefund.Text = ""
End Sub
54 | P a g e
Private Sub TxtPrnNo_KeyDown(KeyCode As Integer, Shift As
Integer) If KeyCode = 13 Then
ClearText
If Rs1.State = 1 Then Rs1.Close
Rs1.Open "select * from reservation_master where prn_no=" & Val(TxtPrnNo.Text), Cn,
adOpenStatic, adLockReadOnly
If Rs1.RecordCount > 0 Then '>>>
check for already cancelled
If IsNull(Rs1("cancel_date")) = False Then
MsgBox "PRN no already cancelled.",
vbExclamation Command3.Enabled = False
'Exit
Sub End If
TxtJourney.Text = Rs1("journey_date")
TxtTrainNo.Text = Rs1("train_no")
TxtCoachType.Text = Rs1("coach_type")
TxtStationFrom.Text = Rs1("from_station")
TxtUpto.Text = Rs1("to_station")
TxtBoarding.Text = Rs1("boarding_at")
TxtReservationFees.Text = Rs1("re_fees")
TxtSuperFastFees.Text = Rs1("re_fees")
TxtTotalFees.Text = Rs1("ti_fees")
Else
Command3.Enabled = True
TxtCancellationFees.Text = ""
TxtTotalRefund.Text = ""
End If
55 | P a g e
'>>> get details from reservation
trnsaction If Rs2.State = 1 Then Rs2.Close
Rs2.Open "select * from reservation_transaction where prn_no =" & Val(TxtPrnNo.Text) & " order
by trn_id ", Cn, adOpenStatic, adLockReadOnly
If Rs2.RecordCount > 0
Then Dim i As Integer
Rs2.MoveFirst
For i = 0 To Rs2.RecordCount - 1
TxtPassenger(i).Text = Rs2("p_name")
TxtAge(i).Text = Rs2("p_age")
CmbSex(i).Text = Rs2("p_gender")
TxtCoach(i).Text = Rs2("coach")
TxtSeat(i).Text = Rs2("seat_no")
Rs2.MoveNext
Next
End If
Else
MsgBox "Invalid PRN no, no deatils found.", vbExclamation
Exit Sub
End If
End If
End Sub
56 | P a g e
Railway Reservation System : Daily Transaction
FrmDailyTranscation
57 | P a g e
Option Explicit
Dim Rs1 As New ADODB.Recordset
Set Ex = CreateObject("excel.application")
Set Wb = Ex.workbooks.Add
Set Ws = Wb.worksheets(1)
Dim i, j As Integer
For i = 0 To MF1.Rows - 1
For j = 0 To MF1.Cols - 1
Ws.cells(1 + i, 1 + j).Value = MF1.TextMatrix(i, j)
Next
Next
Ex.Visible = True
Ex.quit
CmdExportToExcel.Enabled = True
End Sub
MF1.Rows = 2
MF1.Cols = 2
MF1.Clear
MF1.Refresh
58 | P a g e
MF1.Rows = Rs1.RecordCount + 1
MF1.Cols = Rs1.Fields.Count
Rs1.MoveFirst
For i = 0 To Rs1.RecordCount - 1
For j = 0 To Rs1.Fields.Count - 1
If IsNull(Rs1(j).Value) = False Then
MF1.TextMatrix(i + 1, j) = Rs1(j).Value
End If
Next
Rs1.MoveNext
Next
Else
MsgBox "No record found.", vbExclamation
End If
'>>close recordset
If Rs1.State = adStateOpen Then Rs1.Close
End Sub
End Sub
59 | P a g e
Railway Reservation System : PRN Query
FrmPRNQuery
Option Explicit
Dim Rs1 As New ADODB.Recordset
60 | P a g e
Private Sub ClearText()
TxtJourney.Text = ""
TxtTrainNo.Text = ""
LblTrainName.Caption = ""
TxtCoachType.Text = ""
TxtStationFrom.Text = ""
TxtUpto.Text = ""
TxtBoarding.Text = ""
Dim i As Integer
For i = 0 To 5
TxtPassenger(i).Text = ""
TxtAge(i).Text = ""
CmbSex(i).Text = ""
TxtCoach(i).Text = ""
TxtSeat(i).Text = ""
Next
TxtReservationFees.Text = ""
TxtSuperFastFees.Text = ""
TxtTotalFees.Text = ""
TxtCancellationFees.Text = ""
TxtTotalRefund.Text = ""
End Sub
'Exit Sub
End If
61 | P a g e
If CDate(Format(Rs1("journey_date"), "dd-MMM-yy ") & StrStartTime) < Now
Then MsgBox "You can not cancel this ticket, journey date expired.",
vbExclamation Exit Sub
End If
TxtJourney.Text = Rs1("journey_date")
TxtTrainNo.Text = Rs1("train_no")
TxtCoachType.Text = Rs1("coach_type")
TxtStationFrom.Text = Rs1("from_station")
TxtUpto.Text = Rs1("to_station")
TxtBoarding.Text = Rs1("boarding_at")
TxtReservationFees.Text = Rs1("re_fees")
TxtSuperFastFees.Text = Rs1("re_fees")
TxtTotalFees.Text = Rs1("ti_fees")
TxtCancellationFees.Text = Rs1("cancel_fees")
TxtTotalRefund.Text = Val(TxtTotalFees.Text) - Val(TxtCancellationFees.Text)
Else
TxtCancellationFees.Text = ""
TxtTotalRefund.Text = ""
End If
Rs2.MoveNext
Next
End If
Else
MsgBox "Invalid PRN no, no deatils found.", vbExclamation
Exit Sub
End If
End If
End Sub
62 | P a g e
Railway Reservation System Test Plan
Introduction
This document describes the user acceptance test plan for the Railway Reservation
System. The complete test strategy for the Railway Reservation System is to perform the
following kinds of tests, in sequence:
Acceptance testing is the last set of tests to be performed before the application
goes officially live.
Test Scope
The scope of the user acceptance testing covers:
The aim of the testing is to determine how well the application meets its functional
requirements from the perspective of the user, and to identify any issues so they can be
resolved. Also, the testing serves to compile a set of test data and results that can be used
during subsequent test cycles, to test for non-regression of the software in later releases
or after the application is in maintenance.
Working practices might vary from user to user and are considered outside the scope of
the testing.
63 | P a g e
Test Strategy
The basis of user acceptance testing is that other tests were completed successfully, so the
application and its required infrastructure are considered to be stable and reliable.
Acceptance testing concentrates on the application from the user’s perspective, that is,
how the application is used and whether it meets the necessary quality criteria.
Change requests will be sent to the development team as the actionable documentation.
Change criteria will be determined by the Test team and the Development team prior to the
beginning of testing. For instance, criteria may include impact to desired functionality,
amount of code impacted by proposed change, and design required by proposed change. The
tester will evaluate the criteria. The test lead will determine Change Required or not. Once a
bug has been determined as Change Required, the bug report will be translated into a
Change Request and passed on to development.
The customer of the acceptance testing is the System Users, Supervisor and
Adminstratorfor Railway Reservation System. The progress of the acceptance testing will be
reported to the customer, together with any issues that are discovered and their planned
resolutions. Sign-off of the tests, and therefore the acceptance of the application, will be
performed by the customer or a selected representative.
Preconditions
The following items are required before testing can take place:
Test Priorities
During testing of the Railway Reservation System, the following qualities will be tested
in order of priority:
Functionality—whether the required functions are available and working as expected
Usability—how user-friendly and intuitive the Railway Reservation System is
Security—how well-protected and guaranteed corporate and user data is
Performance—whether the response times are within acceptable limits
Customization—how straightforward it is to use the application in new,
unpredicted ways
64 | P a g e
Test Techniques
The following techniques will be applied:
Scripted tests—sequences of user interactions (based on the use case and
usage scenarios) using predefined data sets against predicted results
Unscripted tests—based on scripted tests, the tester tries to modify the scenarios
to explore what-if possibilities
Penetration tests—scripted tests to attempt unauthorized entry into the system
Usability checklists—tests to determine the complexity of interactions
Performance statistics—generation of performance information to check
against desired performance criteria
Test Organization
Weekly team meetings will be held involving the test manager, testers, and product
managers. At these meetings, the progress of the testing process will be reported, any
issues will be discussed, and actions will be agreed upon.
Deliverables
The following deliverables will be expected from the user acceptance testing process:
Test plan—this document, together with any updates that have occurred during
the testing process
Change requests—any bugs, defects, or other changes required to the
Railway Reservation System as a result of the testing process
Weekly reports—progress reports to enable the status of the testing process to
be determined
Completion report—a report to be signed off by the customer, to signify the
successful completion of the user acceptance testing
65 | P a g e
Test Environment
Server
Client Workstations
Application Configuration
The following user accounts will be configured on the server:
System Administrator
System Users 1
System Users 2
Supervisor
66 | P a g e
Test Management
Tests shall be managed according to the corporate test management standards, which cover:
Conduct of tests
Reporting of test results
Defect tracking and resolution
Configuration management of the test environment
Configuration control of test deliverables.
Testing Schedules
The user acceptance testing schedules are shown in the project structure document
and resulting Gantt charts.
Threats to Testing
Potential threats to the testing process are as follows:
Insufficient resources available for testing. Testing resources have been seconded
from the development departments, whose time is at a premium. Mitigation: ensure
department heads apply a high priority to the testing of the Railway Reservation
System.
Availability of sales personnel for testing. The test team should be overseen by at
least one sales representative. Mitigation: gain prior agreement from the vice president
of Sales for two sales representatives to be assigned to test the application.
67 | P a g e
Conclusion and future enhancement
This project was developed to fulfill user and business requirement; however there are
lots of scope to improve the performance of the Railway Reservation System in the area of
user interface, database performance, and query processing time. Etc.
So there are many things for future enhancement of this project. The future
enhancements that are possible in the project are as follows.
68 | P a g e
Bibliography
Websites
http://www.google.com
http://www.microsoft.com
http://www.programmer2programmer.net
http://www.codeproject.com
http://www.msdn.com.
http://www.vb123.com
http://www.vbcode.com
http://www.sqltuner.com
Books
69 | P a g e