Front Offfice Management for Hotels1

Embed Size (px)

Citation preview

  • 7/30/2019 Front Offfice Management for Hotels1

    1/35

    FRONT OFFFICE MANAGEMENT FOR HOTELS

  • 7/30/2019 Front Offfice Management for Hotels1

    2/35

    Table of Contents:

    1) Introduction:

    1.1) Statement

    1.2) Objective

    1.3) Description

    1.4) Scope

    1.5) Technologies used

    2) System Design & Description:

    2.1) System Design

    A) Input Design

    B) Output Design

    C) Schema Diagram

    2.2) System Description

    A) Database

    B) Queries

    2.3) Basic Operations

    3) System Implementation

    4) Program Coding

    5) Output

    6) Conclusion

    7) References

  • 7/30/2019 Front Offfice Management for Hotels1

    3/35

    1.1) Statement:

    To design and implement front office management application for large hotels.

    1.2) Objective: To design a database that holds all details necessary to manage the luxury hotel from thefront office-checking in and checking out from the reception.

    To design a convenient front end that helps to update the database To establish connection between the front end and the back end and implement the

    application.

    1.3) Description of the problem:

    Front office management in hotels includes facilitating the easy checking and checking out of thecustomers.

    Checking in process involves the selection of the room type from the various types the hotel offers

    and checking for the availability of a room of the same. Once a room is available it is necessary to getvarious details from the guest and add the data to the database, along with changing the status of theallocated room.

    Checking out process involves calculating the total amount that is to be paid by the guest andthen changing the room status accordingly, so it is available further.

    The system must be user-friendly and feasible. It should provide facilities for making enquiriesand booking, payment etc.

    1.4) Scope of the problem:

    This project covers the room booking aspects of front office management. It handles the checking

    in and checking out of guests.

    1.5) Technologies used:

    Developing:

    The application has been designed with VB as front end and SQL as back end.

    Front end : Visual Basic

    Back end : SQL

    Execution:

    The application is Windows based and does not support open source. It requires the system tohave Visual Studio running environment to support its execution. Also to connect the database, anyversion of SQL Server (above 2008) is required.

  • 7/30/2019 Front Offfice Management for Hotels1

    4/35

    SYSTEM DESIGN AND DESCRIPTION

  • 7/30/2019 Front Offfice Management for Hotels1

    5/35

  • 7/30/2019 Front Offfice Management for Hotels1

    6/35

    Various types of outputs are

    External outputs

    Internal outputs Operational outputs

    Interactive outputs Turn around outputs

    All screens are informative and interactive in such a way that the user can fulfil his requirements

    through asking queries.

    Schema Diagram:

  • 7/30/2019 Front Offfice Management for Hotels1

    7/35

  • 7/30/2019 Front Offfice Management for Hotels1

    8/35

    2.3) BASIC OPERATIONS:

    Check availability:

    This module is used to check if a room of that matches the user requirements is free or no.

    ALGORITHM:

    //input: Room type

    //output: List of vacant rooms of the specified type

    For Every room in the hotel,

    1. Check if the room type is same as that required by the user.2. If yes, then check if the room status is vacant, Else check next room. 3. If room is vacant, then display the room number.

    Check in:

    This module is used to get details from the guest and insert the guest details in the database.

    ALGORITHM:

    //input: Guest details like name, address.

    //output: Guest details entered in the database and appropriate message displayed to the user

    1) Get the following details from the guest,

    First name Last Name Address City Zip No. Of Guests Phone Number From Date To Date

    2) Check if from date is less than or equal to To date. If not, display error message.

    3) If data has been successfully entered in database display, check in complete message.

    Room details:

    This module is used to display the details of the various room in the hotel.

  • 7/30/2019 Front Offfice Management for Hotels1

    9/35

    ALGORITHM

    //input: room number

    //output: room details

    For every room in the hotel,

    1. Check if room number matches the specified room number2. If yes, then retrieve the details of the room from the database and display the details.

    Check out:

    This module is used to carry out the check out process.

    ALGORITHM:

    //input: Room number

    //output: invoice for the user

    1) Obtain the guest id of the occupant of the room.2) From the guest id obtained, calculate the total payment for the guest, using details from room

    details table.3) Display the total cost and other details in the invoice.

  • 7/30/2019 Front Offfice Management for Hotels1

    10/35

    SYSTEM IMPLEMENTATION

  • 7/30/2019 Front Offfice Management for Hotels1

    11/35

    HOTEL MANAGEMENT SYSTEM IMPLEMENTATION

    Yes no yes no

    HOTEL MANAGEMENT SYSTEM

    CHECK

    AVAILABILTIY

    CHECK IN CHECK OUT ROOM

    DETAILS

    Get roomtype

    Check for otherrooms

    Displayroomnumber

    Check if room of specified typeavailable

    Get guest

    details

    Check if datesare valid

    Enter guestdetails in DB

    and updateroom statusto occupied

    Prompt userto enter valid

    date

    Display successmessage

    Get roomnumber

    Get guest idof occupant

    Get roomdetails

    Calculatepayment andgenerateinvoice

    Getroomdetails &Updatedatabase

    Get roomnumber.

    Deleterecordfromdatabase

    Display

    Getroomnumber

    Displaydetails

  • 7/30/2019 Front Offfice Management for Hotels1

    12/35

  • 7/30/2019 Front Offfice Management for Hotels1

    13/35

    }

    private void btn_CheckIn_Click( object sender, EventArgs e){

    Form3 form = new Form3();form.Activate();form.Show();

    }

    private void btn_CheckOut_Click( object sender, EventArgs e){

    Form5 form = new Form5();form.Activate();form.Show();

    }

    private void btn_RoomDetails_Click( object sender, EventArgs e){

    Form4 form = new Form4();form.Activate();form.Show();

    }

    private void pictureBox4_MouseClick( object sender, MouseEventArgs e){

    MessageBox .Show( "Park Suite - $700per night " );}

    private void pictureBox3_MouseClick( object sender, MouseEventArgs e){

    MessageBox .Show( "Ocean view - $500per night " );}

    private void pictureBox2_MouseClick( object sender, MouseEventArgs e)

    { MessageBox .Show( "Deluxe King's Suite - $240per night " );}

    private void pictureBox1_MouseClick( object sender, MouseEventArgs e){

    MessageBox .Show( "Single Suite - $120per night " );}

    }}

    Form 2

    using System;using System.Collections.Generic;using System.ComponentModel;

  • 7/30/2019 Front Offfice Management for Hotels1

    14/35

    using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;

    namespace HotelManagementApp{

    public partial class Form2 : Form {

    public Form2(){

    InitializeComponent();comboBox1.Items.Add( "1" );comboBox1.Items.Add( "2" );comboBox1.Items.Add( "3" );comboBox1.Items.Add( "4" );

    }

    private void btnCheck_Click( object sender, EventArgs e){

    /* if(comboBox1.SelectedIndex==1)

    if (txt_RoomType.Text.Equals("")) MessageBox.Show("Please Enter room number");

    else*/ //{

    string ConStr = Properties. Resources .ConnectionString;SqlConnection sqlCon = new SqlConnection (ConStr);SqlCommand sqlCmd = new SqlCommand();sqlCmd.CommandType = CommandType.Text ;sqlCmd.Connection = sqlCon;

    sqlCmd.CommandText = "Select Roomno as \'Room Number\' from Room whereRoomType=\'" + comboBox1.SelectedItem + "\'and Status=\'Vacant\'" ;SqlDataAdapter dataAdd = new SqlDataAdapter (sqlCmd);DataTable dTable;try {

    dTable = new DataTable ();sqlCon.Open();dataAdd.Fill(dTable);if (dTable.Rows.Count == 0)

    MessageBox .Show( "No Rooms were avilable" );else {

    dataGridView1.DataSource = dTable;dataGridView1.Visible = true ;

    }

    }catch ( Exception ex){

    MessageBox .Show( "Following Error Occured during processing\n" +ex.Message);

    }finally

  • 7/30/2019 Front Offfice Management for Hotels1

    15/35

    {sqlCon.Close();

    }//}

    }

    private void Form2_Load( object sender, EventArgs e){

    dataGridView1.Visible = false ;

    }

    private void dataGridView1_CellContentClick( object sender, DataGridViewCellEventArgs e)

    {int

    rommNo=int .Parse(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());Form3 frm3 = new Form3(rommNo);Form frm = Form2.ActiveForm;frm.Hide();frm3.Activate();frm3.Show();frm.Close();

    }

    private void comboBox1_SelectedIndexChanged( object sender, EventArgs e){

    }

    }}

    Form 3

    using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;

    using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;

    namespace HotelManagementApp{

    public partial class Form3 : Form

  • 7/30/2019 Front Offfice Management for Hotels1

    16/35

  • 7/30/2019 Front Offfice Management for Hotels1

    17/35

  • 7/30/2019 Front Offfice Management for Hotels1

    18/35

    else if (!txt_FnameS.Text.Equals( "" ) && txt_LnameS.Text.Equals( "" ) &&!txt_PhoneS.Text.Equals( "" ))

    sqlCmd.CommandText = "Select * from guest where Phone=\'" + txt_PhoneS.Text +"\' and Fname=\'" + txt_FnameS.Text + "\'" ;

    else if (txt_FnameS.Text.Equals( "" ) && !txt_LnameS.Text.Equals( "" ) &&!txt_PhoneS.Text.Equals( "" ))

    sqlCmd.CommandText = "Select * from guest where Phone=\'" + txt_PhoneS.Text +"\' and Lname=\'" + txt_LnameS.Text+ "\'" ;

    else if (!txt_FnameS.Text.Equals( "" ) && !txt_LnameS.Text.Equals( "" ) &&!txt_PhoneS.Text.Equals( "" ))

    sqlCmd.CommandText = "Select * from guest where Phone=\'" + txt_PhoneS.Text +"\' and Lname=\'" + txt_LnameS.Text + "\' and Fname=\'" + txt_FnameS.Text + "\'" ;

    SqlDataAdapter dataAdd = new SqlDataAdapter (sqlCmd);DataTable dTable;try {

    dTable = new DataTable ();sqlCon.Open();dataAdd.Fill(dTable);if (dTable.Rows.Count == 0){

    MessageBox .Show( "No Results Found" );newUser = true ;dataGridView1.Enabled = false ;

    }else {

    dataGridView1.DataSource = dTable;dataGridView1.Visible = true ;dataGridView1.Enabled = true ;

    }

    }catch ( Exception ex)

    { MessageBox .Show( "Following Error Occured during processing\n" + ex.Message);}finally {

    sqlCon.Close();}

    }

    private void Form3_Load( object sender, EventArgs e){

    panel2.Visible = false ;}

    private void dataGridView1_CellContentClick( object sender, DataGridViewCellEventArgs e)

    {Form3.ActiveForm.Text = "HMS Check In" ;guid= int .Parse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());txt_Fname.Text= dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();txt_Lname.Text = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();txt_Add.Text = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();txt_City.Text = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();txt_Zip.Text = dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString();

  • 7/30/2019 Front Offfice Management for Hotels1

    19/35

  • 7/30/2019 Front Offfice Management for Hotels1

    20/35

  • 7/30/2019 Front Offfice Management for Hotels1

    21/35

    InitializeComponent();}

    private void btn_checkout_Click( object sender, EventArgs e){

    string ConStr = Properties. Resources .ConnectionString;SqlConnection sqlCon = new SqlConnection (ConStr);SqlCommand sqlCmd = new SqlCommand();sqlCmd.CommandType = CommandType.Text;sqlCmd.Connection = sqlCon;SqlDataAdapter DA = new SqlDataAdapter (sqlCmd);DataTable Dt = new DataTable ();

    try {

    sqlCon.Open();sqlCmd.CommandText = "select

    Fname,Lname,Address,City,ZipCode,No_Days,No_Guests,Room.Roomno,Phone,Cos_night fromRoom,guest where guest.Roomno=Room.Roomno AND guest.Roomno=" + txtRoomNo.Text;

    DA.Fill(Dt);if (Dt.Rows.Count

  • 7/30/2019 Front Offfice Management for Hotels1

    22/35

    }finally {

    sqlCon.Close();}

    }

    private void Form5_Load( object sender, EventArgs e){

    panel2.Visible = false ;}

    }}

    Form 6

    using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;

    namespace HotelManagementApp

    { public partial class Form6 : Form {

    public Form6(){

    InitializeComponent();comboBox1.Items.Add( "1" );comboBox1.Items.Add( "2" );comboBox1.Items.Add( "3" );comboBox1.Items.Add( "4" );

    }

    private void button1_Click( object sender, EventArgs e){

    if ((textBox1.Text.Equals( "101" )) || (textBox1.Text.Equals( "102" )) ||(textBox1.Text.Equals( "103" )) || (textBox1.Text.Equals( "104" ))|| (textBox1.Text.Equals( "105" )) || (textBox1.Text.Equals( "106" )) ||

    (textBox1.Text.Equals( "107" )) || (textBox1.Text.Equals( "108" ))|| (textBox1.Text.Equals( "109" )) || (textBox1.Text.Equals( "110" )) ||

    (textBox1.Text.Equals( "111" ))|| (textBox1.Text.Equals( "112" )) || (textBox1.Text.Equals( "113" )) ||

    (textBox1.Text.Equals( "114" ))|| (textBox1.Text.Equals( "115" )))

    {

  • 7/30/2019 Front Offfice Management for Hotels1

    23/35

    MessageBox .Show( "Room number exists already" );}

    else {

    string x = "Vacant" ;string ConStr = Properties. Resources .ConnectionString;SqlConnection sqlCon = new SqlConnection (ConStr);SqlCommand sqlCmd = new SqlCommand();sqlCmd.CommandType = CommandType.Text;sqlCmd.Connection = sqlCon;sqlCon.Open();

    sqlCmd.CommandText = "INSERT INTO Room values(" + textBox1.Text + "," +comboBox1.SelectedItem + "," + 0 + "," + 0 + ")" ;

    sqlCmd.ExecuteNonQuery();if (comboBox1.SelectedItem.Equals( "1" )){

    sqlCmd.CommandText = "Update Room set Cos_night=\'120\' where Roomno=\'" + textBox1.Text + "\'" ;

    sqlCmd.ExecuteNonQuery();sqlCmd.CommandText = "Update Room set Status =\'Vacant\' where Roomno=\'"

    + textBox1.Text + "\'" ;sqlCmd.ExecuteNonQuery();

    }

    else {

    if (comboBox1.SelectedItem.Equals( "2" )){

    sqlCmd.CommandText = "Update Room set Cos_night=\'240\' whereRoomno=\'" + textBox1.Text + "\'" ;

    sqlCmd.ExecuteNonQuery();

    sqlCmd.CommandText = "Update Room set Status =\'Vacant\' whereRoomno=\'" + textBox1.Text + "\'" ;sqlCmd.ExecuteNonQuery();

    }

    else {

    if (comboBox1.SelectedItem.Equals( "3" )){

    sqlCmd.CommandText = "Update Room set Cos_night=\'120\' whereRoomno=\'" + textBox1.Text + "\'" ;

    sqlCmd.ExecuteNonQuery();sqlCmd.CommandText = "Update Room set Status =\'Vacant\' where

    Roomno=\'" + textBox1.Text + "\'" ;sqlCmd.ExecuteNonQuery();

    }else {

    if (comboBox1.SelectedItem.Equals( "4" )){

    sqlCmd.CommandText = "Update Room set Cos_night=\'120\' whereRoomno=\'" + textBox1.Text + "\'" ;

  • 7/30/2019 Front Offfice Management for Hotels1

    24/35

    sqlCmd.ExecuteNonQuery();sqlCmd.CommandText = "Update Room set Status =\'Vacant\'

    where Roomno=\'" + textBox1.Text + "\'" ;sqlCmd.ExecuteNonQuery();

    }}

    }}MessageBox .Show( "New room added" );sqlCon.Close();Form6.ActiveForm.Close();

    }}

    }}

    Form 7

    using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;

    namespace HotelManagementApp

    { public partial class Form7 : Form {

    public Form7(){

    InitializeComponent();}

    private void button1_Click( object sender, EventArgs e){

    string ConStr = Properties. Resources .ConnectionString;SqlConnection sqlCon = new SqlConnection (ConStr);SqlCommand sqlCmd = new SqlCommand();

    sqlCmd.CommandType = CommandType.Text;sqlCmd.Connection = sqlCon;SqlDataAdapter DA = new SqlDataAdapter (sqlCmd);DataTable Dt = new DataTable ();sqlCon.Open();sqlCmd.CommandText = "DELETE from Room where Roomno=\'" + comboBox1.SelectedItem

    + "\'" ;sqlCmd.ExecuteNonQuery();MessageBox .Show( "Room deleted" );sqlCon.Close();

  • 7/30/2019 Front Offfice Management for Hotels1

    25/35

    Form7.ActiveForm.Close();

    }

    private void Form7_Load( object sender, EventArgs e){

    comboBox1.Items.Clear();string ConStr = Properties. Resources .ConnectionString;SqlConnection sqlCon = new SqlConnection (ConStr);SqlCommand sqlCmd = new SqlCommand( "SELECT Roomno FROM Room where

    status=\'Vacant\' ORDER BY Roomno ASC" );sqlCmd.CommandType = CommandType.Text;sqlCmd.Connection = sqlCon;

    SqlDataAdapter dataAdd = new SqlDataAdapter (sqlCmd);DataTable dTable;try {

    dTable = new DataTable ();sqlCon.Open();dataAdd.Fill(dTable);foreach ( DataRow dr in dTable.Rows){

    comboBox1.Items.Add(dr[ "Roomno" ]);}

    }catch ( Exception ex){

    MessageBox .Show( "Following Error Occured during processing\n" + ex.Message);

    }finally {

    sqlCon.Close();}

    }

    }}

  • 7/30/2019 Front Offfice Management for Hotels1

    26/35

  • 7/30/2019 Front Offfice Management for Hotels1

    27/35

    OUTPUT

  • 7/30/2019 Front Offfice Management for Hotels1

    28/35

    1.Homepage

  • 7/30/2019 Front Offfice Management for Hotels1

    29/35

    2.Room overview

  • 7/30/2019 Front Offfice Management for Hotels1

    30/35

  • 7/30/2019 Front Offfice Management for Hotels1

    31/35

    4.Check in

  • 7/30/2019 Front Offfice Management for Hotels1

    32/35

  • 7/30/2019 Front Offfice Management for Hotels1

    33/35

    4.Check out

  • 7/30/2019 Front Offfice Management for Hotels1

    34/35

  • 7/30/2019 Front Offfice Management for Hotels1

    35/35