Hotel Management System Source Code - C#, JAVA, PHP, Programming, Source Code
Hotel Management System Source Code - C#, JAVA, PHP, Programming, Source Code
Hotel
1 Management System In Visual Basic.Net And
MySQL Database With Source Code
Shares
(https://1bestcsharp.sellfy.store/p/vbnet-hotel-management-system-source-code/)
in this visual basic .net project tutorial we will see how to create a simple desktop application
with winforms to manage hotel reservations using vb.net programming language and mysql
database.
tools:
- visual basic .net programming language.
- visual studio express 2013.
- mysql database.
- xampp server.
- phpmyadmin.
Watch The Full Project Tutorial
1
Shares
VB.Net Project Tutorial for Beginners - Full VB.Net Programming…
Programming…
if you want the source code click on the download button below
(https://1bestcsharp.sellfy.store/p/vbnet-hotel-management-system-source-code/)
1
Shares
1 - The Login Form
before getting access to the main form the user need to login first by entering his
username
1
and password.
and we will check if the username/password textbox are empty.
and if the user enter the wrong username or password or this user doesn't exists at
all.
The Login Button:
Private Sub ButtonLogin_Click(sender As Object, e As EventArgs) Handles ButtonLogin.Click
command.CommandText = selectQuery
command.Connection = connection.getConnection()
adapter.SelectCommand = command
adapter.Fill(table)
Else
End If
End Sub
1
Shares
(https://1.bp.blogspot.com/-
rJuQXooMChI/XK8k_3kwxBI/AAAAAAAAF2M/yNs_uzjBo_crA5RqCiC8AcwtLIc3YAajQCLcBGAs/s1600/vb.net
%2Bhotel%2Bmanagement%2Bsystem%2B-%2Blogin%2Bform.PNG)
if the user enter the correct username and password we will show him the main form.
2 - The Main Form
this is a quick and easy from with a menu created with a panel and labels to take the
user to the selected form on label click.
End Sub
End Sub
1
Private Sub LabelMReservastions_Click(sender As Object, e As EventArgs) Handles
Shares
LabelMReservastions.Click
1
Dim manage_Rv_Form As New ManageReservationsForm()
manage_Rv_Form.ShowDialog()
End Sub
(https://2.bp.blogspot.com/-67Xy6nnGfME/XK8oc-
dZh2I/AAAAAAAAF2Y/jNVOL0aRCIY9nePNrxk6X_tFnCSCx2J9ACLcBGAs/s1600/vb.net%2Bhotel%2Bmanag
ement%2Bsystem%2B-%2Bmain%2Bform.PNG)
1
Else
Else
End If
End If
End Sub
If TextBoxId.Text.Trim().Equals("") Then
Else
If fname.Trim().Equals("") Or lname.Trim().Equals("") Or phone.Trim().Equals("") Then
Else
1
Dim id As Integer = Convert.ToInt32(TextBoxId.Text)
Else
End If
End If
End If
End Sub
If TextBoxId.Text.Trim().Equals("") Then
Else
Dim id As Integer = Convert.ToInt32(TextBoxId.Text)
If client.removeClient(id) Then
1
' clear boxes
TextBoxId.Text = ""
TextBoxFname.Text = ""
TextBoxLname.Text = ""
TextBoxPhone.Text = ""
TextBoxEmail.Text = ""
Else
End If
End If
End Sub
(https://3.bp.blogspot.com/-
bRbMtsZPwmI/XK8wGTy0jSI/AAAAAAAAF2k/yLUkTV9tz1w3x0nJnqbhb5PLAY4qX5WbwCLcBGAs/s1600/v
b.net%2Bhotel%2Bmanagement%2Bsystem%2B-%2Bmanage%2Bclients%2Bform.PNG)
here the user can add a new room to the hotel system.
when
1 you add a new room you need to select the type of room (single, double, family,
suite).
and like the client form you can view all rooms in a datagridview + how many rooms
this hotel have, and add, edit, remove the selecte one + a combobx populated with all
room's categories.
(https://4.bp.blogspot.com/-
LZX0gbTHhpU/XK8zm0WExdI/AAAAAAAAF2w/n1Fr8sC-
u3cLDrcKanTNAF6w4N00NmUnQCLcBGAs/s1600/vb.net%2Bhotel%2Bmanagement%2Bsystem%2B-
%2Brooms%2Btypes.png)
Try
If RadioButtonYes.Checked Then
reserved = "Yes"
End If
MessageBox.Show("Make Sure to Enter The Room Number and The Phone Number", "Empty
Fields",
1
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
Else
End If
End If
Catch ex As Exception
End Try
End Sub
Try
reserved = "Yes"
reserved = "No"
End If
MessageBox.Show("Make Sure to Enter The Room Number and The Phone Number", "Empty
Fields", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
Else
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
1
Shares
End Sub
1
- Delete The Selected Room Button
Try
If room.removeRoom(number) Then
Else
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
1
Shares
(https://2.bp.blogspot.com/-ukUp8O1IH9M/XK828l-sj1I/AAAAAAAAF28/jPuREJXMsKoBtHV4_ArD-
HCTZJSSuB8WwCLcBGAs/s1600/vb.net%2Bhotel%2Bmanagement%2Bsystem%2B-
%2Bmanage%2Brooms%2Bform.PNG)
Try
1
Shares MessageBox.Show("The Date In Must be = Or > to Today Date", "Invalid Date IN",
MessageBoxButtons.OK, MessageBoxIcon.Error)
1
ElseIf DateTime.Compare(dateOut.Date, dateIn.Date) < 0 Then
MessageBox.Show("The Date Out Must be = Or > to The Date In", "Invalid Date OUT",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
Else
End If
End If
Catch ex As Exception
End Try
End Sub
- Edit The Selected Reservation Button
Try
1
Shares
MessageBox.Show("The Date Out Must be = Or > to The Date In", "Invalid Date OUT",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
Else
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Edit Reservation Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
1
SharesEnd Sub
Try
Else
End If
Catch ex As Exception
End Try
End Sub
1
Shares
(https://2.bp.blogspot.com/-Iqi6MMh-
dKI/XK9AZuHHXHI/AAAAAAAAF3I/b6dp684UPswNg0SDBkikqlhWxe2JhhxHACLcBGAs/s1600/vb.net%2Bh
otel%2Bmanagement%2Bsystem%2B-%2Bmanage%2Breservations%2Bform.PNG)
if you want the source code click on the download button below
(https://1bestcsharp.sellfy.store/p/vbnet-hotel-management-system-source-code/)
1
Shares