Overview
Template by Thomas Antony | December 14, 2015

Online hotel booking system provides ample tolls that help hoteliers increase their online exposure and drive up revenue. One of the biggest advantages of our booking engine is the filtering of hotels with multiple criteria’s. The purpose of this template is designed to be a reference for any person wishing to implement or any person interested in the architecture of the controls for the ClaySys AppForms or how to configure the AppForms to create a hotel booking template. On the Dashboard following functionalities are being added:-   

  • Select Location of Hotel Country, automatic generate on the basis of Location
  • Select Check in and Checkout date
  • Select Rooms for Adults and Children
  • On clicking ‘Search’ button, search result form will be displayed

Prerequisite(s)
  • SharePoint 2013
Search Result Form
Data Structure
SharePoint list is used as a DataSource for Sales Viewer. SharePoint lists consist of rows and columns that store data in a similar fashion to a traditional relational database management system such as SQL Server. However, a benefit of lists is that SharePoint includes Web Parts that provide simple methods for managing the data. If the data was stored in a database, it would require custom user interface components to access it and manipulate it. Also, specialized skills are required to design, implement, and maintain a custom database. Another advantage of using lists is that custom workflow and event handlers can easily be registered to them. By default ID, Title, Modified, Created, Modified By, Created By, Attachments columns are available in SharePoint list. Apart from these default list columns , user can add more columns depends on requirement.
SharePoint List
List Name Column Name Data Type
HotelDetail

‘HotelDetail’ list is used to display the details of
hotels that user wants.

CityDetail Single line of text
Country Single line of text
HotelName Single line of text
Rating Single line of text
HotelLocation Single line of text
HotelType Single line of text
Rate Number
Remarks Multiple lines of text
IsActive Yes/No
City Single line of text
CityDetail1 Single line of text
SharePoint List
List Name Column Name Data Type
HotelLocation

‘HotelLocation’ list is used to display the location of
hotel that user wants.

City Single line of text
Country Single line of text
NoofHotels Number
Design And Configuration
On the Dashboard following functionalities are being added:-
  • Select Location of Hotel Country, automatic generate on the basis of Location
  • Select Check in and Checkout date
  • Select Rooms for Adults and Children
  • On clicking ‘Search’ button, search result form will be displayed.
  • In Search result form, following functionalities are being added :- Can search hotels with :-
  • Different rate
  • Different City and Country
List Of Forms Used
Name Functionality
HotelDashboard Form Design
Rule Design
‘HotelDashboard’ form is used for searching hotels for
booking.
SearchResult
Rule Design
‘SearchResult’ form is used to find out hotels with
different rates, city located and country.
HotelDetail
Rule Design
‘HotelDetail’ Form is used to display details of hotel that
user search using HotelDashboard form.
HotelDashboard
HotelDashboard Form Design
01
Create Form

Folders are used to store and organize forms that have a
logical association or relationship. To create a new form,
click ‘New Folder’ button on the toolbar of the designer.
On clicking the New Folder option, it will create a new
folder and the name will be in the edit mode. You can type
in the new name for the folder.

02
Rename Form

Then click on the ‘New Form’ link on the toolbar. Give an
appropriate name for the form. Click ‘Save’ to save the
form.

03
Form UI

You can drag and drop controls format the styles easily.

04
Publish Form

‘Check-In Form’ to save the changes and publish to get the
completed form for the end user to use. A form must be
checked-out to make modifications while all aspects of the
form can be examined while checked-in.

05
DataSource Tab In Quick View

Following steps will explain about the Data Source
configuration of Combo Box. Click on the Combo Box control
and click the DataSource tab to edit the DataSource.

06
List Selection

A pop-up window appears to select the item source. Select
the Item Source as ‘SharePoint’. From the DataSource
Wizard, select respective list name and click on ‘Next’
button.

07
Criteria Builder

Clicking on the Next button opens the below screen. Fill
any criteria for the combo box.

08
Selecting Value and Display member

Clicking on the Next button opens the below screen, we can
select value member and display member for the data source.

09
Sorting Data

Clicking on the Next button opens the below screen, we can
add trigger and comb box sorting order. Click on ‘Finish’
button.

10
Form Preview

Following data shows the combo box in preview.

11
Following steps will explain how we can configure external DataSource for selecting hotel details according to the location given by user via combobox. Now, let us see how we can configure the select command. First step, we need to create a DataSource with suitable name and type. On next window, we have to add a Select command with suitable criteria.Then Click finish after giving proper trigger to the DataSource command.
Adding Select Command
Control Mapping and Criteria
Rule Trigger
HotelDashboard Rule Design
01
Rule Name : On_FormLoad | Trigger(s) : FormLoad
Rule – On_FormLoad

Value populated in ‘cmbcity’ and ‘cmbcountry’. Remove
default value of ‘cmbRooms’, ‘cmbAdults’ and ‘cmbchild’.
Add one day to ‘dtpChkIn’ date control.

02
Rule Name : On_CmbCity | Trigger(s) : CmbCity
Rule – On_CmbCity

Finding Country name and Number of locations.

03
Rule Name : ToDateSetting | Trigger(s) : dtpChkIn
Rule – ToDateSetting

Adding two days to dtpchkIn and set this value
to dtpChkOut.

04
Rule Name : BtnSearch | Trigger(s) : BtnSearch
Rule – BtnSearch

If validation success, open resultant form.

SearchResult
SearchResult Rule Design
01
Rule Name : FormLoad | Trigger(s) : FormLoad
Rule – FormLoad

Loads ‘Hotel Details’ form by using an external form
control. Combo boxes are filling by using Filldata
function.

02
Rule Name : On_hdnCity | Trigger(s) : hdnCity
Rule – On_hdnCity

Loads repeating forms based on search criteria.

03
Rule Name : SelectRepeat | Trigger(s) : hdnRepeatLoop
Rule – SelectRepeat

Trigger set to ‘HotelDetail’ form on the basis of Hotel_ID.

04
Rule Name : SearchRule | Trigger(s) : btnApply
Rule – SearchRule

Hotel searching based on City and Country.

05
Rule Name : RemoveRule | Trigger(s) :
Rule – RemoveRule

It will remove old repeated forms on the basis of new
search criteria.

06
Rule Name : RemoveRuleLoop | Trigger(s) :
Rule – RemoveRuleLoop

Part of ‘RemoveRule’.

07
Rule Name : On_cmbCity | Trigger(s) : CmbCity
Rule – On_cmbCity

Country value select on the basis of City combo box.

08
Rule Name : SetValueToCountry | Trigger(s) : hdnSCountry
Rule – SetValueToCountry

Part of ‘On_cmbCity’ Rule.

09
Rule Name : HomePageNavigation | Trigger(s) : btnHome
Rule – HomePageNavigation

Navigate to Home page.

HotelDetail
HotelDetail Rule Design
01
Rule Name : On_hdnID | Trigger(s) : hdnID
Rule – On_hdnID

Data populated on the basis of hdnid.

02
Rule Name : SetHotelNameTOHyperLink | Trigger(s) : hdnHotelName
Rule – SetHotelNameTOHyperLink

Setting hotel name to Hyperlink control.

03
Rule Name : ClearRule | Trigger(s) : hdnClear
Rule – ClearRule

Clearing values on the basis of search result.

Template Summary
Hotel booking are a popular method for booking hotel rooms. One of the biggest advantages of our booking engine is the filtering of hotels with multiple criteria’s. The purpose of this template is designed to be a reference for any person wishing to implement or any person interested in the architecture of the controls for the ClaySys AppForms.