Professional Documents
Culture Documents
Submitted by
PRAVEENKUMAR.S
(Regno.2122k0035)
Dr.S.DURAISAMY MCA.,M.Phil.,Ph.D
Assistant Professor
Tirupur-641602
MARCH-2024
CERTIFICATES
CHIKKANNA GOVERNMENT ARTS COLLEGE
Tirupur-641602
PRAVEENKUMAR.S
(Reg.No:2122K0035)
PRAVEENKUMAR.S
( 2122K0035)
Date:
ACKNOWLEDGEMENT
ACKNOWLEDEMENT
I obliged to our great almighty god for showering all his precious blessing upon me as the
psalmist who says unless the lord builds the house Its builders labour in vain I felt his help and
sustaining proper sufficient in every step.
I would also like to thank all the staff members and other authorities who helped and
supported me throughout my course of study. Above all, I would like to thank my Beloved
Parents and Friends who have encouraged and supported me during the course of my project
work. I dedicate this project to them.
SYNOPSIS
SYNOPSIS
This Project Is Designed With VB.net As Front End And MS Access As Back End In The
Windows Platform.
CONTENTS
CONTENTS
CERTIFICATES
I
ACKNOWLEDGEMENT
II
DECLARATION
III
SYNOPSIS
IV
1 INTRODUCTION 1
2 SYSTEM STUDY 8
BIBLIOGRAPHY 21
WEBSITES 21
APPENDICES 22
B. TABLE STRUCTURE 26
D. SAMPLE CODE 31
1. INTRODUCTION
The project entitled “Tourist Tracking System” is aimed to develop using VB .NET as
front end and MS Access as back end under windows platform. The main objective of this
project is to maintain all manual process of the Tour Operator System and convert those manual
works into systematic and computerized tasks.
The system has been developed to reduce the response time and ensure flexibility.
System is also comfortable for further development and enhancement of the existing system.
It computerizes the process of entire official work of Cab Services; it helps to maintain
information like Availability of cab, Cab Booking, Front office Maintenance, Customer
Details, Employee Details, and Billing etc. The system have been stored all these information.
1
1.1 Organizational Profile
Benevolent services
2
1.2 System Specification
RAM : 512MB
3
1.2.2 Software Specification
4
SOFTWARE FEATURES
VISUAL BASIC.NET
.NET provides a new, object-oriented API as a set of classes that will be accessible from
any programming language. This book describes this framework of classes and provides a
reference to what is available and how you can use this framework to write Windows
applications in the brave new world of .NET.
Visual basic.net lets the user to add menus, text boxes, command buttons, option
buttons, check boxes, list boxes, scroll bars, and file directory boxes to blank windows. Visual
basic.net has many different tools.
The CLR is the mechanism through which .NET code is executed. It is built upon a
single, common language—IL—into which source languages are compiled and includes
5
mechanisms for executing the compiled code. This includes code verification and just-in-time
(JIT) compilation, garbage collection and enforcement of security policies, and the provision
of profiling and debugging services.
The CLR provides a lot of added value to the programs it supports. Because it controls
how a .NET program executes and sits between the program and the operating system, it can
implement security, versioning support, automatic memory management through garbage
collection, and provide transparent access to system services
IMPORTANT FEATURES
MS Access 2007
MS-Access is a powerful program to create and manage data bases. It has many builtin
features to assist in co-structuring and viewing information. Access is much more involve and
is a more genuine data base application then other program such as MS works the system is
developed using back-end MS-Access.MS-Access product of Microsoft access has to create
and maintain large database large quickly and easily.
An access data consist of tables that hold the data and all the related objects such as
forms and reports that are used to manage the data in the tables. Access supported almost all
the database that are supported most other database. The field property can be provided forthe
field in the penal by the access.
MS-Access satisfies all the condition which is normally wanted for database
administrators. The client can erase and update. The access is the database management system
which is powerful in the maintenance of the database.
6
Features
• MS-Access is the powerful relational database that stores related data in place.
• Relational database make it easier to find, analysis, maintain and product the
data since stored in one place.
• Data‟s can be stored in one table, but can be moved in multiple locations.
• MS-Access retrieves data from one or more tables and displays on the screen.
7
2. SYSTEM STUDY
System study may be defined as the process of dividing the problem into parts,
identifying each part and establishing relationship in the part. System study is a detailed study
of the various operations performed by a system and relationship within and outside of the
system. System Study is a continuing activity at all stages of the project. It is the process of
studying problem to find the best solution to the problem, by which the existing problems are
understood. Objectives and requirements are defined and the solution is evaluated. Once system
study is complicated, the analyst has a firm understanding of what is to be done.
System study consists of two sub phases planning and requirement definition.
They include understanding the customer‟s problem, performing a feasibility study, developing
a recommended solution strategy, determining the acceptance criteria and planning the
development process. The products of the system definition and project plan.
The system definition typically expressed in English or some other languages and
may incorporate charts, figures, graphs, tables and equations of various kinds. The exact
notations used in definition and highly dependent of the problem area. Obviously, one uses
different terminology to describe a process control system.
8
2.1 Existing System
At present all the activities in transaction are handled manually. Manual data processing
system, whole providing economy, flexibility and adaptability at low data volumes become
more complex when the volume of data becomes large. As an organization expands in size and
function, a stage is reached when manual procedures become inadequate and inefficient. No
matter how many clerks are employed a stage is reached then it becomes impossible to
systemize such a large amount of information. What is required then is an upgrading in the
class of information processing technology.
The present system is not sufficient to hold all the information that is necessary for the
processing. So the Fleet Cab Services is in need of new computerized system, which is very
flexible, user-friendly and capable of holding the system in a robust manner.
9
2.2 Proposed System
The main purpose of proposed system is essentially to automate entire operations and
Information of Customer, Booking, Vehicles at a particular given point of time. So that the
Tour Operator and Their Customer can get best and fast Information about Their Tour
Packages, Vehicles and drivers at any Point of Time. He needs to exercise tight control on the
operations and input costs if he is to provide good service at reasonable rates and yet remain
profitable.
10
3. SYSTEM DEISGN AND DEVELOPMENT
3.1 FILE DESIGN
FILE DESIGN FUNDAMENTALS
• File design is one of the first detailed design activities
• The new file designs provide structures used to create sample input and output forms
and report.
• In practice, design work switches among the file output and input design.
11
3.2 INPUT DESIGN
The input design is the key to success of any good system and a good design takes
time. All data entry screen are interactive in nature. Online help is available to the user in the
form of massages, which prompts for correct entries, some other features are:
• The form clearly states the purpose of the form
• The heading of each data item is clearly given.
• Adequate space is provided from the data item.
• Paper validation of input should be provided.
Inaccurate input data is the most common source of error in data processing, which can be controlled
by input design. Input design is the purpose of converting user originated input to system design.
Employee Entry
This form consist of the information like employee id, employee name, designation, address,
contact no, mail id.
This form consists of the information about the booking in the organization. It contains
information like customer id, name, cab number, pick up place, time, duration of the cab
booking etc.
Customer Entry
This form includes the information about customer like name, address, contact no, birth date,
sex etc.
Transaction Entry
This type includes two form in it. Those are maintenance and running cost for the cab for tour
and the tariff received for the cab services. In short it maintain all the cash in and out transaction
of the Tour booking Services.
12
3.3 OUTPUT DESIGN
Computer output is the most important and direct source of information to the user.
Proficient and intelligible output design should improve the system relationship with the user
and helps in decision-making. A major form of output is a hardcopy from a printer. Printout
should be designed around the output requirement of the user.
Output from computer system is required primarily to communicate the result of
processing to the user in a form which they can understand and which meet their requirements.
Output are the most important and direct source of information to the management. They are
obtained in the form of various reports. Efficient output design improves system relationship
with the user and the process of decision-making.
The reports in the system are
Employee Report
This report used to show the details of the employee working in the Fleet Cab services.
Booking Report
This report shows the details of the booking done for the cab in the Fleet Cab Services
Customer Report
This report shows the details of the customer and the previous bookings of the particular
customer
Transaction Report
This report shows the details of the cash in and out transactions done in the Fleet Cab
Services.
13
3.4 DATABASE DESIGN
It is a process of converting a relationship to a standard form. The process is used to
handle the problems that can arise due to data redundancy (i.e.) repetition of data in the
database, maintain data integrity as well as handle problem that can arise due to insertion,
update and deletion anomalies.
Decomposing is the process of splitting relations to eliminate anomalies and maintain
data integrity. To do this we use normal forms or rules for structuring relation.
Insertion Anomaly
Inability to add data to database due to absence of other data.
Deletion Anomaly
Unintended loss of data due to deletion of other data
Update Anomaly
Data inconsistency resulting from data redundancy and partial update
Normal Forms
These are the rules form structuring relation that eliminates anomalies.
First Normal Form
A relation is said to be in first normal form if the values in the relation are atomic for every
attribute in the relation. By this we mean simply that no attribute value can be set of values or
as it is sometimes expressed a repeating group.
Second Normal Form
Relationship is said to be in second normal form if it is in first normal form and it should satisfy
any one of the following rules:
• Primary key is not a composite primary key
• No non-key attribute are present
• Every non-key attribute is fully functionally dependent on full set of primary key
Third Normal Form
A relationship said to be in third normal form if there exists no transitive dependency.
Transitive dependency
If two non-key attributes depend on each other as well as on the primary key then they are said
to be transitively dependent.
14
3.5 SYSTEM DEVELOPMENT
• Booking
• Customer
• Facilities
• Employee
Booking
This module shows the availability of the cab as well as the booking details of the Tour
packages. Tour Booking has many packages according to the price and the service level. Those
are all handled in this module. And also the maintenance of the booking details also done in
this module,
Customer
This module stores the information about the customer booking the Tour . This includes
the customers booking details as well as the personal and contact details of the customer. We
can also view the payment information regarding the customer with this module.
15
Hotel
While booking the Tour it also includes the details like facilities available for the customer
other than the Tour details. This includes the details like tour guide needed, catering service,
Room Stay Services etc.
Employee
This module is used to maintain the staff details who work in the tour booking process.
It includes personal as well as official information of the staff/employee. Information like name
designation, date of joining, salary details are considered official information. Address of the
employee, phone number, blood group details are considered as personal information.
Package
This module is used to maintain the package details of tour booking process. It includes
personal as well as official information of the cuatomer. Information like name days, nights,
Rate, from , to date.
16
4.SYSTEM TESTING AND IMPLEMENTATION
of values. Unit testing is performed from the bottom up, starting with the smallest and lowest
modules and proceeding one at a time.
The units in a system are the modules and routines that are assembled and integrated
to perform a specific function. The programs are tested for correctness of logic applied and
detection of errors in coding. Each of the modules was tested and errors are rectified. They
were then found to function properly.
For example, in Tourist Tracking System user enters the username and password to
login. The validation is performed to identify the valid user. After the validation is successful
the system allows the user to enter into the Tourist Tracking System.
4.1.2 INTEGRATIONTESTING
Integration testing is testing in which, the tested modules are combined into sub-
systems, which are then tested. The goal of integration testing to check whether the modules
can be integrated properly emphasizing on the interfaces between modules. The different
modules were linked together and integration testing done on them.
17
After unit testing all the forms are integrated to the respective pages. While integrating,
the application developer checked whether the integrated forms are working properly or not.
The pages like new lead adding and editing, Project, General settings, etc. are integrated with
the system. These programs were tested individually at last all these programs were combined
together by creating another program.
4.1.3 VALIDATIONTESTING
The objective of the validation test is to tell the user about the validity and reliability of the
system. It verifies whether the system operates as specified and the integrity of important data
is maintained. User motivation is very important for the successful performance of the system.
In validation testing, each fields like User id no, employee no, name, email, gender, contact
number, etc. for example, the validation is mainly for login page and registration page. The
user name must contain an alphabet. Password is alpha numeric. The user contact number must
contain numbers (0-9) only. The username must contain only alphabets. The login id and
password field must not be blank. User id no must be unique.
18
• Sign Off
For example, to ensure an effective User Acceptance Testing Test cases are created for
Tourist Tracking System. These Test cases can be created using various use cases identified
during the Requirements definition stage. The Test cases ensure proper coverage of all the
scenarios during testing.
4.2 SYSTEM IMPLEMENTATION
System implementation is the stage of the project that the theoretical design is turned
into a working system. If the implementation stage is not properly planned and controlled, it
can cause error. Thus it can be considered to be the most crucial stage in achieving a successful
new system and in giving the user confidence that the new system with work and be effective.
Normally this stage involves setting up a coordinate committee which will act as a
sounding board for ideas, complaints and problems. The first task is implementation planning
that is designing on the method and time scale to be adopted. Apart from planning to major
task of preparing for implementation are education taken place much earlier in the project, at
the implementation stage the emphasis must be on training in new skills to be give staff
confidence that they can use the system once staff has been trained, the system can be tested.
After the implementation phase, the user staff is adjusted to the changes created by the
candidate system, evaluation and maintenance to bring the new system to standard. The
activities of implementation can be summarized as
• Implementation planning
• Education planning
• System planning
19
CONCLUSION
The project “Tourist Tracking System” was successfully designed and developed as
per the requirements and specification. It is concluded that the application works well. The
application is tested very well and errors are properly debugged. The application is
simultaneously accessed from more than one system. Simultaneous login from more than
one place is tested.
This system is user friendly so everyone can use easily. Proper documentation is
provided. The end user can easily understand how the whole system is implemented by
going through the documentation. The system is tested, implemented and the performance
is found to be satisfactory. All necessary output is generated. Thus, the project is completed
successfully.
20
BIBLIOGRAPHY
1. Ramachandran Mc Carthus “Professional VB .NET” 2nd Edition, 2003.
2. Mathew Reynolds and John Roth “Desktop Application using VB .NET” 1st Edition,
2003.
3. Lan Sommerville “Software Engineering” 5th Edition, 1998.
4. Holzner “Visual Basic .NET Programming Black Book” 2005 Edition.
5. Paul Kimmel “Visual Basic .NET Unleashed”
WEBSITES
http://www.codeproject.com
http://www.vbdotnetheaven.com
http://www.a1vbcode.com
http://www.support.microsoft.com
http://startvbdotnet.com
21
APPENDICES
External entities
Data Flows
DATASTORE: A repository of data that is to
be stored for use by one or more processes,
may be as simple as buffer of queue or as a
relational database.
22
RULES OF DFD:
• Fix the scope of the system by means of context diagrams.
• Organize the DFD so that the main sequence of the actions reads left to
right and top to bottom.
• Identify all inputs and outputs.
• Identify and label each process internal to the system with rounded
circles.
• A process is required for all the data transformation and transfers.
Therefore, never connect a data store to a data source or the destinations
or another data store with just a data flow arrow.
• Do not indicate hardware and ignore control information.
• Make sure the names of the processes accurately convey everything the
process is done.
• There must not be unnamed process.
• Indicate external sources and destinations of the data, with squares.
• Number each occurrence of repeated external entities.
• Identify all data flows for each process step, except simple Record
retrievals.
• Label data flow on each arrow.
• Use details flow on each arrow.
• Use the details flow arrow to indicate data movements.
• There can‟t be unnamed data flow.
• A data flow can‟t connect two external entities.
LEVELS OF DFD:
The complexity of the business system means that it is a responsible to represent the
operations of any system of single data flow diagram. At the top level, an Overview of the
different systems in an organization is shown by the way of context analysis diagram. When
exploded into DFD
They are represented by:
• LEVEL-0 : SYSTEM INPUT/OUTPUT
• LEVEL-1:SUBSYSTEM LEVEL DATAFLOW FUNCTIONAL
• LEVEL-2 : FILE LEVEL DETAIL DATA FLOW.
23
The input and output data shown should be consistent from one level to the next.
LEVEL-0: SYSTEM INPUT/OUTPUT LEVEL
A level-0 DFD describes the system-wide boundaries, dealing inputs to and outputs
from the system and major processes. This diagram is similar to the combined user-level
context diagram.
DFD Level 0:
DFD Level 1:
Valid
Password
Admin/User Login Tourist
Tracking
System
Invalid Password
24
DFD Level 2:
package tbl
Login Tourist
Tracking Utilities
System
Package
Admin/Use
r
Booking
New Employee
Customer
Booking Tbl
Hotel
Empl_tbl
Customer
tbl
Hotel tbl
25
B)TABLE STRUCTURE
Table Name: Login
S.No Name Data Type Description
1 Login_Id Text Login ID
2 Psswd Text Password
26
6 Country Text Country
7 State Text State
Table Name:package
S.No Name Data Type Description
1 P_Id Number Package Id
2 P_N Text Package Name
3 Days Number Days
4 Nights Number Nights
5 Rate Number Rate
6 From Date/Time From
7 To Date/Time To
Table Name:Hotel
S.No Name Data Type Description
1 C_Id Number Customer ID
2 H_N Text Hotel name
3 Addr Text Address
4 Zipcode Number Zipcode
5 R_Category Text Room Category
6 B-Type Text Bed Type
7 Rate Number Amount
27
C)SAMPLE FORM DESIGN
Login Form
Package Details
28
Customer Details
Hotel Details
29
Employee Details
Booking Details
30
D)SAMPLECODE
Login Form
Public Class Login
End Sub
End Class
Booking Form
Imports System.Data.OleDb
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
MaskedTextBox1.Text = ""
31
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim i As Integer
Try
s = "select * from BOOK where BID='" + TextBox1.Text + "'"
cmd = New OleDbCommand(s, con)
dr = cmd.ExecuteReader()
While dr.Read
i = 0
TextBox1.Text = dr(0)
ComboBox1.Text = dr(1)
TextBox2.Text = dr(2)
TextBox3.Text = dr(3)
TextBox4.Text = dr(4)
TextBox5.Text = dr(5)
MaskedTextBox1.Text = dr(6)
DateTimePicker1.Text = dr(7)
TextBox6.Text = dr(8)
DateTimePicker2.Text = dr(9)
TextBox7.Text = dr(10)
TextBox8.Text = dr(11)
ComboBox2.Text = dr(12)
ComboBox3.Text = dr(13)
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
s = "delete from BOOK where BID='" + TextBox1.Text + "'"
cmd = New OleDbCommand(s, con)
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN DELETED SUCESSFULLY")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
MaskedTextBox1.Text = ""
TextBox8.Text = ""
End Sub
32
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button5.Click
Me.Hide()
End Sub
End Sub
End Class
33
Customer From
Imports System.Data.OleDb
Public Class Form3
Dim con As OleDbConnection
Dim cmd As OleDbCommand
Dim s As String
Dim dr As OleDbDataReader
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Try
s = "insert into Cusit values (" + TextBox21.Text + ",'" +
TextBox22.Text + "','" + TextBox23.Text + "','" + DateTimePicker1.Text +
"','" + DateTimePicker2.Text + "','" + DateTimePicker3.Text + "','" +
TextBox24.Text + "','" + TextBox25.Text + "','" + TextBox26.Text + "','" +
TextBox27.Text + "','" + TextBox1.Text + "') "
cmd = New OleDbCommand(s, con)
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN ADDED SUCCESSFULLY")
TextBox1.Text = ""
' TextBox2.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
DateTimePicker3.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
34
Private Sub Button4_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button4.Click
s = "update Cusit set CusName='" + TextBox22.Text + "',agentname='"
+ TextBox23.Text + "',bdate='" + DateTimePicker1.Text + "',sdate='" +
DateTimePicker2.Text + "',edate='" + DateTimePicker3.Text + "',noadult='" +
TextBox24.Text + "',nochil='" + TextBox25.Text + "',amt='" + TextBox26.Text
+ "',pp='" + TextBox27.Text + "',acom='" + TextBox1.Text + "' where Cusid="
+ TextBox1.Text + ""
cmd = New OleDbCommand(s, con)
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN UPDATED SUCESSFULLY")
TextBox1.Text = ""
'TextBox2.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
DateTimePicker3.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim i As Integer
Try
s = "select * from Cusit where Cusid=" + TextBox21.Text + ""
cmd = New OleDbCommand(s, con)
dr = cmd.ExecuteReader()
While dr.Read
i = 0
TextBox21.Text = dr(0)
TextBox22.Text = dr(1)
TextBox23.Text = dr(2)
DateTimePicker1.Text = dr(3)
DateTimePicker2.Text = dr(4)
DateTimePicker3.Text = dr(5)
TextBox24.Text = dr(6)
TextBox25.Text = dr(7)
TextBox26.Text = dr(8)
TextBox27.Text = dr(9)
TextBox1.Text = dr(10)
' TextBox2.Text = dr(11)
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click
s = "delete from Cusit where Cusid=" + TextBox21.Text + ""
cmd = New OleDbCommand(s, con)
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN DELETED SUCESSFULLY")
TextBox1.Text = ""
35
'TextBox2.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
DateTimePicker3.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
End Sub
Hotel Form
Imports System.Data.OleDb
Public Class Form2
Dim con As OleDbConnection
Dim cmd As OleDbCommand
Dim s As String
Dim dr As OleDbDataReader
36
'TextBox24.Text = ""
'TextBox25.Text = ""
'TextBox26.Text = ""
'TextBox27.Text = ""
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
dr = cmd.ExecuteReader()
While dr.Read
i = 0
ComboBox1.Text = dr(0)
ComboBox2.Text = dr(1)
TextBox21.Text = dr(2)
TextBox22.Text = dr(3)
ComboBox3.Text = dr(4)
ComboBox4.Text = dr(5)
TextBox23.Text = dr(6)
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN DELETED SUCESSFULLY")
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
ComboBox4.Text = ""
End Sub
37
s = "update Hoteltariff set hname='" + ComboBox2.Text + "',addr='"
+ TextBox21.Text + "',zipc='" + TextBox22.Text + "',rc='" + ComboBox3.Text
+ "',bedtype='" + ComboBox4.Text + "',rate='" + TextBox23.Text + "' where
hid='" + ComboBox1.Text + "'"
cmd = New OleDbCommand(s, con)
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN UPDATED SUCESSFULLY")
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
ComboBox4.Text = ""
End Sub
Package From
Imports System.Data.OleDb
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN ADDED SUCCESSFULLY")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
38
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim i As Integer
Try
dr = cmd.ExecuteReader()
While dr.Read
i = 0
TextBox1.Text = dr(0)
TextBox2.Text = dr(1)
TextBox3.Text = dr(2)
TextBox4.Text = dr(3)
TextBox5.Text = dr(4)
TextBox6.Text = dr(5)
TextBox7.Text = dr(6)
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN DELETED SUCESSFULLY")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
End Sub
39
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
End Sub
End Sub
dr = cmd.ExecuteReader()
While dr.Read
i = 0
TextBox1.Text = dr(0) + 1
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
End Class
Employee Form
Imports System.Data.OleDb
40
+ "','" + TextBox5.Text + "','" + MaskedTextBox1.Text + "','" +
TextBox6.Text + "','" + TextBox7.Text + "') "
cmd = New OleDbCommand(s, con)
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN ADDED SUCCESSFULLY")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
MaskedTextBox1.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim i As Integer
Try
s = "select * from STAFF where id='" + TextBox1.Text + "'"
cmd = New OleDbCommand(s, con)
dr = cmd.ExecuteReader()
While dr.Read
i = 0
TextBox1.Text = dr(0)
TextBox2.Text = dr(1)
ComboBox1.Text = dr(2)
TextBox3.Text = dr(3)
DateTimePicker1.Text = dr(4)
DateTimePicker2.Text = dr(5)
TextBox4.Text = dr(6)
TextBox5.Text = dr(7)
MaskedTextBox1.Text = dr(8)
TextBox6.Text = dr(9)
TextBox7.Text = dr(10)
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
cmd.ExecuteNonQuery()
MsgBox("YOUR CURRENT RECORD HAS BEEN DELETED SUCESSFULLY")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
41
TextBox6.Text = ""
TextBox7.Text = ""
MaskedTextBox1.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
End Sub
End Sub
Private Sub AGENT_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\TravelMgmt\TravelMgmt\Travel.mdb")
con.Open()
Dim i As Integer
Try
s = "select max(id) from STAFF"
cmd = New OleDbCommand(s, con)
dr = cmd.ExecuteReader()
While dr.Read
i = 0
TextBox1.Text = dr(0) + 1
End While
If i <> 0 Then
MsgBox("invalid id")
End If
dr.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub