You are on page 1of 87

Project Report of

Hotel Management
System
By
Name:Rahul Kumar
Roll No:80242
Submitted in partial fulfillment of the requirements
for the degree of
Bachelor of !omputer "ppl#cat#ons
$nst#tute of !omputer % $nformat#on Sc#ence
Khana&ar# !ampus
'r( B(R( "m)e&*ar +n#,ers#ty
"gra
Su)m#tte& to Su)m#tte& By
Mr( "m#t S#nghal Rahul Kumar
"!KN-./0'10M0N2
I offer my sincere appreciation to all people who provide their support to
this project. I feel great pleasure while working on this project work.
There are some people who help me a lot by providing valuable
suggestions and time during this project work.
First I want to thank Mr. Amit Singhal who gave knowledge through
which I have developed this project.

A!"# $"MA
%&A '(I
oll no)*+,-,.
2a)le of !ontents
S( No( 2op#c
/. Introduction
,. 0bjective of the 1roject
2. 1roblem Statement
-. e3uirement Analysis
4. Feasibility Analysis And 5esign
6. System 5esign
.. Form #ayouts
*. &oding
7. Testing
/,. Future Scope of the 1roject
/2. &onclusion
/-. %ibliography
$ntro&uct#on -f Project
A !otel is an organi8ation where delicacy9 hospitability and service
matter a lot. And the hotel always try to be better the in all the areas
where ever the possibilities are there. The &omputer has made this
possible by providing the internet9 email9 and networking and by other
software. In the same fashion the :5ummy :software ;amed :!otel
Management System< is the project designed for the hotel industry
people who found their work 3uite hardly manageable because of keeping
all wears and tears because each and every thing is the matter which
should be recorded. For this purpose the following project is 3uit helpful
and handy because almost all the areas are covered in the project. #ike
estaurant9 ooms !ealth club9 and transport. So the project is 3uite
easy to use and easy to carry. Today the efficiency of the computeri8ed
department is best and do work speedily. Following are the departments
which covered in the projects)'
/. Front 0ffice=eception>
,. estaurant
2. oom Services
-. Transport ?n3uiry
4. 5ifferent 5epartment =1roducts9 ?mployees ?tc...>
-)ject#,e -f Project
The objective of the project is to make the hotel computeri8ed
almost every area9 and the block of the hotel like restaurant9
rooms9 entertainment9 sport9 transport etc... &an keep their
records separately.
The hotel people will have to make login of each and every one
therefore security of the data is kept secured.
The facilities given into the project makes the project useful to the
hotel and the workers of the hotel because their work will be easy
and they will find their work easy and correct9 all the details can be
checked as any time and can be changed.
System "nalys#s
Pro)lem Statement
The Major problems during the designing of this project occurred were)'
/. Facts &ollection
,. Attribute &ollection
2. 5ecision Making
-. Meeting to the !otel people
All the problems took place during the preparation of the project to give
the shape of actual project it was 3uite difficult to collect the facts like
what attribute they use to store the relevant data of any area.
Meeting to the hotel people was 3uit tough task as they were not ready
to talk about their personal matters as the working style of any hotel
make the hotel uni3ue. And then decision making that whether the facts
given to me was appropriate to meet the re3uirement of the project.
Re3u#rement "nalys#s
The re3uirement of the project was the working style of a hotel which is
working as its own way
/. The choice of the hotel
a. Selecting the meeting persons
i. !is area of work
ii. !is duty or role
iii. !is &ontribution to the project
b. Selecting the 5etails
i. Selection of the detail re3uired for the project
ii. Selection of the 5ata and re3uirement of the working
department
c. Making the detail useful
i. Arranging the details in to table
ii. &onnection of the table
,. &reation of the project
a. Making the tables
b. Making the ? 5iagrams
c. Making the forms
d. Taking the proper name =as they are uni3ue>
2. Testing
a. Testing the project at the site
b. Testing the project according the use
-. Trouble shooting
a. Sorting out the problems occurred
b. Taking the details of the troubles faced
4eas#)#l#ty "nalys#s "n& 'es#gn
The feasibility study proposes one or more conceptual solutions to the
problem set of the project. It is a test of a system proposal according to
its workability impact on the organi8ation9 ability to meet user needs and
effective use of resources .The objective of a feasibility study is not to
solve the problem but to ac3uire a sense of its scope. &ost benefit
analysis is also done .The result is a format proposal detailing the nature
and nature and scope of the proposed solution.
Feasibility analysis usually considers a number of project alternatives and
the most satisfactory solution is selected among the alternatives. The
alternatives are also need to be evaluated in a broad way without
committing too many resources.
Four primary areas of interest in feasibility study are) '
5( 0!-N-M$! 40"S$B$/$26: ' An evaluation of development cost
weighed against the ultimate income of benefit derived from the
development system or product.
This project can run on 50S or @indows 7* operating system9 which are
most commonly available at nominal price. !ence9 there are no
economical constraints.
2( 20!HN$!"/ 40"S$B$/$26: A study of function9 performance A
constraints that many affect the ability to achieve an acceptable system.
This project can run on any 1entium processor A does not re3uire any
additional hardware.
7( B0H"8$-+R"/ 40"S$B$/$26: This project is very user friendly A
menu driven project A it will be readily accepted by the user.
.aterfall Mo&el
This project is based on a @aterfall techni3ue9 which is based on top B
down approach i.e. the user will get finally whatever is desire without
having any intermediate interference in between.
;umerical system is based on waterfall model. The eCplicit model of
software development process was derived from other engineering
process. The waterfall model offered a means of making the development
process more visible.
Requirements analysis and
specification.
Design and Specification
Coding and Module
Testing
Integration and System
Testing
Delivery and
Maintenance
SDST?M ?E"I?M?;TS
Har& 9are Spec#f#cat#on)
1rocessor : Intel 1'III based system
1rocessor Speed : ,4+ M!8 to *22M!8
AM : 6-M% to ,46M%
!ard 5isk : /+F%
$ey %oard : /+- keys
Soft9are Spec#f#cat#on
#anguage : (%.;?T
5atabase : MS'A&&?SS
0perating System : @indows;TG74G7*G,+++
5evelopment Tool ) Microsoft (isual Studio ,++4
8$S+"/ B"S$!(N02
All .;?T languages create code called intermediate language and as long
as that code was written to the &ommon #anguage Specification the
intermediate language can be used by any other .;?T language. This
means that all languages are first class languages as far as .;?T is
concerned. (%.;?T is a .;?T language with (% syntaC. It is not (% 69 but
(%6 programmers will be familiar with the syntaC. Most of the .;?T
facilities are available to (%.;?T programmers9 but interestingly9 some
features are only available in (%.;?T and have no e3uivalent in other
languages. If you are a (%6 programmer then the first .;?T language
you will want to learn will be (%.;?T.
The day starts with an overview of the runtime9 and an eCplanation of
how .;?T applications are structured and how you create the various
parts of the application. Dou will then learn about intermediate language
and just in time compilation9 assemblies and modules9 and metadata.
;eCt9 the (%.;?T compiler is introduced and the most often used
command line switches will be eCplained and you will be introduced to
the various supported application types.
&onsole applications will be used throughout the seminar9 so you will be
introduced to the &onsole class and using and formatting strings. ;eCt9
the seminar will cover basic features of (%.;?T) branchingH logical and
bitwise tests9 loops and bitwise shift operators. This gives you the tools
for creating and using .;?T types.
.;?T types defined in one assembly can be used in another9 and this is
performed through eCporting classes and metadata. The seminar will
show you how to do this and how to importing types.
.;?T is object orientated and so all types are derived ultimately from the
0bject base class. The seminar will cover the various class members)
properties9 fields and methods9 and the members used to initiali8e and
clean up an object =constructors and finali8ers>. Dou will also learn about
static members. ;eCt9 you will learn further details about classes
including the ways to pass method parameters9 indeCers9 eCporting
members and access modifers.
.;?T supports single implementation inheritance9 so you will be taught
how to derive from a class and how to access the base class. Dou will
also be shown how to declare virtual and abstract members and how to
override them and how to hide the base member.
.;?T allows multiple interface inheritance9 that is9 a class can implement
more than one interface. Dou will learn the benefit of interface
programming and how to implement interfaces using implicit and eCplicit
implementation. Dou will also learn about casts and the as keyword9 and
how to test for interface implementation using the is operator.
.;?T strives to solve many of the security problems inherent in native
and one way it does this is by controlling how memory is allocated and
accessed. In particular9 arrays are used to access .;?T allocated memory
and the runtime imposes bounds checking. Dou will learn the (%.;?T for
accessing arrays and the various System.Array members. .;?T memory
is managed by the Farbage collector which will be described. .;?T
objects can be managed by the F& and eCist on the managed heap and
these are called reference types. In addition9 another type of .;?T object
can be allocated on the stack =or as a class member on the heap9 but
without a reference> and these are called value types. The differences
between the two will be eCplained as will the mechanism of converting
between value type objects and reference types) boCing and unboCing.
.;?T defines rules called the &ommon #anguage Specification. &ode that
follows these rules can be used by code written in any other .;?T
language. 0ne area where this is important is eCceptions. .;?T defines
an eCception object type that can be thrown and caught in all .;?T
languages. Dou will learn the syntaC of guarding code for eCceptions and
catching the eCceptions9 you will also learn about how you can pass
information through the eCception objects and some of the subtle issues.
The framework library contains classes for containing objects9 and
provide mechanisms to iterate through those members. Dou will learn
about those classes and the For ?ach statement in (%.;?T to access all
members.
.;?T allows you to create type safe function pointer objects called
delegates. Dou will learn the types of delegates that the runtime offers
you9 how to initiali8e them and how to invoke them. Dou will also be
informed about some of the issues with delegates with respect to
threading and eCceptions. .;?T uses delegates to provide a standard
notification mechanism called events. Dou will learn how to declare and
use an even and also how to customise events.
All .;?T languages can create multi threaded code. Dou will learn how to
creating threads and how to control them. Dou will be made aware of the
problems with multi threaded code and how to alleviate them using
synchroni8ation. Dou will learn about the process thread pool9 how you
can use it and how it is used by the framework. Also in this section youIll
learn about asynchronous code and how you can invoke delegates
asynchronously.
At this point you will have learned the mandatory parts of the seminar.
The following topics are optional and will be covered if there is time.
0ne reason why .;?T is type safe is its use of metadata. Dou will learn
about metadata and how it is used. .;?T compilers add metadata to .;?T
code and this can be customi8ed using attributes. Dou will learn about
the various types of attributes9 and how to write your own. Dou will also
learn how .;?T reflection can be used to access attributes.
.;?T provides a mechanism to seriali8e objects. Seriali8ation is useful if
you want to save the state used in your application9 but it is vital for
framework features like .;?T remoting. Dou will earn about streams9
encoders9 readers and writers. Dou will also learn about how to make an
object seriali8able9 formatters and how to use them to seriali8ing objects.
The .;?T framework has a library which has more than a passing
resemblance to the (%6 forms library called @indows Forms &lasses. Dou
will learn the basics of using @indows Forms9 the form events9 controls
and the graphics library9 F5IJ9 that is used to draw on forms.
Much of the code that you will write will be .;?T code. !owever9 there is
a vast amount of code available that has been already written. Some
code has been compiled to native 5##s9 other code is available as &0M
libraries. .;?T provides a mechanism called interop that allows you to
access such code) 1latform Invoke allows you to access native 5##sH
&0M Interop allows you to access &0M objects. Dou will learn how to use
(%.;?T to use both of these technologies. Dou will learn how you use the
untime &allable @rapper from (%.;?T to access &0M objects9 and how
you can use the &0M &allable @rapper from unmanaged code to call
.;?T objects.
MS'A&&?SS
Microsoft Access ,++2 is a powerful9 yet easy to learn9 relational
database application for Microsoft @indows. This tutorial is designed for
users who are new or only have little eCperience using Access ,++2. It
introduces fundamental database concepts and operations and illustrates
how they are performed in Microsoft Access ,++2. This tutorial does not
cover all of the features and functions of Microsoft Access ,++2H
emphasis will be on basic and fre3uently'used features9 such as the
creation of tables and 3ueries9 or importing spreadsheet into Access.
Relat#onal 'ata)ase: in relational databases such as Access9 data is
stored in tables made up of one or more fields =Access calls a column a
field>. The data stored in each column must be of a single data type such
as &haracter9 ;umber or 5ate. A collection of values from each column of
a table is called a record or a row in the table.
5ifferent tables can have the same column in common. This feature is
used to eCplicitly specify a relationship between two tables. (alues
appearing in column A in one table are shared with another table
2a)le: tables are the main units of data storage in a database. A table is
a collection of data about a specific topicH it is made up of one of more
fields.
4#el&: a field is a column in a table and defines a data type for a set of
values in a table. For eCample9 a mailing list table might include fields for
first name9 last name9 address9 city9 state9 8ip code9 and telephone
number.
Recor&: a record in a row in a table and is a set of values defined by
fields.
In a mailing list table9 each record would contain the data for one person
as specified by the intersecting fields.
'ata type: data types are the properties of each field. A field only has
one data type9 such as &haracter9 ;umber or 5ate.
Pr#mary Key: a primary key is a value that can be used to identify a
uni3ue record in a table.
'es#gn 8#e9: it provides the tools for creating fields in a table.

'atasheet 8#e9: it allows you to update9 edit9 and delete in formation
from a table.
System 'es#gn
System design is an essential activity in the System 5evelopment #ife
&ycle. System design is the general detailed specification of the computer
based solution that was selected during system analysis. 5esign
specification forms the basis for system development. The design is a
solution9 the translation of re3uirements into ways of meeting them. In
the process the end user re3uirement were translated into specification
for a computer based information system. System design consists of two
phases)'
5( /-1$!"/ '0S$1N
2( PH6S$!"/ '0S$1N
In logical design the detailed specification of the new system is described
i.e. output9 the inputs and the databases9 all in manner that meets
project re3uirements.
The activity following logical design9 are the procedure followed in the
physical design i.e. producing programs9 software9 files and a working
system.
/og#cal 'es#gn
'ata)ase 'es#gn
This phase is one of the most crucial as well as important
part of the System 5esign. The complete database description must
confirm to the rule of logical and physical data structures imposed by the
database management system that will manage the database.
The 5atabase Structure used in the proposed system are )'
4-RM /"6-+2S
4-RM5:.0/!-M0 S!R00N
4-RM2:/-1$N
F0M 2'MAI; F0M
F0M -';?@ STAFF ?;TD F0M
F0M 4'?5IT STAFF I;F0MATI0; F0M
F0M 6'5?1ATATM?;T ?;TD F0M
F0M .'00M %00$I;F F0M
F0M *'?5IT %00$I;F I;F0MATI0; F0M
F0M 7'&!?&$ 0"T F0M
F0M /+'%I## F?;?ATI0; F0M
F0M //';?@ 00M ?;TD F0M
F0M /,'?5IT 00M I;F0MATI0; F0M
F0M /2'&"ST0M? ?10T F?;?ATI0; F0M
F0M /-'M0;T!#D &0##?&TI0; F0M
F0M /4'&!A;F? "S? I;F0MATI0; F0M
Splash Screen;frmSplash<
1ublic &lass frmSplash
Inherits System.@indows.Forms.Form
5im i9 j As 0bject
5im ch As Short
1rivate Sub frmSplashK#oad=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles My%ase.#oad
ch L +
i L +
j L 4
?nd Sub
1rivate Sub Frame/K&lick=>
Me.&lose=>
?nd Sub
1rivate Sub Timer/KTick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles Timer/.Tick
If j ML /++ Then
j L 4
?lse
j L j J 4
?nd If
If i ML /++ Then
Me.!ide=>
frm#ogin.Show=>
Timer/.?nabled L False
?Cit Sub
?nd If
i L i J /
1rogress%ar/.(alue L i
lblpercent.TeCt L i A NON
?nd Sub
?nd &lass
/og#n Screen;frm/og#n<
Imports System.5ata.0le5b
1ublic &lass frm#ogin
Inherits System.@indows.Forms.Form
5im i As Single
5im j As Single
5im cn As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
?nd
?nd Sub
1rivate Sub cmd#oginK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd#ogin.&lick
If tCt"sername.TeCt L NN Then
tCt"sername.Focus=>
Msg%oC=N"sername should not be blankN>
?Cit Sub
?nd If
If tCt1assword.TeCt L NN Then
tCt1assword.Focus=>
Msg%oC=N1assword should not be blankN>
?Cit Sub
?nd If
5im s3lStr As String
s3lStr L Nselect P from login where "ser;ameLN A NIN A tCt"sername.TeCt A NI and
1assLIN A tCt1assword.TeCt A NIN
cmd L ;ew 0le5b&ommand=s3lStr9 cn>
rdr L cmd.?Cecuteeader
If ;ot rdr.!asows Then
Msg%oC=NInvalid "sernameG1asswordN>
tCt1assword.TeCt L NN
tCt"sername.TeCt L NN
tCt"sername.Focus=>
?lse
frmMain.Show=>
Me.!ide=>
?nd If
rdr.&lose=>
?nd Sub
1rivate Sub frm#oginK#oad=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles My%ase.#oad
i L -
j L i J -
cn L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
cn.0pen=>
?nd Sub
1rivate Sub Timer/KTick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles Timer/.Tick
If i Q j Then
i L i J -
j L j J -
?lse
i L i ' -
j L j ' -
?nd If
If i L -- Then
j L i ' -
?nd If
If i L - Then
j L i J -
?nd If
#abel/.Font L ;ew Font=#abel/.Font.;ame9 i>
?nd Sub
1rivate Sub Shape/K&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles Shape/.&lick
?nd Sub
1rivate Sub Shape,K&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles Shape,.&lick
?nd Sub
?nd &lass
Ma#n Screen;frmMa#n<
1ublic &lass frmMain
Inherits System.@indows.Forms.Form
5im i As 0bject
5im j As Short
1ublic Sub add;ewStaffK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles add;ewStaff.&lick
frm;ewStaff.Show=>
?nd Sub
1ublic Sub addoomK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles addoom.&lick
frmoom?ntry.Show=>
?nd Sub
1ublic Sub %illK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles %ill.&lick
frm%ill.Show=>
?nd Sub
1ublic Sub &hange"serK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles &hange"ser.&lick
frm&hange"ser.Show=>
?nd Sub
1ublic Sub 5epartureK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles 5eparture.&lick
frm&heck0ut.Show=>
?nd Sub
1ublic Sub 5ept?ntryK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles 5ept?ntry.&lick
frm5ept?ntry.Show=>
?nd Sub
1ublic Sub edit&ustK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles edit&ust.&lick
frm?ditoom%ooking.Show=>
?nd Sub
1ublic Sub editoomK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles editoom.&lick
frm?ditoom5etail.Show=>
?nd Sub
1ublic Sub editStaffK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles editStaff.&lick
frm?ditStaff.Show=>
?nd Sub
1ublic Sub Monthly&ollectionptK&lick=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles Monthly&ollectionpt.&lick
frmMonthly&oll.Show=>
?nd Sub
1ublic Sub ;ew&ustK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles ;ew&ust.&lick
frmoom%ooking.Show=>
?nd Sub
1ublic Sub EuitK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles Euit.&lick
?nd
?nd Sub
1ublic Sub StaffptK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles Staffpt.&lick
frmStaffpt.Show=>
?nd Sub
1ublic Sub StatusptK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles Statuspt.&lick
frm5aily&ust.Show=>
?nd Sub
1rivate Sub Timer/KTick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles Timer/.Tick
5im str As String
str L N!otel Management SystemN
If i M #en=str> Then
i L /
?nd If
lbltitle.TeCt L str.Substring=+9 i>
i L i J /
?nd Sub
1rivate Sub frmMainK5isposed=%y(al sender As 0bject9 %y(al e As
System.?ventArgs> !andles Me.5isposed
?nd
?nd Sub
1rivate Sub frmMainK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
i L /
?nd Sub
1rivate Sub 5ailyStatusK&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles 5ailyStatus.&lick
frmoomStatuspt.Show=>
?nd Sub
?nd &lass
Ne9staff0ntry4orm;frmNe9Staff<
Imports System.5ata.0le5b
1ublic &lass frm;ewStaff
Inherits System.@indows.Forms.Form
5im cn As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
5im cnt As String
5im dcode As String
1rivate Sub cmdAddK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles cmdAdd.&lick
Try
cmd.&ommandTeCt L Nselect P from ?mp5etailN
rdr L cmd.?Cecuteeader=>
If rdr.!asows L False Then
cnt L N?/+/N
?lse
5o @hile rdr.ead
cnt L N?N A (al=Mid=rdr.Item=+>.ToString9 ,9
rdr.Item=+>.ToString.#ength>> J /
#oop
?nd If
rdr.&lose=>
cmd.&ommandTeCt L Nselect P from 5epartmentN
rdr L cmd.?Cecuteeader=>
If rdr.!asows Then
5o @hile rdr.ead
cmb5;ame.Items.Add=rdr=/>.ToString=>>
#oop
?nd If
rdr.&lose=>
tCt&ode.TeCt L cnt
cmb5;ame.Focus=>
cmdAdd.?nabled L False
cmdSave.?nabled L True
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmdSaveK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmdSave.&lick
If tCt50%.TeCt QM NN Then
If ;ot Is5ate=tCt50%.TeCt> Then
tCt50%.Focus=>
Msg%oC=N5ate of %irth is not validN>
?Cit Sub
?nd If
?nd If
If tCt50R.TeCt QM NN Then
If ;ot Is5ate=tCt50R.TeCt> Then
tCt50R.Focus=>
Msg%oC=N5ate of Roining is not validN>
?Cit Sub
?nd If
?nd If
If tCt1hone.TeCt QM NN Then
If ;ot Is;umeric=tCt1hone.TeCt> Then
tCt1hone.Focus=>
Msg%oC=N1hone ;o. is not validN>
?Cit Sub
?nd If
?nd If
If tCt%asic.TeCt QM NN Then
If ;ot Is;umeric=tCt%asic.TeCt> Then
tCt%asic.Focus=>
Msg%oC=N%asic Salary should be a numberN>
?Cit Sub
?nd If
?nd If
If tCt!A.TeCt QM NN Then
If ;ot Is;umeric=tCt!A.TeCt> Then
tCt!A.Focus=>
Msg%oC=N!A should be a numberN>
?Cit Sub
?nd If
?nd If
If tCtTA.TeCt QM NN Then
If ;ot Is;umeric=tCtTA.TeCt> Then
tCtTA.Focus=>
Msg%oC=NTA should be a numberN>
?Cit Sub
?nd If
?nd If
If tCt5A.TeCt QM NN Then
If ;ot Is;umeric=tCt5A.TeCt> Then
tCt5A.Focus=>
Msg%oC=N5A should be a numberN>
?Cit Sub
?nd If
?nd If
5im str As Msg%oCesult
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
Try
If str L Msg%oCesult.Des Then
cmd.&ommandTeCt L Nselect P from department where deptKnameLIN A
cmb5;ame.TeCt A NIN
rdr L cmd.?Cecuteeader
rdr.ead=>
5im dcode As String
dcode L rdr=+>.ToString
rdr.&lose=>
5im s3lstr As String
s3lstr L Ninsert into ?mp5etail values=IN A tCt&ode.TeCt A NI9IN A dcode A NI9IN
A tCt5esig.TeCt A NI9IN A K
tCt?;ame.TeCt A NI9IN A tCtF;ame.TeCt A NI9IN A tCtAddress.TeCt A NI9TN A
tCt50%.TeCt A NT9TN K
A tCt50R.TeCt A NT9IN A tCt1hone.TeCt A NI9IN A tCtEualification.TeCt A NI9N A
(al=tCt%asic.TeCt> K
A N9N A (al=tCt!A.TeCt> A N9N A (al=tCt5A.TeCt> A N9N A (al=tCtTA.TeCt> A N>N
cmd.&ommandTeCt L s3lstr
5im c As Short
c L cmd.?Cecute;onEuery=>
If c M + Then
Msg%oC=Necord has been savedN>
cmdAdd.?nabled L True
cmdSave.?nabled L False
?nd If
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub frm;ewStaffK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
cn L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
cn.0pen=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
cmd L ;ew 0le5b&ommand
cmd.&onnection L cn
tCt&ode.?nabled L False
cmdSave.?nabled L False
?nd Sub
1rivate Sub #abel2K&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles #abel2.&lick
?nd Sub
1rivate Sub tCt5esigKTeCt&hanged=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles tCt5esig.TeCt&hanged
?nd Sub
?nd &lass
0&#tStaff$nformat#on4orm;frme&#tstaff<
Imports System.5ata.0le5b
1ublic &lass frm?ditStaff
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
5im dcode As String
5im ecode As String
1rivate Sub cmb5eptKSelectedIndeC&hanged=%y(al eventSender As System.0bject9
%y(al eventArgs As System.?ventArgs> !andles cmb5ept.SelectedIndeC&hanged
Try
cmd.&ommandTeCt L Nselect P from 5epartment where 5eptK;ame LIN A
cmb5ept.TeCt A NIN
rdr L cmd.?Cecuteeader
rdr.ead=>
dcode L rdr=+>
rdr.&lose=>
cmd.&ommandTeCt L Nselect P from ?mp5etail where 5eptK&odeLN A NIN A
dcode A NIN A NN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
#ist/.Items.&lear=>
5o @hile rdr.ead
#ist/.Items.Add=rdr=N?mpK&odeN>.ToString A N'N A rdr=N;ameN>.ToString>
#oop
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmd"pdateK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd"pdate.&lick
If tCt50%.TeCt QM NN Then
If Is5ate=tCt50%.TeCt> L False Then
tCt50%.Focus=>
Msg%oC=N5ate of %irth is not validN>
?Cit Sub
?nd If
?nd If
If tCt50R.TeCt QM NN Then
If ;ot Is5ate=tCt50R.TeCt> Then
tCt50R.Focus=>
Msg%oC=N5ate of Roining is not validN>
?Cit Sub
?nd If
?nd If
If tCt1hone.TeCt QM NN Then
If ;ot Is;umeric=tCt1hone.TeCt> Then
tCt1hone.Focus=>
Msg%oC=N1hone ;o. is not validN>
?Cit Sub
?nd If
?nd If
If tCt%asic.TeCt QM NN Then
If ;ot Is;umeric=tCt%asic.TeCt> Then
tCt%asic.Focus=>
Msg%oC=N%asic Salary is not validN>
?Cit Sub
?nd If
?nd If
If tCt!A.TeCt QM NN Then
If ;ot Is;umeric=tCt!A.TeCt> Then
tCt!A.Focus=>
Msg%oC=N!A is not validN>
?Cit Sub
?nd If
?nd If
If tCt5A.TeCt QM NN Then
If ;ot Is;umeric=tCt5A.TeCt> Then
tCt5A.Focus=>
Msg%oC=N5A is not validN>
?Cit Sub
?nd If
?nd If
If tCtTA.TeCt QM NN Then
If ;ot Is;umeric=tCtTA.TeCt> Then
tCtTA.Focus=>
Msg%oC=NTA is not validN>
?Cit Sub
?nd If
?nd If
5im str As Msg%oCesult
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
If str L Msg%oCesult.Des Then
Try
cmd.&ommandTeCt L Nselect P from 5epartment where 5eptK;ameLN A NIN
A cmb5;ame.TeCt A NIN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
rdr.ead=>
dcode L rdr=N5eptK&odeN>
?nd If
rdr.&lose=>
5im s3lstr As String
s3lstr L N"pdate ?mp5etail set 5eptK&odeLIN A dcode A NI95esigLIN A
tCt5esig.TeCt A NI9;ameLIN A K
tCt?;ame.TeCt A NI9Father;ameLIN A tCtF;ame.TeCt A NI9AddressLIN A
tCtAddress.TeCt A NI950%LTN A tCt50%.TeCt A NT950RLTN K
A tCt50R.TeCt A NT91honeLIN A tCt1hone.TeCt A NI9EualificationLIN A
tCtEualification.TeCt A NI9%asicLN A (al=tCt%asic.TeCt> K
A N9!raLN A (al=tCt!A.TeCt> A N95ALN A (al=tCt5A.TeCt> A N9TALN A
(al=tCtTA.TeCt> A N where ?mpK&odeLIN A tCt?&ode.TeCt A NIN
cmd.&ommandTeCt L s3lstr
5im c As Short L cmd.?Cecute;onEuery=>
If c M + Then
cmd"pdate.?nabled L False
Msg%oC=Necord has been updatedN>
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd If
?nd Sub
1rivate Sub frm?ditStaffK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
cmd L ;ew 0le5b&ommand=Nselect P from 5epartmentN9 con>
rdr L cmd.?Cecuteeader=>
If rdr.!asows Then
5o @hile rdr.ead
cmb5ept.Items.Add=rdr=/>.ToString>
cmb5;ame.Items.Add=rdr=/>.ToString>
#oop
?nd If
rdr.&lose=>
cmd"pdate.?nabled L False
tCt?&ode.?nabled L False
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub #ist/KSelectedIndeC&hanged=%y(al eventSender As System.0bject9
%y(al eventArgs As System.?ventArgs> !andles #ist/.SelectedIndeC&hanged
5im pos As Short
pos L InStr=/9 #ist/.TeCt9 N'N>
ecode L Mid=#ist/.TeCt9 /9 pos ' />
Try
cmd.&ommandTeCt L Nselect P from ?mp5etail where ?mpK&odeLN A NIN A
ecode A NIN
rdr L cmd.?Cecuteeader
rdr.ead=>
cmb5;ame.TeCt L cmb5ept.TeCt
tCt?&ode.TeCt L rdr=N?mpK&odeN>.ToString
tCt?;ame.TeCt L rdr=N;ameN>.ToString
tCtF;ame.TeCt L rdr=NFather;ameN>.ToString
tCt5esig.TeCt L rdr=N5esigN>.ToString
tCtAddress.TeCt L rdr=NAddressN>.ToString
tCt50%.TeCt L rdr=N50%N>.ToString
tCtEualification.TeCt L rdr=NEualificationN>.ToString
tCt50R.TeCt L rdr=N50RN>.ToString
tCt1hone.TeCt L rdr=N1honeN>.ToString
tCt%asic.TeCt L rdr=N%asicN>.ToString
tCt!A.TeCt L rdr=N!AN>.ToString
tCt5A.TeCt L rdr=N5AN>.ToString
tCtTA.TeCt L rdr=NTAN>.ToString
rdr.&lose=>
cmd"pdate.?nabled L True
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub #abel2K&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles #abel2.&lick
?nd Sub
?nd&lass
'epartment0ntry4orm;frm'ept0ntry<
Imports System.5ata.0le5b
1ublic &lass frm5ept?ntry
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
1rivate Sub cmb&odeKSelectedIndeC&hanged=%y(al eventSender As System.0bject9
%y(al eventArgs As System.?ventArgs> !andles cmb&ode.SelectedIndeC&hanged
5im str As String
str L Nselect P from 5epartment where 5eptK&odeLN A NIN A Trim=cmb&ode.TeCt>
A NIN A NN
Try
cmd L ;ew 0le5b&ommand=str9 con>
rdr L cmd.?Cecuteeader
If rdr.!asows Then
rdr.ead=>
tCt;ame.TeCt L rdr=N5eptK;ameN>.ToString
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmdAddK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles cmdAdd.&lick
tCt;ew&ode.TeCt L NN
tCt;ew;ame.TeCt L NN
tCt;ew&ode.Focus=>
cmdSave.?nabled L True
cmdAdd.?nabled L False
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmd?ditK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs As
System.?ventArgs> !andles cmd?dit.&lick
Try
cmd.&ommandTeCt L Nselect P from 5epartmentN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
cmb&ode.Items.&lear=>
5o @hile rdr.ead
cmb&ode.Items.Add=rdr=N5eptK&odeN>.ToString>
#oop
cmb&ode.TeCt L cmb&ode.Items=+>.ToString
?lse
Msg%oC=N1lease Add a 5epartmentN A vb&r#f A N;o ecord found in
5epartment TableN>
?nd If
rdr.&lose=>
cmd"pdate.?nabled L True
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmdSaveK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmdSave.&lick
If tCt;ew&ode.TeCt QM NN Then
Try
cmd.&ommandTeCt L Nselect P from 5epartment where 5eptK&odeLN A NIN A
tCt;ew&ode.TeCt A NIN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
Msg%oC=N&ode is already eCistN>
tCt;ew&ode.TeCt L NN
tCt;ew&ode.Focus=>
rdr.&lose=>
?Cit Sub
?lse
rdr.&lose=>
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd If
5im yn As Msg%oCesult
yn L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
If yn L Msg%oCesult.Des Then
Try
5im s3lStr L NInsert into 5epartment values=IN A tCt;ew&ode.TeCt A NI9IN A
tCt;ew;ame.TeCt A NI>N
cmd.&ommandTeCt L s3lStr
5im c As Short
c L cmd.?Cecute;onEuery=>
If c M + Then
Msg%oC=Necord has been savedN>
cmdAdd.?nabled L True
cmdSave.?nabled L False
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd If
?nd Sub
1rivate Sub cmd"pdateK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd"pdate.&lick
5im yn As Msg%oCesult
yn L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
If yn L Msg%oCesult.Des Then
Try
5im s3lstr As String
s3lstr L Nupdate 5epartment set 5eptK;ameLIN A tCt;ame.TeCt A NI where
5eptK&odeLIN A cmb&ode.TeCt A NIN
cmd.&ommandTeCt L s3lstr
5im c As Short L cmd.?Cecute;onEuery=>
If c M + Then
Msg%oC=Necord has been updated successfullyN>
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd If
?nd Sub
1rivate Sub frm5ept?ntryK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
cmd L ;ew 0le5b&ommand
cmd.&onnection L con
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
cmdSave.?nabled L False
cmd"pdate.?nabled L False
?nd Sub
?nd&lass
RoomBoo*#ng4orm;frmRoomBoo*#ng<
Imports System.5ata.0le5b
1ublic &lass frmoom%ooking
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
5im cnt As Short
1rivate Sub cmbFloor;oKSelectedIndeC&hanged=%y(al eventSender As
System.0bject9 %y(al eventArgs As System.?ventArgs> !andles
cmbFloorno.SelectedIndeC&hanged
5im s3l As String
Try
s3l L Nselect P from oom5etail where StatusLN A NIN A NFreeN A NIN A N and
TypeLN A NIN A cmboomType.TeCt A NIN A N and Floor;oLN A cmbFloorno.TeCt A N N
cmd.&ommandTeCt L s3l
cmboom;o.Items.&lear=>
rdr L cmd.?Cecuteeader
If rdr.!asows Then
5o @hile rdr.ead
cmboom;o.Items.Add=rdr=NroomnoN>.ToString>
#oop
cmboom;o.TeCt L cmboom;o.Items=+>
?lse
Msg%oC=Noom is not available at this floorN>
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmboomTypeKSelectedIndeC&hanged=%y(al eventSender As
System.0bject9 %y(al eventArgs As System.?ventArgs> !andles
cmboomType.SelectedIndeC&hanged
Try
5im str As String
str L Nselect floorno from oom5etail group by floornoN
cmd.&ommandTeCt L str
rdr L cmd.?Cecuteeader
cmbFloorno.Items.&lear=>
If rdr.!asows Then
5o @hile rdr.ead
cmbFloorno.Items.Add=rdr=+>.ToString>
#oop
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmdAdd;ewK&lick=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles cmdAdd;ew.&lick
Try
cmd.&ommandTeCt L Nselect maC=&ustK;o> as cn from %ooking5etailN
rdr L cmd.?Cecuteeader
If rdr.!asows L False Then
cnt L /
?lse
rdr.ead=>
cnt L (al=rdr=NcnN>> J /
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
tCt&ust;o.TeCt L &Str=cnt>
tCt;ame.TeCt L NN
tCtAddress.TeCt L NN
tCt;ationality.TeCt L NN
tCtAdvance.TeCt L NN
tCt&ommingfrm.TeCt L NN
tCtFoingTo.TeCt L NN
tCt;oK1ersons.TeCt L NN
tCt0cc5ate.TeCt L NN
tC(acc5ate.TeCt L NN
tCtTotal.TeCt L NN
tCt;ame.Focus=>
cmdSave.?nabled L True
cmdAdd;ew.?nabled L False
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmdSaveK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmdSave.&lick
If tCt1hone;o.TeCt QM NN Then
If ;ot Is;umeric=tCt1hone;o.TeCt> Then
tCt1hone;o.Focus=>
Msg%oC=N1hone ;o. is not validN>
?Cit Sub
?nd If
?nd If
If tCt0cc5ate.TeCt QM NN Then
If ;ot Is5ate=tCt0cc5ate.TeCt> Then
tCt0cc5ate.Focus=>
Msg%oC=N0ccupation5ate is not validN>
?Cit Sub
?nd If
?nd If
If tCt;oK1ersons.TeCt QM NN Then
If ;ot Is;umeric=tCt;oK1ersons.TeCt> Then
tCt;oK1ersons.Focus=>
Msg%oC=N;ot a valid numberN>
?Cit Sub
?nd If
?nd If
If tCtAdvance.TeCt QM NN Then
If ;ot Is;umeric=tCtAdvance.TeCt> Then
tCtAdvance.Focus=>
Msg%oC=N;ot a valid numberN>
?Cit Sub
?nd If
?nd If
If tCtTotal.TeCt QM NN Then
If ;ot Is;umeric=tCtTotal.TeCt> Then
tCtTotal.Focus=>
Msg%oC=N;ot a valid numberN>
?Cit Sub
?nd If
?nd If
5im str As Msg%oCesult
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
If str L Msg%oCesult.Des Then
Try
5im s3l As String
s3l L NInsert into %ooking5etail
=&ustK;o9;ame9Address9oom;o9;ationality91hone;o9;oK0fK1ersons9&ommingFrom9F
oingTo9N A K
N0ccupation5ate9Advance9TotalAmount> values=N A cnt A N9IN A tCt;ame.TeCt
A NI9IN A tCtAddress.TeCt A NI9N A K
(al=cmboom;o.TeCt> A N9IN A tCt;ationality.TeCt A NI9IN A tCt1hone;o.TeCt
A NI9N A (al=tCt;oK1ersons.TeCt> A N9IN A K
tCt&ommingfrm.TeCt A NI9IN A tCtFoingTo.TeCt A NI9TN A tCt0cc5ate.TeCt A
NT9N A K
(al=tCtAdvance.TeCt> A N9N A (al=tCtTotal.TeCt> A N>N
cmd.&ommandTeCt L s3l
5im c As Short L cmd.?Cecute;onEuery=>
If c M + Then
s3l L N"pdate oom5etail set TypeLIN A cmboomType.TeCt A
NI9StatusLI%ookedI where oom;oLN A cmboom;o.TeCt A NN
cmd.&ommandTeCt L s3l
cmd.?Cecute;onEuery=>
cmdAdd;ew.?nabled L True
cmdSave.?nabled L False
Msg%oC=Necord has been SavedN>
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd If
?nd Sub
1rivate Sub frmoom%ookingK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
cmd L ;ew 0le5b&ommand
cmd.&onnection L con
cmd.&ommandTeCt L Nselect P from oomTypeN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
5o @hile rdr.ead
cmboomType.Items.Add=rdr=+>.ToString>
#oop
?nd If
rdr.&lose=>
cmdSave.?nabled L False
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
?nd&lass
0&#t!ustomer'eta#l4orm;frme&#tRoom
Boo*#ng<
Imports System.5ata.0le5b
1ublic &lass frm?ditoom%ooking
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
5im r;0 As Short
5im f;o As Short
5im strType As String
1rivate Sub cmboomTypeKSelectedIndeC&hanged=%y(al eventSender As
System.0bject9 %y(al eventArgs As System.?ventArgs> !andles
cmboomType.SelectedIndeC&hanged
Try
cmd.&ommandTeCt L Nselect floorno from oom5etail where StatusLN A NIN A
NFreeN A NIN A N and TypeLN A NIN A cmboomType.TeCt A NIN A N or oom;oLN A r;0 A
N group by floornoN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
cmbFloor;o.Items.&lear=>
5o @hile rdr.ead
cmbFloor;o.Items.Add=rdr=NfloornoN>.ToString>
#oop
?nd If
rdr.&lose=>
cmbFloor;o.TeCt L cmbFloor;o.Items=+>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmbFloor;oKSelectedIndeC&hanged=%y(al eventSender As
System.0bject9 %y(al eventArgs As System.?ventArgs> !andles
cmbFloor;o.SelectedIndeC&hanged
Try
cmd.&ommandTeCt L Nselect P from oom5etail where StatusLN A NIN A NFreeN
A NIN A N and TypeLN A NIN A cmboomType.TeCt A NIN A N and Floor;oLN A
cmbFloor;o.TeCt A N or oom;oLN A r;0 A NN
cmboom;o.Items.&lear=>
rdr L cmd.?Cecuteeader
If rdr.!asows Then
5o @hile rdr.ead
cmboom;o.Items.Add=rdr=NroomnoN>.ToString>
#oop
?nd If
rdr.&lose=>
cmboom;o.TeCt L cmboom;o.Items=+>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmd"pdateK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd"pdate.&lick
5im str As Msg%oCesult
If ;ot Is;umeric=tCt1hone.TeCt> Then
tCt1hone.Focus=>
Msg%oC=N1hone ;o. is not validN>
?Cit Sub
?nd If
If ;ot Is;umeric=tCt;01.TeCt> Then
tCt;01.Focus=>
Msg%oC=N;o. of 1erson should be a numberN>
?Cit Sub
?nd If
If ;ot Is;umeric=tCtAdvance.TeCt> Then
tCtAdvance.Focus=>
Msg%oC=NAdvance should be a numberN>
?Cit Sub
?nd If
If ;ot Is;umeric=tCtTotal.TeCt> Then
tCtTotal.Focus=>
Msg%oC=NTotal Amount should be a numberN>
?Cit Sub
?nd If
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
Try
If str L Msg%oCesult.Des Then
5im s3l As String
s3l L Nupdate %ooking5etail set ;ameLIN A "&ase=Trim=tCt;ame.TeCt>> A
NI9AddressLIN A "&ase=Trim=tCtAddress.TeCt>> A K
NI9;ationalityLIN A "&ase=Trim=tCt;ationality.TeCt>> A NI9&ommingFromLIN A
"&ase=Trim=tCt&ommingFrm.TeCt>> A NI9FoingToLIN A K
"&ase=Trim=tCtFoingto.TeCt>> A NI91hone;oLIN A
"&ase=Trim=tCt1hone.TeCt>> A NI9 0ccupation5ateLTN A tCt0ccupation5ate.TeCt A K
NT9;oKofK1ersonsLN A tCt;01.TeCt A N9oom;oLN A cmboom;o.TeCt A
N9AdvanceLN A K
tCtAdvance.TeCt A N where &ustK;oLN A tCt&ust;o.TeCt
cmd.&ommandTeCt L s3l
cmd.?Cecute;onEuery=>
If tCt(acc5ate.TeCt QM NN And Is5ate=tCt(acc5ate.TeCt> Then
s3l L Nupdate oom5etail set Status LIFreeI where oom;oLN A r;0
cmd.&ommandTeCt L s3l
cmd.?Cecute;onEuery=>
s3l L Nupdate oom5etail set StatusLI%ookedI where oom;oLN A
cmboom;o.TeCt
cmd.&ommandTeCt L s3l
cmd.?Cecute;onEuery=>
?nd If
Msg%oC=Necord has been updatedN>
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub frm?ditoom%ookingK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
cmd L ;ew 0le5b&ommand
cmd.&onnection L con
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
tCt&ust;o.?nabled L False
?nd Sub
1rivate Sub #ist/KSelectedIndeC&hanged=%y(al eventSender As System.0bject9
%y(al eventArgs As System.?ventArgs> !andles #ist/.SelectedIndeC&hanged
r;0 L (al=#ist/.TeCt.Substring=+9 2>>
cmd.&ommandTeCt L Nselect P from %ooking5etail where 0ccupation5ateLN A NTN
A Format5ateTime=&5ate=pict0cc5ate.TeCt>9 5ateFormat.Short5ate> A NTN A N and
oom;oLN A r;0 A NN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
rdr.ead=>
tCt&ust;o.TeCt L rdr=NcustKnoN>.ToString
tCt;ame.TeCt L rdr=N;ameN>.ToString
tCtAddress.TeCt L rdr=NAddressN>.ToString
tCt;ationality.TeCt L rdr=N;ationalityN>.ToString
tCt&ommingFrm.TeCt L rdr=N&ommingFromN>.ToString
tCtFoingto.TeCt L rdr=NFoingToN>.ToString
tCt1hone.TeCt L rdr=Np!0;?;0N>.ToString
tCt;01.TeCt L rdr=N;0KofK1ersonsN>.ToString
tCtAdvance.TeCt L rdr=NAdvanceN>.ToString
tCtTotal.TeCt L rdr=NTotalAmountN>.ToString
tCt0ccupation5ate.TeCt L rdr=N0ccupation5ateN>.ToString
tCt(acc5ate.TeCt L rdr=N(accant5ateN>.ToString
r;0 L (al=rdr=Noom;oN>.ToString>
?nd If
rdr.&lose=>
cmd.&ommandTeCt L Nselect P from oom5etail where oom;oLN A r;0
rdr L cmd.?Cecuteeader
If rdr.!asows Then
rdr.ead=>
f;o L rdr=Nfloor;oN>.ToString
strType L rdr=NTypeN>.ToString
?nd If
rdr.&lose=>
cmboomType.Items.&lear=>
cmboom;o.Items.&lear=>
cmbFloor;o.Items.&lear=>
cmd.&ommandTeCt L Nselect P from oomTypeN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
5o @hile rdr.ead
cmboomType.Items.Add=rdr=NtypeN>.ToString>
#oop
?nd If
rdr.&lose=>
cmboomType.TeCt L strType
cmbFloor;o.TeCt L f;o
cmboom;o.TeCt L r;0
?nd Sub
1rivate Sub pict0cc5ateK(alue&hanged=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles pict0cc5ate.(alue&hanged
Try
cmd.&ommandTeCt L Nselect P from %ooking5etail where 0ccupation5ateLN A
NTN A pict0cc5ate.TeCt A NTN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
#ist/.Items.&lear=>
5o @hile rdr.ead
#ist/.Items.Add=rdr=NroomnoN>.ToString A N'N A rdr=N;ameN>.ToString>
#oop
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
?nd&lass
B#ll 4orm;frm!hec*-ut<
1ublic &lass frm%ill
1rivate Sub %utton/K&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles cmd%ill.&lick
frm%illeport.Show=>
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
?nd &lass
Ne9 Room 0ntry 4orm;frmRoom0ntry<
Imports System.5ata.0le5b
1ublic &lass frmoom?ntry
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmdAdd;ewK&lick=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles cmdAdd;ew.&lick
tCtFloor;o.TeCt L NN
tCtoom;o.TeCt L NN
tCtFloor;o.Focus=>
cmdAdd;ew.?nabled L False
cmdSave.?nabled L True
?nd Sub
1rivate Sub cmdSaveK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmdSave.&lick
If ;ot Is;umeric=tCtFloor;o.TeCt> 0r tCtFloor;o.TeCt L NN Then
tCtFloor;o.Focus=>
Msg%oC=NFloor ;o is not validN>
?Cit Sub
?nd If
If ;ot Is;umeric=tCtoom;o.TeCt> 0r tCtoom;o.TeCt L NN Then
tCtoom;o.Focus=>
Msg%oC=Noom ;o is not validN>
?Cit Sub
?nd If
5im str As Msg%oCesult
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
If str L Msg%oCesult.Des Then
Try
5im s3l As String
s3l L Nselect P from roomdetail where oom;oLN A tCtoom;o.TeCt
cmd.&ommandTeCt L s3l
rdr L cmd.?Cecuteeader
If rdr.!asows Then
Msg%oC=Noom ;o already eCistN>
tCtoom;o.TeCt L NN
tCtoom;o.Focus=>
?Cit Sub
?nd If
rdr.&lose=>
s3l L Ninsert into oom5etail values=N A tCtoom;o.TeCt A N9N A
tCtFloor;o.TeCt A K
N9IN A cmbType.TeCt A NI9IN A cmbStatus.TeCt A NI>N
cmd.&ommandTeCt L s3l
5im c As Short L cmd.?Cecute;onEuery
If c M + Then
Msg%oC=N;ew oom AddedN>
cmdAdd;ew.?nabled L True
cmdSave.?nabled L False
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd If
?nd Sub
1rivate Sub frmoom?ntryK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
5im s3l As String
s3l L Nselect P from roomTypeN
cmd L ;ew 0le5b&ommand=s3l9 con>
rdr L cmd.?Cecuteeader
If rdr.!asows Then
5o @hile rdr.ead
cmbType.Items.Add=rdr=NtypeN>.ToString>
#oop
?nd If
rdr.&lose=>
cmbType.TeCt L cmbType.Items=+>
cmdSave.?nabled L False
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
?nd &lass
0&#t Room 'eta#l
4orm;frme&#tRoom'eta#l<
Imports System.5ata.0le5b
1ublic &lass frm?ditoom5etail
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
1rivate Sub cmbFloor;oKSelectedIndeC&hanged=%y(al eventSender As
System.0bject9 %y(al eventArgs As System.?ventArgs> !andles
cmbFloor;o.SelectedIndeC&hanged
Try
cmd.&ommandTeCt L Nselect oom;o from oom5etail where Floor;oLN A
cmbFloor;o.TeCt A N order by oom;oN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
cmboom;o.Items.&lear=>
5o @hile rdr.ead
cmboom;o.Items.Add=rdr=Noom;oN>.ToString>
#oop
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmboom;oKSelectedIndeC&hanged=%y(al eventSender As
System.0bject9 %y(al eventArgs As System.?ventArgs> !andles
cmboom;o.SelectedIndeC&hanged
Try
cmd.&ommandTeCt L Nselect P from oom5etail where oom;oLN A
cmboom;o.TeCt
rdr L cmd.?Cecuteeader
rdr.ead=>
If rdr.!asows Then
cmbType.TeCt L rdr=NTypeN>.ToString
cmbStatus.TeCt L rdr=NStatusN>.ToString
?nd If
rdr.&lose=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub cmd"pdateK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd"pdate.&lick
5im str As Msg%oCesult
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J Msg%oCStyle.Euestion9
N&onfirmationN>
Try
If str L Msg%oCesult.Des Then
5im s3l As String
s3l L Nupdate oom5etail set typeLIN A cmbType.TeCt A NI9statusLIN A
cmbStatus.TeCt A NI where oom;oLN A cmboom;o.TeCt
cmd.&ommandTeCt L s3l
5im c As Short L cmd.?Cecute;onEuery
If c M + Then
Msg%oC=Necord has been updatedN>
?nd If
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub frm?ditoom5etailK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
5im s3l As String L Nselect Floor;o from oom5etail Froup by Floor;oN
cmd L ;ew 0le5b&ommand=s3l9 con>
rdr L cmd.?Cecuteeader
If rdr.!asows Then
cmbFloor;o.Items.&lear=>
5o @hile rdr.ead
cmbFloor;o.Items.Add=rdr=NFloor;oN>.ToString>
#oop
?nd If
rdr.&lose=>
cmd.&ommandTeCt L Nselect Type from oomTypeN
rdr L cmd.?Cecuteeader
If rdr.!asows Then
cmbType.Items.&lear=>
5o @hile rdr.ead
cmbType.Items.Add=rdr=NTypeN>.ToString>
#oop
?nd If
rdr.&lose=>
cmbType.TeCt L cmbType.Items=+>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
?nd &lass
!ustomer Report 4orm;frm'a#ly!ust<
1ublic &lass frm5aily&ust
1rivate Sub cmdShowK&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles cmdShow.&lick
frm5aily&ustpt.Show=>
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
?nd &lass
Monthly !ollect#on Report
4orm;frmMomthlycoll<
1ublic &lass frmMonthly&oll
1rivate Sub cmdMon&ollK&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles cmdMon&oll.&lick
frmMonthly&ollpt.Show=>
?nd Sub

1rivate Sub cmd&ancelK&lick=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub frmMonthly&ollK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
?nd Sub
?nd &lass
!hange +ser $nformat#on
4orm;frm!hange+ser<
Imports System.5ata.0le5b
1ublic &lass frm&hange"ser
Inherits System.@indows.Forms.Form
5im con As 0le5b&onnection
5im cmd As 0le5b&ommand
5im rdr As 0le5b5ataeader
1rivate Sub cmd&hangeK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&hange.&lick
If Is;umeric=Trim=tCtusername.TeCt>> Then
Msg%oC=NInvalid "sernameN>
tCtusername.Focus=>
?Cit Sub
?nd If
If tCtold.TeCt L NN Then
Msg%oC=N1assword do not matchN>
tCtold.Focus=>
?Cit Sub
?nd If
If tCtnew.TeCt L NN Then
Msg%oC=N;ew 1assword is should not be blankN>
tCtnew.Focus=>
?Cit Sub
?nd If
Try
cmd L ;ew 0le5b&ommand
cmd.&onnection L con
cmd.&ommandTeCt L Nselect P from login where "sernameLIN A
tCtusername.TeCt A NIN
rdr L cmd.?Cecuteeader
5im str As Msg%oCesult
If rdr.!asows Then
rdr.ead=>
If tCtold.TeCt L rdr=N1assN>.ToString Then
rdr.&lose=>
str L Msg%oC=NAre you sure SN9 Msg%oCStyle.Des;o J
Msg%oCStyle.Euestion9 N&onfirmationN>
If str L Msg%oCesult.Des Then
5im s3l As String
s3l L Nupdate #ogin set 1ass LIN A tCtnew.TeCt A NI where
"ser;ameLIN A tCtusername.TeCt A NIN
cmd.&ommandTeCt L s3l
5im c As Short L cmd.?Cecute;onEuery
If c M + Then
Msg%oC=N"ser Information has been changedN>
cmd&ancel.Focus=>
?nd If
?nd If
?lse
tCtold.TeCt L NN
tCtold.Focus=>
Msg%oC=N0ld 1assword do not matchN>
?nd If
?lse
Msg%oC=N;o such user eCistN>
?nd If
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
1rivate Sub cmd&ancelK&lick=%y(al eventSender As System.0bject9 %y(al eventArgs
As System.?ventArgs> !andles cmd&ancel.&lick
Me.&lose=>
?nd Sub
1rivate Sub frm&hange"serK#oad=%y(al eventSender As System.0bject9 %y(al
eventArgs As System.?ventArgs> !andles My%ase.#oad
Try
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
&atch eC As ?Cception
Msg%oC=eC.Message>
?nd Try
?nd Sub
?nd &lass
Reports
Reports
5( B#ll
This report will show the bill at the checkout
of a customer.
Imports System.5ata.0le5b
1ublic &lass frm%illeport
1rivate Sub Form/KActivated=%y(al sender As 0bject9 %y(al e As System.?ventArgs>
!andles Me.Activated
5im ocdate As String
5im rno As Short
ocdate L frm%ill.tCt0cc5ate.TeCt
rno L (al=frm%ill.tCtno.TeCt>
5im con As 0le5b&onnection
con L ;ew 0le5b.0le5b&onnection
con.&onnectionString L My.Settings.!otel5ata%ase&onnectionString
con.0pen=>
5im dt As ;ew 5ataTable
5im str As String
str L NS?#?&T %ooking5etail.&ustK;o9 %ooking5etail.;ame9
%ooking5etail.Address9 %ooking5etail.oom;o9 %ooking5etail.;ationality9
%ooking5etail.1hone;o9 N A K
N%ooking5etail.;oKofK1ersons9 %ooking5etail.&ommingFrom9 %ooking5etail.FoingTo9
%ooking5etail.0ccupation5ate9 %ooking5etail.(accant5ate9N A K
N%ooking5etail.Advance9 %ooking5etail.TotalAmount9 oom5etail.Type9
oom5etail.Floor;o9 oomType.entN A K
N F0M ==%ooking5etail I;;? R0I;N A K
N oom5etail 0; %ooking5etail.oom;o L oom5etail.oom;o> I;;?
R0I;N A K
N oomType 0; oom5etail.Type L oomType.Type>N A K
N @!?? %ooking5etail.0ccupation5ate L TN A ocdate A NT A;5
%ooking5etail.oom;o LN A rno A NN
5im da As ;ew 0le5b5ataAdapter=str9 con>
da.Fill=dt>
5im cr As ;ew rpt%ill
cr.Set5ataSource=dt>
&rystaleport(iewer/.eportSource L cr
?nd Sub
1rivate Sub frm%illeportK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
?nd Sub
?nd&lass
4ormatofreport
,.5aily oom Status
Imports System.5ata.0le5b
1ublic &lass frmoomStatuspt
1rivate Sub frmoomStatusptK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
5im con As 0le5b&onnection
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
5im dt As ;ew 5ataTable
5im str As String
str L NS?#?&T oom;o9 Floor;o9 Type9 Status F0M=oom5etail> 05? %D
Floor;o9 oom;oN
5im da As ;ew 0le5b5ataAdapter=str9 con>
da.Fill=dt>
5im cr As ;ew rptoomStatus
cr.Set5ataSource=dt>
&rystaleport(iewer/.eportSource L cr
?nd Sub
?nd &lass
Formatofeport

2.Monthly&ollectioneport
Imports System.5ata.0le5b
1ublic &lass frmMonthly&ollpt
1rivate Sub frmMonthly&ollptK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
5im mon9 yr As Short
mon L (al=frmMonthly&oll.tCtMonth.TeCt>
yr L (al=frmMonthly&oll.tCtDear.TeCt>
5im con As 0le5b&onnection
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
5im dt As ;ew 5ataTable
5im str As String
str L NS?#?&T %ooking5etail.&ustK;o9 %ooking5etail.;ame9
%ooking5etail.Address9 %ooking5etail.(accant5ate9 %ooking5etail.Advance9
%ooking5etail.TotalAmount9 N A K
NoomType.ent9 %ooking5etail.vaccantdate ' %ooking5etail.occupationdate
AS ;05 F0M ==%ooking5etail I;;? R0I; oom5etail 0; %ooking5etail.oom;o LN A
K
Noom5etail.oom;o> I;;? R0I; oomType 0; oom5etail.Type L
oomType.Type> @!??=Month=bookingdetail.vaccantdate> L N A mon A N And
Dear=%ooking5etail.(accant5ate> L N A yr A N>N
5im da As ;ew 0le5b5ataAdapter=str9 con>
da.Fill=dt>
5im cr As ;ew rptMonthly&ollection
cr.Set5ataSource=dt>
&rystaleport(iewer/.eportSource L cr
?nd Sub
?nd &lass
Format of eport
-.&ustomer eport
Imports System.5ata.0le5b
1ublic &lass frm5aily&ustpt
1rivate Sub frm5aily&ustptK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
5im 0cc5ate As String
0cc5ate L frm5aily&ust.tCt0cc5ate.TeCt
5im con As 0le5b&onnection
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
5im dt As ;ew 5ataTable
5im str As String
str L NS?#?&T &ustK;o9 ;ame9 Address9 oom;o9 ;ationality9 1hone;o9
;oKofK1ersons9 &ommingFrom9 FoingTo9 0ccupation5ate9 (accant5ate9 Advance9 N A K
NTotalAmount F0M=%ooking5etail> @!??=0ccupation5ate L TN A 0cc5ate A
NT>N
5im da As ;ew 0le5b5ataAdapter=str9 con>
da.Fill=dt>
5im cr As ;ew rpt5aily&ustomer
cr.Set5ataSource=dt>
&rystaleport(iewer/.eportSource L cr
?nd Sub
?nd&lass
4ormat of report
4.Staff eport
Imports System.5ata.0le5b
1ublic &lass frmStaffpt
1rivate Sub frmStaffptK#oad=%y(al sender As System.0bject9 %y(al e As
System.?ventArgs> !andles My%ase.#oad
5im con As 0le5b&onnection
con L ;ew 0le5b&onnection=My.Settings.!otel5ata%ase&onnectionString>
con.0pen=>
5im dt As ;ew 5ataTable
5im str As String
str L NS?#?&T ?mp5etail.?mpK&ode9 ?mp5etail.5esig9 ?mp5etail.;ame9
?mp5etail.Father;ame9 ?mp5etail.Address9 ?mp5etail.50%9 ?mp5etail.50R9N A K
N?mp5etail.Eualification9 ?mp5etail.1hone9 ?mp5etail.%asic9
5epartment.5eptK;ame9 ?mp5etail.5eptK&ode N A K
NF0M =5epartment I;;? R0I; ?mp5etail 0; 5epartment.5eptK&ode L
?mp5etail.5eptK&ode>05? %D ?mp5etail.5eptK&odeN
5im da As ;ew 0le5b5ataAdapter=str9 con>
da.Fill=dt>
5im cr As ;ew rptStaff
cr.Set5ataSource=dt>
&rystaleport(iewer/.eportSource L cr
?nd Sub
?nd &lass
Format of eport
2est#ng
Testing is a set of activities that can be planned in advance and
conducted systematically. For this reasona template for software testing
a set of steps into which can place specific test case design and testing
methods should be defined for the software process. All provide the
software developer with a template for testing and alll have the following
generic characteristics )
To perform effective testing9 a software team should conduct
effective normal technical reviews.
Testing begins at the component level and works :outward< toward
the integeration of the entire computer'bassed system.
5ifferent testing techni3ues are appropriate at different points in
time.
Testing is conducted by the developers of the software and =for
large project> an independent test groups.
Testing and debugging are the different activities9 but debugging
must be accomodated in any testing strategy.
20S2$N1 PR$N!$P/0S) There are many principles that guide software
testing. %efore applying methods to design effective test cases9 a
software engineer must understand the basic principles that guide
software testing. Following are main principles for testing.
"ll test shoul& )e tracea)le to customer re3u#rements) This
is in order to uncover any defects that might cause the program or
systemto fail to meet the the clients re3uirements.
2ests shoul& )e planne& long )efore test#ng )eg#ns: Soon
after re3uirements model is completed9 test planning can begin.
5etailled test cases can begin as soon as the design model is
designed.
2he Pareto pr#nc#ple appl#es to soft9are test#ng: Stated
simply9 the pareto principles implies that *+ of errors uncovered
during testing will likely be traceable to ,+ percent of program
components and to throughly test them.
2est#ng shoul& )eg#n =#n the small> an& progress to9ar&s
test#ng =#l the large>: The first tests planned and eCecuted
generally focus on individual components. As testing progresses9
focus shifts inan attempt to find errors in integrated clusters of
progresses and ultimately in the entire system.
0?haust#,e test#ng #s not poss#)le: The number of path
peramutation for even a moderately si8ed program is eCceptionally
large. It is impossible to eCecute every combination of path during
testing.
2o )e most effect#,e@ test#ng shoul& )e con&ucte& )y an
#n&epen&ent th#r& party: The software engineer who has created
the system is not the best person to conduct all tests of the
software.
2est#ng -)ject#,es: This objectives also demonstrates that the software
functions are working according to software re3uirement specifications
=SS> with regard to functionallity9 features9 Facilities and performance.
Testing is a process of eCecuting a program with the intent of
finding an errors.
A good test case is one that has a high probabillity of finding an as
yet undescovered error.
A successful test is one that uncovers an as yet undiscovered
errors.
/080/S -4 20S2$N1:
There are three levels of testing individual module to the entire software
systems
+n#t 2est#ng: In unit testing individual components are tested to ensure
that they operate correctly.
There are number of reasons in support of unit testing the entire
product.
The si8e of a single module is small enough that we can locate an
error fairly easily.
The module is small enough that we can attempt to test it in some
demonstrably eChaustive fashion.
&onfusing interactions of multiple errors in widely different parts of
the of software are eliminated.
&ommans errors in &omputation are)
/> Incorrect arithmetic precedence
,> MiCed code operations
2> Incorrect intiali8ations
-> 1recision inaccuracy
4> Incorrect symbolic representation of an eCpression.
Test cases in unit testing shiuld uncover error such as)
/> &omparision of different data types
,> Incorrect logical operation or precedence
2> ?Cception of e3uality when precision error makes e3uality unlikely
-> Incorrect comparison of variables
4> Improper loop termination
6> Failure to eCit when divergent iteration is encountered
.> Improperly modified loop variables
"nit testing is a simplified when a component with a high cohesion is
designed. @hen only one functionis addressed by a component9 the
number of test cases is reduced and errors can be more easily predicted
and uncovered.
$ntegrat#on 2est#ng :The second level of testing is called integration
testing. Integration testing is a systematic techni3ue for constructing the
program structure while at same time conducting tests to uncover errors
is associated with interfacing.
In this testing many unit tested modules are combined into sub'system 9
which are then tested. The goal here is to see if the modules can be
integrated property.
"pproches to $ntegrat#on 2est#ng: The various approaches 9 which are
used for the integration testing are)'
/> Incremental approaches
,> Top'down approaches
2> %ottam'up integration
-> egression testing
4> Smoke testing
6> Sandwich Integration testing
System 2est#ng: The sub'systems are inegrated to make up the entire
system. The testing process is concerned with finding error that result
most unanticipated between sub systems and system components. Its is
also concerend with validating that the system need its functional or non'
functional re3uirements.
There are essentially three main kinds of system testing)
/> Alpha Testing
,> %eta Testing
2> Acceptance Testing
"lpha 2est#ng: Alpha Testing refers to the system testing caried out by
the test team with in development organi8ation.
Beta 2est#ng: %eta testing is the system testing performed by a selected
group of friendly customers.
/. "cceptance 2est#ng: Acceptance testing is the testing performed
by the customer to determine whether to accept or reject the
delivery of the system.
4uture "ppl#cat#on
(arious new features can be added so that it can attract more and more
people)
The project can also be used in the hotel room so the customer
can also be familiar to the hotel system.
This project can also be used for the future booking A provides the
report about any transaction.
!-N!/+S$-N
The !0T?# MA;AF?M?;T SDST?M is indeed a great help in simplifying
the collection of fine. The project will eliminate the need to maintain
resisters and makes the task easy.
It helps to maintain all the information about the customers9 staff
members and rooms but there is a great scope of improvement of the
system as more improvisation would be added into the system9 it would
become better.
I hope my project has given any reader a clear understatnding of the
type of computeri8ed !otel Managament System.
B#)l#ography
For the development this project I have to follow some books. The
methods and concepts of these books help me to solve conceptual
A syntaC detailed problems.
/. 8#sual Bas#c(Net .R-A
,. System "nalys#s % 'es#gn 0l#as M( "9ar&
2. SB. 0ng#neer#ng Roger S(
Pressman

You might also like