Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 60

METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER 1

INTRODUCTION

The objective behind developing METRO TRAIN MANAGEMENT SYSTEM is to


maintain the hierarchy of the employees within an organization. It provides the manger and
administrative department an overall hierarchical view of the complete enterprise and helps
the m in managing employees. Every Organization has many managers, who are responsible
for all the activities in the organization. . These managers manage different aspects of the
organizational management issues, such as manufacturing, production, Marketing, etc; one
such essential management issue is Metro Train Management System

As years progressed, the approach of the management changed towards the human capital.
Now Hierarchical Organization is part of every organization, and has its own identity and
importance. In this scenario, the bigger organizations need to put lot of effort in the
management of human Resources, as they are underlying capital asset to the organization.

1.1 Problem Definition


Almost every activity in the world today is controlled by computer driven software
programs. This trend was first accommodated by engineering applications in the past.
However, as the life style became more and more complex, every area of human interactions
was invaded by various software systems, such as real time, business, simulation, embedded,
web based, personal and more recently, artificial intelligence software etc. In real world, it
tends to associate with automated systems as they provide many benefits than doing the same
thing in manually. As above mentioned, here we have introduced a system which can be used
to maintain an Metro Train Management System .When we are concerning the manual
process of an Metro train management system the major problem is the waste of time In an
Metro train management system we should deal with a large number of users. The Admin has
to maintain it with documents which are recorded by him. Therefore, there may be defective
reports. Then the Metro train management system has to have an additional cost.

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 1


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
1.2 Existing system description

Every Organization has many managers, who are responsible for all the activities in
the organization. These managers manage different aspects of the organizational management
issues, such as manufacturing, production, Marketing, etc; one such essential management
issue is Metro train management system.

Some of the features are: Maintenance of profile details of the employees, and retrievals as
and when required.

 Future planning issues based on the current HR information.

 Employees success planning.

 Employee motivational & conflict resolving issues.

 We need to consider while doing the project.

 The user should be provided with all information of the employee details.

 User-friendly interface with minimal training

 Intranet based application

 Provide facilities for future planning

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 2


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER 2

LITERATURE SURVEY

Metro passenger route choice is vitally important to metro operation and management,
such as passenger flow distribution and metro tickets clearing. It can provide useful data to
help enhance train schedules to make full use of the train capacity. However, the metro
passenger behavior is totally different from the car user behavior. The former one is largely
influenced by both metro network structure and train schedule while the latter one is mostly
decided by users themselves. On one hand, different metro network structures will lead to
different route choices. For example, passengers would like to select those routes with few
transfers. On the other hand, the train schedule will also influence passenger behaviors.
Coordinated transit line could reduce passengers’ waiting time in transfer stations. The routes
with coordinated transit line should be more attractive than those without coordinated transit
line.

So far, many scholars have modeled, analyzed, and studied the problem of passenger route
choice behavior within private transportation, such as Kato et al. [1]. Unlike private
transportation, metro trains are operated according to the train schedule, leading metro
passengers’ traveling to be restricted to the schedule. Therefore, traditional methods used in
private transportation are not applicable for analyzing metro passenger behavior. Hence, the
researchers tried to adopt some technologies widely used in metro transportation into the
metro passenger behavior analysis. Among them, AFC (Automatic Fare Collection) system
can collect these smart card data about passenger swipe inbound and outbound time of
stations, which is useful for analyzing passenger behavior. A lot of research has been done to
analyze passenger route choice based on smart card data. However, passengers with different
walking time and waiting time may select the same route as metro trains’ arrival and
departure are dispersed. Hence, passengers walking time to/from platforms and waiting time
on platforms which were included in the smart card data should be useless for the analysis of
passenger route choices.

This paper aims to propose a new method to analyze metro passenger route choice over travel
periods based on smart card data and train schedule. Firstly, smart card data are trimmed
using train schedule to eliminate walking time to/from platforms and waiting time. Then

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 3


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
synchronous clustering algorithm, a kind of cluster algorithm, is applied to analyze passenger
route choice based on these preprocessed data. Finally, a case study is carried out on the
Shanghai metro network to validate the proposed algorithm.

Traditional methods on passenger behavior can be classified by Wardrop Law as


nonequilibrium model and equilibrium model .They believed that passengers’ trip preference
depends on travel time perception while individuals’ perceptions are different. Some scholars
put forward the stochastic user equilibrium model to describe the problem. A simulation
method was used to realize random users equilibrium model, and experiments were carried
out in a large scale urban rail transit network. With the continuous expansion of parameter
types and network sizes, SUE model has been becoming more and more complex for the
reality. However, some scholars found that the traditional models may have some defects
when they are applied in metro transportation. The main reason is that passengers’ travel
routes are affected by metro train schedule; that is to say, metro passengers’ arrival and
departure are limited to trains’ arrival and departure. Thus the applicability of these
traditional models is questioned.

The AFC system has been put into application in many metro systems worldwide.
AFC system can record these data including passenger inbound swiping time, outbound
swiping time, and some other related information. These data are useful in analyzing the
passengers’ route behaviors in metro. Pelletier divided the usage of smart card data into three
categories, long-term planning service, short-term planning service, and operation planning
service. For example, swipe card data can be used to forecast the passenger flow OD matrix,
to deal with demand analysis, to carry on operation and management of rail transit planning.

Specifically, smart card data are getting more attention and more research has been
made recently. Chan put forward two research ideas based on London metro transit Oyster
card data: one was to estimate the OD traffic matrix and the other was to build the metro
transit service reliability matrix. This is the first time to use historical card data to make
metro transit service quality evaluation. The main application of smart card is to analyze
passenger travel behavior. For example, Kusakabe et al. Proposed a method to predict the
specific trains that passengers choose to ride by using a vast number of long-term history
swipe data and parameters. Zhu et al. proposed a method to calibrate the metro passenger
behavior model using the AFC data with the genetic algorithm and parameter estimation

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 4


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
combining technology. Zhu et al. Presented a methodology for assigning passengers to
individual trains using both smart card data and AVL data from train tracking systems; it can
estimate the probability of the passenger boarding each feasible train and the probability
distribution of the number of trains a passenger is unable to board due to capacity constraints.
Ma et al. developed a data mining method to identify the spatiotemporal commuting patterns
of Beijing public transit riders using transit smart card data. Hong et al. proposed a
methodology for assigning passenger flows on a metro network based on Automatic Fare
Collection data and realized timetable. Briand et al. analyzed the behavioral habits of public
transport passengers using a real dataset of smart card data covering a period of five years.
Faroqi et al. investigated the relationship between passengers’ spatial and temporal
characteristics with a novel passenger-based perspective using smart card data. It is
implemented for four-day smart card data including 80,000 passengers in Brisbane, Australia.
Similarly, Zhu et al. presented an integrated framework for estimating individual passenger’s
train choices through a data-driven approach with real timetable and Automatic Fare
Collection data. Besides, smart card data can also be used for estimation or prediction. For
example, Hörcher et al.presented a comprehensive method to estimate the user cost of
crowding in terms of the equivalent travel time loss with large scale smart card, in a revealed
preference route choice framework. Zhao et al. developed a methodology for predicting daily
individual trip making and trip attributes using transit smart card data, and the methods are
tested using transit smart card data of 10,000 users in London. Also, smart card data are used
to make metro train schedule. Zhang et al. proposed a novel method to optimize the skip-stop
scheme for bidirectional metro lines using the time-dependent passenger demand extracted
from smart card data, so that the average passenger travel time can be minimized.

Some recent studies have made some progress on analyzing passenger behavior based on
smart card data, part of which are useful for realistic size networks. The specific focus of this
paper is to propose a method specifically aimed at using a small number of parameters, so
that it can be easily used for large scale networks. Hence, this paper uses data analysis
methods, i.e., cluster algorithm, to analyze the passenger route choice behaviors on metro
networks. The cluster algorithm is a method of multivariate statistical analysis. Data are
classified according to individual characteristics so that the data in the same category have
the highest homogeneity. On the other hand different categories should have relatively higher
heterogeneity. The cluster algorithm aims to analyze and mine the intrinsic structure and rules

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 5


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
of given data. In the process of data clustering, the clustering algorithm can automatically
divide data points into different sets according to the attributes. These data with similar
attributes are divided into the same set, while these data points with different attributes are
divided into different sets . Clustering algorithms can be divided into several types: clustering
algorithms based on division, clustering algorithms based on density, affinity propagation
clustering algorithm , synchronous clustering algorithm, etc.

K-means algorithm is the most widely used clustering algorithm based on division. It has
been nearly 60 years since it was proposed. However, the biggest shortcoming of the K-
means algorithm is to select the initial K value and the value of the selected K data points
since the initial value may lead the convergence of the K-means algorithm to different results.
Hence, many scholars proposed other new clustering algorithms, among which AP algorithm
is one kind of typical clustering algorithms. AP clustering algorithm does not need to specify
the number of clusters in advance. Synchronous clustering algorithm  is another kind of
clustering algorithm of which initial values are not sensitive. The main idea of synchronous
clustering is that each data point is regarded as an independent individual, and similar
individuals automatically get together to form clustering collections. Due to the
characteristics of synchronous clustering algorithm, this algorithm has many advantages; for
example,  the algorithm does not require given cluster centers in advance,  the algorithm is
not sensitive to the initial value, and  the algorithm can well avoid noise interference data.

However, to our best knowledge, no studies adopted the SynC algorithm to analyze metro
passenger route choices with smart card data trimmed by train schedules. Hence, taking the
advantages of the synchronous clustering algorithm into consideration, this paper adopts the
SynC algorithm to analyze metro passenger behavior.

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 6


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER 3
HARDWARE AND SOFTWARE REQUIRMENT REQUIREMENTS

3.1 Software Requirements

Operating System : windows 8 and above

Developing Tool : MS visual Studio 2010

Front End (Design) : VB.NET

Back End (Database) : MS SQL server 2008

3.2 Hardware Requirements

Processor : AMD A4-5000 AP

RAM : 1 GB Graphics : 1.50 GHz

Quality : 64 bit Screen

Resolution : 1366* 768

Mouse : Standard Optical

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 7


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER 4

DESIGN

A Dataflow Diagram also known as “Bubble Chart” is used to clarify System


requirements and identifying major transformations that all become programs in System
Design. The various symbols are:

Data Source/Destination

process

Data Storage

Flow of data

4.1 Dataflow diagram

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 8


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

4.2 System design

Hierarchical Organization Information software tool has been designed keeping in


view of all the technical aspects, to suit the proposed requirements using the current
technology. Hierarchical Organization Information software does not include any external
memory hungry .dll or .exe files. It doesn’t adapt any third party controls. The Hierarchical
Organization Information software has been modularized into following modules.

Employee creation

a) Employee hierarchy
b) Department entry/Department interdependency
c) Live status
d) Employee list enumeration
e) Process details
f) Job rotation
g) Position Weight age based on Department wise, section wise
j) Vacancies maintenance & process details

4.3 Database design


 DesignationDetailsTab :-

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 9


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Designation nvarchar(MAX)

Details nvarchar(MAX)

 EmployeeDetailsTab :-

Emp code nvarchar(MAX)

Emp details nvarchar(MAX)

Address nvarchar(MAX)

Pin code nvarchar(MAX)

Phone number nvarchar(MAX)

E-mail nvarchar(MAX)

Qualification nvarchar(MAX)

Designation nvarchar(MAX)

Date of join nvarchar(MAX)

Consolidate salary nvarchar(MAX)

 StationNamesTab:-

Station name nvarchar(MAX)

Details nvarchar(MAX)

Train name nvarchar(MAX)

 TrainDetailsTab :-

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 10


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Train name nvarchar(MAX)

Number of vagons nvarchar(MAX)

Total capacity nvarchar(MAX)

Facilities nvarchar(MAX)

 TrainTimingsTab:-

Route schedule number nvarchar(MAX)

Details nvarchar(MAX)

Train name nvarchar(MAX)

From station nvarchar(MAX)

Designation station nvarchar(MAX)

Reach time nvarchar(MAX)

 TicketPriceTab:-

From station nvarchar(MAX)

To station nvarchar(MAX)

Ticket price nvarchar(MAX)

 NewApplicationTab:-

Application number nvarchar(MAX)

Name nvarchar(MAX)

Address nvarchar(MAX)

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 11


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Pin code nvarchar(MAX)

Phone number nvarchar(MAX)

E-mail nvarchar(MAX)

Frees amount nvarchar(MAX)

Date of birth nvarchar(MAX)

Qualification nvarchar(MAX)

Application date nvarchar(MAX)

 CardIssuedTab:-

Application nvarchar(MAX)

Name nvarchar(MAX)

Smart card number nvarchar(MAX)

Issue date nvarchar(MAX)

Issued by nvarchar(MAX)

 CardRechargeTab:-

Voucher number nvarchar(MAX)

Voucher date nvarchar(MAX)

Smart card number nvarchar(MAX)

Application number nvarchar(MAX)

Recharge amount nvarchar(MAX)

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 12


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Paid by nvarchar(MAX)

Pay details nvarchar(MAX)

CHAPTER 5

IMPLEMENTATION

5.1 Symbols

Data Source/Destination

process

Data Storage

Flow of data

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 13


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
5.2 Dataflow diagram

5.3 Data flow diagram level-0

5.4 Data flow diagram level-1

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 14


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 15


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
5.5 ER diagram

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 16


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
5.6 Coding
 Welcome form code:

Public Class progress


Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Timer1.Tick
ProgressBar1.Increment(5)
If ProgressBar1.Value = ProgressBar1.Maximum Then
LoginForm1.Show()
Me.Hide()
Timer1.Stop()
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Timer1.Start()
End Sub
End Class

 Login form code:


Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles OK.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand(“select * from login where username = ‘” &
(UsernameTextBox.Text) & “’ and password = ‘” & PasswordTextBox.Text & “’”, conn)
Dim d1 As SqlDataReader = cmd0.ExecuteReader()
If d1.hasrows Then
MDIParent1.Show()
Me.Hide()
If conn.State = ConnectionState.Open Then conn.Close()
Else

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 17


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
MsgBox(“ username or password is not correct”)
End If
UsernameTextBox.Text = “”
PasswordTextBox.Text = “”
End Sub
Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Cancel.Click
Me.Close()
End Sub
End Class

 MDI Parent form code:

Private Sub DesignationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles DesignationToolStripMenuItem.Click
DESIGNATION.Show()
End Sub
Private Sub EmployeeDetailsToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles EmployeeDetailsToolStripMenuItem.Click
employee_details.Show()
End Sub
Private Sub StationNamesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles StationNamesToolStripMenuItem.Click
station_names.Show()
End Sub
Private Sub TrainDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles TrainDetailsToolStripMenuItem.Click
traindetails.Show()
End Sub
Private Sub TrainTimingsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles TrainTimingsToolStripMenuItem.Click
timings.Show()
End Sub

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 18


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Private Sub TicketPriceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles TicketPriceToolStripMenuItem.Click
ticket_price.Show()
End Sub
Private Sub NewApplicationToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles NewApplicationToolStripMenuItem.Click
new_application.Show()
End Sub
Private Sub SmartCardIssueToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles SmartCardIssueToolStripMenuItem.Click
smartcard_issue.Show()
End Sub

 Card balance:
Private Sub CardBalanceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles CardBalanceToolStripMenuItem.Click
smartcard_recharge.Show()
End Sub
Private Sub SwapCardToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles SwapCardToolStripMenuItem.Click
card_balance.Show()
End Sub
Private Sub SwapCardToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles SwapCardToolStripMenuItem1.Click
swap_card.Show()
End Sub
Private Sub EmployeeListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles EmployeeListToolStripMenuItem.Click
employee_list.Show()
End Sub
Private Sub SmartCardApplicaToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles SmartCardApplicaToolStripMenuItem.Click

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 19


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
smartcard_application.Show()
End Sub
Private Sub TionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TionToolStripMenuItem.Click
recharge_report.Show()
End Sub
Private Sub CardSwappedTicketReportToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CardSwappedTicketReportToolStripMenuItem.Click
card_swap.Show()
End Sub
Private Sub LostTheCardToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles LostTheCardToolStripMenuItem.Click
CARDLOST.Show()
End Sub
Private Sub CloseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CloseToolStripMenuItem.Click
Dim testmsg As Integer
testmsg = MsgBox(“ Do you want to close”, vbYesNo + vbExclamation)
If testmsg = 6 Then Me.Close()
Else : testmsg = 7
End If
End Sub
 Designation entry :

Imports System.Data.SqlClient
Public Class DESIGNATION
Dim pkvar As String
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Dim q1var, q2var
If TextBox1.Text = “” Then
MsgBox(“Please Enter the necessary Details”)

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 20


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Exit Sub
End If
If TextBox2.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand(“Select designation from designation where designation=’”
& (TextBox1.Text) & “’”, conn)
Dim D1 As SqlDataReader = cmd0.ExecuteReader()
If D1.HasRows Then
MsgBox(“This Record is already Present In The Database”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = “insert into designation(“
q2var = “values(“
q1var = q1var & “designation” & “ , “
q2var = q2var & “’” & (TextBox1.Text) & “ ‘,”
q1var = q1var & “details” & “ ) “
q2var = q2var & “’” & (TextBox2.Text) & “ ‘)”
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“details saved”)
If TextBox4.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 21


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
If TextBox3.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd5 As New SqlCommand(“Select empqualification from metro1 where
empqualification=’” & (TextBox4.Text) & “’”, conn)
Dim D2 As SqlDataReader = cmd5.ExecuteReader()
If D2.HasRows Then
MsgBox(“This Record is already Present In The Database”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = “insert into metro1(“
q2var = “values(“
q1var = q1var & “empqualification” & “ , “
q2var = q2var & “’” & (TextBox4.Text) & “ ‘,”
q1var = q1var & “details” & “)”
q2var = q2var & “’” & (TextBox3.Text) & “’)”
Dim cmd6 As New SqlCommand(q1var & q2var, conn)
cmd6.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“details saved”)
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
End Sub

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 22


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs)
pkvar = DataGridView1.CurrentRow.Cells(0).Value
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd4 As New SqlCommand(“select * from metro1 where empqualification=’” & pkvar
& “’”, conn)
Dim d3 As SqlDataReader = cmd4.ExecuteReader()
If d3.HasRows Then
d3.Read()
End If
End Sub
Sub disrecord1()
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim ds1 As New DataSet
Dim adp As New SqlDataAdapter(“select * from designation”, conn)
adp.Fill(ds1)
DataGridView2.DataSource = ds1.Tables(0)
If conn.State = ConnectionState.Open Then conn.Close()
TextBox1.Text = “”
TextBox2.Text = “”
End Sub
Sub disrecord()
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim ds1 As New DataSet
Dim adp As New SqlDataAdapter(“select * from metro1”, conn)
adp.Fill(ds1)
DataGridView1.DataSource = ds1.Tables(0)
If conn.State = ConnectionState.Open Then conn.Close()
TextBox4.Text = “”

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 23


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
TextBox3.Text = “”
End Sub
Private Sub DESIGNATION_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
disrecord()
disrecord1()
Button1.Enabled = True
Button2.Enabled = False
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd2 As New SqlCommand(“select designation from designation order by
designation”, conn)
Dim d2 As SqlDataReader = cmd2.ExecuteReader()
DataGridView1.Visible = False
DataGridView2.Visible = False
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
DataGridView1.Visible = True
DataGridView2.Visible = True
disrecord1()
disrecord()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
Me.Close()
End Sub

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 24


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Button1.Enabled = False
Button2.Enabled = True
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
TextBox4.Focus()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
If vbNo = MsgBox(“Are you sure you want to delete this record”, MsgBoxStyle.YesNo,
“delete”) Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd5 As New SqlCommand(“Delete from metro1 where empqualification = ‘” &
TextBox4.Text & “’”, conn)
cmd5.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
disrecord()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
If vbNo = MsgBox(“Are you sure you want to modify this record”, MsgBoxStyle.YesNo,
“modify”) Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd1 As New SqlCommand(“delete from designation where designation = ‘” &
(TextBox1.Text) & “’”, conn)
cmd1.ExecuteNonQuery()

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 25


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
If conn.State = ConnectionState.Open Then conn.Close()
saverecord()
If vbNo = MsgBox(“Are you sure you want to modify this record”, MsgBoxStyle.YesNo,
“modify”) Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd7 As New SqlCommand(“delete from metro1 where empqualification = ‘” &
(TextBox4.Text) & “’”, conn)
cmd7.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
saverecord1()
End Sub
Sub saverecord()
Dim q1var, q2var
If TextBox1.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If TextBox2.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand(“Select designation from designation where designation=’”
& (TextBox1.Text) & “’”, conn)
Dim D1 As SqlDataReader = cmd0.ExecuteReader()
If D1.HasRows Then
MsgBox(“This Record is already Present In The Database”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 26


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = “insert into designation(“
q2var = “values(“
q1var = q1var & “designation” & “ , “
q2var = q2var & “’” & (TextBox1.Text) & “ ‘,”
q1var = q1var & “details” & “ ) “
q2var = q2var & “’” & (TextBox2.Text) & “ ‘)”
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“details saved”)
TextBox1.Text = “”
TextBox2.Text = “”
End Sub
Sub saverecord1()
Dim q1var, q2var
If TextBox3.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand(“Select empqualification from metro1 where
empqualification=’” & (TextBox4.Text) & “’”, conn)
Dim D1 As SqlDataReader = cmd0.ExecuteReader()
If D1.HasRows Then
MsgBox(“This Record is already Present In The Database”
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 27


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
conn.Open()
q1var = “insert into metro1(“
q2var = “values(“
q1var = q1var & “empqualification” & “ , “
q2var = q2var & “’” & (TextBox4.Text) & “ ‘,”
q1var = q1var & “details” & “ ) “
q2var = q2var & “’” & (TextBox3.Text) & “ ‘)”
Dim cmd6 As New SqlCommand(q1var & q2var, conn)
cmd6.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“details saved”)
TextBox4.Text = “”
TextBox3.Text = “”
End Sub
Private Sub DataGridView2_CellMouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles
DataGridView2.CellMouseClick
pkvar = DataGridView2.CurrentRow.Cells(0).Value
On Error Resume Next
TextBox1.Text = DataGridView2.Rows(e.RowIndex).Cells(0).Value
TextBox2.Text = DataGridView2.Rows(e.RowIndex).Cells(1).Value
Button1.Enabled = False
Button2.Enabled = False
Button3.Enabled = True
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button7.Click

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 28


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
If vbNo = MsgBox(“Are you sure you want to delete this record”, MsgBoxStyle.YesNo,
“delete”) Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd5 As New SqlCommand(“Delete from designation where designation = ‘” &
TextBox1.Text & “’”, conn)
cmd5.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
disrecord1()
End Sub
Private Sub DataGridView1_CellMouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles
DataGridView1.CellMouseClick
pkvar = DataGridView1.CurrentRow.Cells(0).Value
On Error Resume Next
TextBox4.Text = DataGridView1.Rows(e.RowIndex).Cells(0).Value
TextBox3.Text = DataGridView1.Rows(e.RowIndex).Cells(1).Value
Button1.Enabled = False
Button2.Enabled = False
Button3.Enabled = True
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
End Sub
Private Sub DataGridView2_CellContentClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView2.CellContentClick
pkvar = DataGridView2.CurrentRow.Cells(0).Value
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 29


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Dim cmd0 As New SqlCommand(“select * from designation where designation=’” & pkvar
& “’”, conn)
Dim d1 As SqlDataReader = cmd0.ExecuteReader()
If d1.HasRows Then
d1.Read()
End If
End Sub
End Class

 Train timings:

Imports System.Data.SqlClient
Public Class timings
Dim pkvar As String
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick
pkvar = DataGridView1.CurrentRow.Cells(0).Value
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand(“select*from time where routescheduleno =’” & pkvar &
“’”, conn)
Dim d1 As SqlDataReader = cmd0.ExecuteReader()
If d1.HasRows Then
d1.Read()
End If
End Sub
Sub disrecord()
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim Ds1 As New DataSet

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 30


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Dim adp As New SqlDataAdapter(“select
routescheduleno,trainnames,details,fromstation,destinationstation,reachingtime from time
order by routescheduleno”, conn)
adp.Fill(Ds1)
DataGridView1.DataSource = Ds1.Tables(0)
If conn.State = ConnectionState.Open Then conn.Close()
TextBox1.Text = “”
TextBox2.Text = “”
TextBox6.Text = “”
ComboBox1.Text = “”
ComboBox2.Text = “”
ComboBox3.Text = “”
End Sub
Private Sub DataGridView1_CellMouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles
DataGridView1.CellMouseClick
On Error Resume Next
TextBox1.Text = DataGridView1.Rows(e.RowIndex).Cells(0).Value
TextBox2.Text = DataGridView1.Rows(e.RowIndex).Cells(2).Value
TextBox6.Text = DataGridView1.Rows(e.RowIndex).Cells(5).Value
ComboBox1.Text = DataGridView1.Rows(e.RowIndex).Cells(1).Value
ComboBox2.Text = DataGridView1.Rows(e.RowIndex).Cells(3).Value
ComboBox3.Text = DataGridView1.Rows(e.RowIndex).Cells(4).Value
Button1.Enabled = False
Button2.Enabled = False
Button3.Enabled = True
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
End Sub
Private Sub timings_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 31


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Button1.Enabled = True
Button2.Enabled = False
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
disrecord()
DataGridView1.Visible = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Dim q1var, q2var
If TextBox1.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If TextBox2.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd2 As New SqlCommand(“Select routescheduleno from time where
routescheduleno=’” & (TextBox1.Text) & “’”, conn)
Dim D1 As SqlDataReader = cmd2.ExecuteReader()
If D1.HasRows Then
MsgBox(“This Record is already Present In The Database”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 32


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Dim cmd0 As New SqlCommand(“Select routescheduleno from time where
routescheduleno=’” & (TextBox1.Text) & “’”, conn)
Dim d2 As SqlDataReader = cmd0.ExecuteReader()
If d2.HasRows Then
MsgBox(“You have already been register”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = “insert into time(“
q2var = “values(“
q1var = q1var & “routescheduleno” & “ , “
q2var = q2var & “’” & (TextBox1.Text) & “ ‘,”
q1var = q1var & “details” & “ , “
q2var = q2var & “’” & (TextBox2.Text) & “ ‘,”
q1var = q1var & “trainnames” & “ , “
q2var = q2var & “’” & (ComboBox1.Text) & “ ‘,”
q1var = q1var & “fromstation” & “ , “
q2var = q2var & “’” & (ComboBox2.Text) & “ ‘,”
q1var = q1var & “destinationstation” & “ , “
q2var = q2var & “’” & (ComboBox3.Text) & “ ‘,”
q1var = q1var & “reachingtime” & “ ) “
q2var = q2var & “’” & (TextBox6.Text) & “ ‘)”
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“Details saved”)
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
Me.Close()

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 33


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Button1.Enabled = False
Button2.Enabled = True
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
TextBox1.Focus()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
pkvar = DataGridView1.CurrentRow.Cells(0).Value
If vbNo = MsgBox(“Are you sure you want to delete this record”, MsgBoxStyle.YesNo,
“delete”) Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd3 As New SqlCommand(“Delete from time where routescheduleno = ‘” & pkvar &
“’”, conn)
cmd3.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
disrecord()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
If vbNo = MsgBox(“Are you sure you want to modify this record”, MsgBoxStyle.YesNo,
“delete”) Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd1 As New SqlCommand(“delete from time where routescheduleno = ‘” &
(TextBox1.Text) & “’”, conn)

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 34


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
saverecord()
End Sub
Sub saverecord()
Dim q1var, q2var
If TextBox1.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If TextBox2.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd5 As New SqlCommand(“Select routescheduleno from time where
routescheduleno=’” & (TextBox1.Text) & “’”, conn)
Dim D5 As SqlDataReader = cmd5.ExecuteReader()
If D5.HasRows Then
MsgBox(“This Record is already Present In The Database”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd6 As New SqlCommand(“Select routescheduleno from time where
routescheduleno=’” & (TextBox1.Text) & “’”, conn)
Dim d6 As SqlDataReader = cmd6.ExecuteReader()
If d6.HasRows Then
MsgBox(“You have already been register”)
If conn.State = ConnectionState.Open Then conn.Close()

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 35


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = “insert into time(“
q2var = “values(“
q1var = q1var & “routescheduleno” & “ , “
q2var = q2var & “’” & (TextBox1.Text) & “ ‘,”
q1var = q1var & “details” & “ , “
q2var = q2var & “’” & (TextBox2.Text) & “ ‘,”
q1var = q1var & “trainnames” & “ , “
q2var = q2var & “’” & (ComboBox1.Text) & “ ‘,”
q1var = q1var & “fromstation” & “ , “
q2var = q2var & “’” & (ComboBox2.Text) & “ ‘,”
q1var = q1var & “destinationstation” & “ , “
q2var = q2var & “’” & (ComboBox3.Text) & “ ‘,”
q1var = q1var & “reachingtime” & “ ) “
q2var = q2var & “’” & (TextBox6.Text) & “ ‘)”
Dim cmd7 As New SqlCommand(q1var & q2var, conn)
cmd7.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“Details saved”)
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
disrecord()
DataGridView1.Visible = True
End Sub
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
If ComboBox2.Text = ComboBox3.Text Then
MsgBox(“From And To Cannot Be the Same”)

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 36


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
End If
End Sub
Private Sub TextBox6_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox6.KeyPress
If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
MsgBox(“Please enter a valid number”)
End If
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd9 As New SqlCommand(“select stationnames from station where trainnames=’” &
ComboBox1.Text & “’ order by stationnames”, conn)
Dim d9 As SqlDataReader = cmd9.ExecuteReader()
While d9.Read
ComboBox2.Items.Add(d9(0).ToString)
End While
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd10 As New SqlCommand(“select stationnames from station where trainnames=’” &
ComboBox1.Text & “’ order by stationnames”, conn)
Dim d10 As SqlDataReader = cmd10.ExecuteReader()
While d10.Read
ComboBox3.Items.Add(d10(0).ToString)
End While
End Sub
End Class

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 37


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
 Ticket price:
Imports System.Data.SqlClient
Public Class ticket_price
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Dim q1var, q2var
If ComboBox1.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If ComboBox2.Text = “” Then
MsgBox(“Please Enter the necessary Details”)
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd2 As New SqlCommand(“select fromstation,tostation from price where
fromstation=’” & (ComboBox1.Text) & “’and tostation=’” & (ComboBox2.Text) & “’”,
conn)
Dim D1 As SqlDataReader = cmd2.ExecuteReader()
If D1.HasRows Then
MsgBox(“This Record is already Present In The Database”)
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = “insert into price(“
q2var = “values(“
q1var = q1var & “fromstation” & “ , “
q2var = q2var & “’” & (ComboBox1.Text) & “ ‘,”
q1var = q1var & “tostation” & “ , “

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 38


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
q2var = q2var & “’” & (ComboBox2.Text) & “ ‘,”
q1var = q1var & “ticketprice” & “ ) “
q2var = q2var & “’” & (TextBox3.Text) & “ ‘)”
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox(“Details saved”)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Me.Close()
End Sub
Private Sub ticket_price_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd2 As New SqlCommand(“select stationnames from station order by stationnames”,
conn)
Dim d2 As SqlDataReader = cmd2.ExecuteReader()
While d2.Read
ComboBox1.Items.Add(d2(0).ToString)
ComboBox2.Items.Add(d2(0).ToString)
End While
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox1.Text = ComboBox2.Text Then
MsgBox(“From And To Cannot Be the Same”)
End If
End Sub
Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 39


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
MsgBox(“Please enter a valid number”)
End If
End Sub
End Class

 Print screen:

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As


System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim XPos, Ypos As Long
Ypos = 50
Dim myfont As New Font(“arial”, 18)
Xpos = 10
e.Graphics.DrawString(“metrotrain smartcard”, myfont, Brushes.Black, Xpos, Ypos)
Ypos += 50
myfont = New Font(“arial”, 12)
e.Graphics.DrawString(“swap card ticket report”, myfont, Brushes.Black, Xpos, Ypos)
Ypos += 100
Xpos = 10
e.Graphics.DrawString(“cardno”, myfont, Brushes.Black, Xpos, Ypos)
Ypos += 50
Xpos = 10
myfont = New Font(“arial”, 12)
e.Graphics.DrawString(“fromstation”, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
e.Graphics.DrawString(“tostation”, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
e.Graphics.DrawString(“ticketprice”, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
Ypos += 25
For Each r As DataGridViewRow In DataGridView1.Rows

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 40


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM
Xpos = 10
e.Graphics.DrawString(r.Cells(0).Value, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
e.Graphics.DrawString(r.Cells(1).Value, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
e.Graphics.DrawString(r.Cells(2).Value, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
e.Graphics.DrawString(r.Cells(3).Value, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
e.Graphics.DrawString(r.Cells(4).Value, myfont, Brushes.Black, Xpos, Ypos)
Xpos = Xpos + 150
Ypos += 25
Next
End Sub

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 41


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER-6
TESTING

6.1 Existing qualification details in the database

6.1.1 Entering new qualification details

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 42


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

6.1.2 Data Concurrency

6.2 Validation

6.2.1 Validation of Numbers

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 43


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

6.2.2 Validation of Alphabets

6.3 Employee details

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 44


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

6.4 Applicant details

6.5 Smart card issue details

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 45


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

6.6 List of employees

6.7 List of applicants applied for smart card

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 46


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER-7
SCREENSHOTS

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 47


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 48


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 49


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 50


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 51


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 52


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 53


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 54


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 55


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 56


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 57


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 58


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER-8
CONCLUSION AND FUTURE ENHANCEMENT

 The project has been appreciated by all the users in the organization.
 It is easy to use, since it uses the GUI provided in the user dialog.
 User friendly screens are provided.
 The usage of software increases the efficiency, decreases the effort.
 It has been efficiently employed as a Site management mechanism.
It has been thoroughly tested and implemented

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 59


METRO TRAIN SMARTCARD MANAGEMENT SYSTEM

CHAPTER-9
BIBLIOGRAPHY

 VISUAL BASIC Black -By Evangeleous Petereous


 VB.NET- BY BILL EVJEN, SCOTT HANSELMAN, DEVIN RADER
 ORACLE - BY DHINGRA
 SOFTWARE ENGINEERING - BY PRESSMAN
 DATABASE SYSTEM-BY ELMASARI, NAVATE

MNTI/CS/VI SEM/2020-21/PROJECT REPORT Page | 60

You might also like