0% found this document useful (0 votes)
135 views12 pages

NFT

test file data

Uploaded by

tomcy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views12 pages

NFT

test file data

Uploaded by

tomcy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 12

Imports

Imports
Imports
Imports
Imports
Imports
Imports
Imports
Imports

System.IO
System.Data
System.Data.SqlClient
System.Random
System.Math
System.Collections.Generic
System.Web.Script.Serialization
System.Xml
Microsoft.VisualBasic

Partial Class _Hotel_Listing


Inherits System.Web.UI.Page
Dim cbfCls As New Common_Booking_Functions
Public JQueryVar, JQuery_Center_Map As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
''Get Main Values
cbfCls.Get_Common_Inputs()
''//Get Main Values
cbfCls._PageID = "Hotel_Listing"
cbfCls._Booking_Type_ID = "HotelOnly"
Session("EntryLevel") = "" ''Don't Delete This Session
cbfCls._DeviceID_Or_Session = Session.SessionID
If cbfCls._ChildAge(1) = "-1" And CDbl(cbfCls._no_child) >= 1 Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please Enter the Age of Child/
Children " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf cbfCls._ChildAge(2) = "-1" And cbfCls._no_child >= 2 Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please Enter the Age of Child/
Children " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf cbfCls._ChildAge(3) = "-1" And cbfCls._no_child >= 3 Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please Enter the Age of Child/
Children " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf cbfCls._ChildAge(4) = "-1" And cbfCls._no_child >= 4 Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please Enter the Age of Child/
Children " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf cbfCls._ChildAge(5) = "-1" And cbfCls._no_child = 5 Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please Enter the Age of Child/
Children " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf Not IsDate(cbfCls._arr_date) Then

Response.Write("<script language=JavaScript> " & vbCr)


Response.Write("alert(" & Chr(34) & "Please Enter a valid Arrival D
ate " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf DateValue(cbfCls._arr_date) < DateValue(Today()) Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please Enter a valid Arrival D
ate, should be today or future date !! " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
ElseIf cbfCls._no_adult < 1 Then
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "Please select number of adults.
. !! " & Chr(34) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
Else
Dim TransUrl, Token, SOAPRequest, ResponseTxt, errpage, errorText As
String
Token = System.Configuration.ConfigurationManager.AppSettings("HMTok
en")
TransUrl = System.Configuration.ConfigurationManager.AppSettings("Tr
ansUrlString") & "Hotel_Listing.aspx"
cbfCls._AmenityCode = System.Configuration.ConfigurationManager.AppS
ettings("Amenities")
Dim objXMLReq = CreateObject("Msxml2.ServerXMLHTTP.3.0")
objXMLReq.open("POST", TransUrl, False)
objXMLReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8"
)
SOAPRequest = ""
SOAPRequest = SOAPRequest & "<MeridianML Xmlns=""MeridianReservation
Systems"" Token=""" & Token & """>" & vbCr
SOAPRequest = SOAPRequest & " <Form>" & vbCr
SOAPRequest = SOAPRequest & "
<HotelSearch ID=""" & cbfCls._Sea
rchID & """ >" & vbCr 'Id 192.168.50.103_|1220201243154PM
SOAPRequest = SOAPRequest & "
<Dates StartDate=""" & cbfCl
s._arr_date & """ EndDate=""" & cbfCls._dep_date & """/>" & vbCr
SOAPRequest = SOAPRequest & "
<SingleProperty PropertyCode
="""" Name=""" & cbfCls._Prop_Name & """/>" & vbCr 'Sample Value:BWB,Pegs2: BWT
,
SOAPRequest = SOAPRequest & "
<Adults Count=""" & cbfCls._
no_adult & """ />" & vbCr
SOAPRequest = SOAPRequest & "
<Children Count=""" & cbfCls
._no_child & """ >" & vbCr
SOAPRequest = SOAPRequest & "
<Child Age=""" & cbfCls.
_ChildAge(1) & """ />" & vbCr
SOAPRequest = SOAPRequest & "
<Child Age=""" & cbfCls.
_ChildAge(2) & """ />" & vbCr
SOAPRequest = SOAPRequest & "
<Child Age=""" & cbfCls.
_ChildAge(3) & """ />" & vbCr
SOAPRequest = SOAPRequest & "
<Child Age=""" & cbfCls.
_ChildAge(4) & """ />" & vbCr
SOAPRequest = SOAPRequest & "
<Child Age=""" & cbfCls.
_ChildAge(5) & """ />" & vbCr
SOAPRequest = SOAPRequest & "
</Children>" & vbCr

SOAPRequest = SOAPRequest & "


o_rms & """ />" & vbCr
SOAPRequest = SOAPRequest & "

<Rooms Count=""" & cbfCls._n


<Amenities>" & vbCr

SOAPRequest = SOAPRequest & "


</Amenities>" & vbCr
SOAPRequest = SOAPRequest & "
<AccommodationType></Accommo
dationType>" & vbCr
'Accepted values for AccommodationTy
pe : All_A,Hotel,B~B,Condos,Lodges
SOAPRequest = SOAPRequest & "
<Location Name=""" & cbfCls.
_region & """/>" & vbCr
'Accepted values for Name:
SOAPRequest = SOAPRequest & "
<Sort Type=""" & cbfCls._Sor
t_Type & """/>" & vbCr
'Accepted values for Type:"HotelName
s" "CAARating" "Low-High" "High-Low" "Price75-125" "Price125-175" "Price175225" "Price225-275" "Price275"
SOAPRequest = SOAPRequest & "
<Source ID=""" & cbfCls._Dev
iceID_Or_Session & """ IPAddress=""" & cbfCls._Remot_IP & """ UserAgent= """ & c
bfCls._UsrAgent & """ />" & vbCr
'Mobile pass Device id on web Pas
s SeesionID in ID
SOAPRequest = SOAPRequest & "
</HotelSearch>" & vbCr
SOAPRequest = SOAPRequest & " </Form>" & vbCr
SOAPRequest = SOAPRequest & "</MeridianML>" & vbCr
''Response.Write(SOAPRequest)
objXMLReq.send(SOAPRequest)
ResponseTxt = objXMLReq.responseText
''Response.Write(ResponseTxt)
Dim MyXMLDOM As New XmlDocument
MyXMLDOM.LoadXml(ResponseTxt)
errpage = ""
errorText = ""
Dim x As Integer
Dim head As XmlNodeList = MyXMLDOM.GetElementsByTagName("MeridianML"
)
For x = 0 To head.Item(0).ChildNodes.Count - 1
If head.Item(0).ChildNodes(x).Name = "Error" Then
errpage = "True"
errorText = head.Item(0).ChildNodes(x).InnerText
End If
Next
If errpage <> "True" Then
Dim ResultCount, RoomCount, i, j, z, k, m, n, o, u, Lp1, ico, Rs
As Integer
Dim SearchID, SpecialOfferStatus, Thumbnail, LowestRate, Rating,
Property_Name, address, Telephone, TollFree, Description, room_display, Room_Na
me, PropertyCode, PropertyType, PropertyLocation, avl, MicrositeUrl As String
Dim Latitude, Longitude, DailyRate_Date, DailyRate_Day, Rate, Ro
omAvailable, status, Room_Code, Bonus_Code, Bonus_Name, Bonus_Description, Icons
_AD, PropAmenities As String
Dim RoomArray(1000, 5), AveragePrice, Bonus_Amount, room_rate, r
oom_Head, DiscountPercentage, DiscountType, RmAval As Object
GridValues = New List(Of Hotels)()
i = 0
ResultCount = 0
Dim Maplocation(1000, 6)
Maplocation(1, 4) = 43.670906

Maplocation(1, 5) = -79.393331
Dim dsHotel As New DataSet
dsHotel.ReadXml(Server.MapPath("Hotels/include/PropertyDetails.x
ml"))
Dim ResponseTag As XmlNodeList = MyXMLDOM.GetElementsByTagName("
SearchResult")
For j = 0 To ResponseTag.Item(i).ChildNodes.Count - 1
SearchID = ResponseTag.Item(i).Attributes.GetNamedItem("ID")
.Value
SearchIDSort.Value = SearchID
If ResponseTag.Item(i).ChildNodes(j).Name = "Properties" The
n
ResultCount = ResponseTag.Item(i).ChildNodes(j).Attribut
es.GetNamedItem("Count").Value
For z = 0 To ResponseTag.Item(i).ChildNodes(j).ChildNode
s.Count - 1
If ResponseTag.Item(i).ChildNodes(j).ChildNodes(z).N
ame = "Property" Then
SpecialOfferStatus = "No"
Thumbnail = ""
LowestRate = ""
Rating = ""
Property_Name = ""
address = ""
Telephone = ""
TollFree = ""
Description = ""
room_display = ""
Room_Name = ""
Latitude = ""
Longitude = ""
MicrositeUrl = ""
PropertyCode = ResponseTag.Item(i).ChildNodes(j)
.ChildNodes(z).Attributes.GetNamedItem("Code").Value
Telephone = ResponseTag.Item(i).ChildNodes(j).Ch
ildNodes(z).Attributes.GetNamedItem("Phone").Value
TollFree = ResponseTag.Item(i).ChildNodes(j).Chi
ldNodes(z).Attributes.GetNamedItem("TollFree").Value
PropertyType = ResponseTag.Item(i).ChildNodes(j)
.ChildNodes(z).Attributes.GetNamedItem("Type").Value
PropertyLocation = ResponseTag.Item(i).ChildNode
s(j).ChildNodes(z).Attributes.GetNamedItem("Location").Value
MicrositeUrl = "#" 'ResponseTag.Item(i).ChildNod
es(j).ChildNodes(z).Attributes.GetNamedItem("MicrositeUrl").Value
For k = 0 To ResponseTag.Item(i).ChildNodes(j).C
hildNodes(z).ChildNodes.Count - 1
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "Name" Then
Property_Name = ResponseTag.Item(i).Chil
dNodes(j).ChildNodes(z).ChildNodes(k).InnerText.ToString.Trim
End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "Address" Then
address = ResponseTag.Item(i).ChildNodes
(j).ChildNodes(z).ChildNodes(k).InnerText

End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "Description" Then
Description = ResponseTag.Item(i).ChildN
odes(j).ChildNodes(z).ChildNodes(k).InnerText
End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "Map" Then
Latitude = ResponseTag.Item(i).ChildNode
s(j).ChildNodes(z).ChildNodes(k).Attributes.GetNamedItem("Latitude").Value
Longitude = ResponseTag.Item(i).ChildNod
es(j).ChildNodes(z).ChildNodes(k).Attributes.GetNamedItem("Longitude").Value
End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "Thumbnail" Then
Thumbnail = ResponseTag.Item(i).ChildNod
es(j).ChildNodes(z).ChildNodes(k).Attributes.GetNamedItem("Src").Value
End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "DiamondRating" Then
Rating = ResponseTag.Item(i).ChildNodes(
j).ChildNodes(z).ChildNodes(k).Attributes.GetNamedItem("Rating").Value
End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "LowestRate" Then
LowestRate = ResponseTag.Item(i).ChildNo
des(j).ChildNodes(z).ChildNodes(k).InnerText
End If
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "SpecialOffer" Then
SpecialOfferStatus = ResponseTag.Item(i)
.ChildNodes(j).ChildNodes(z).ChildNodes(k).Attributes.GetNamedItem("Status").Val
ue
End If
DailyRate_Date = ""
DailyRate_Day = ""
Rate = ""
RoomAvailable = "No"
If ResponseTag.Item(i).ChildNodes(j).ChildNo
des(z).ChildNodes(k).Name = "Rooms" Then
For m = 0 To ResponseTag.Item(i).ChildNo
des(j).ChildNodes(z).ChildNodes(k).ChildNodes.Count - 1
status = ""
If ResponseTag.Item(i).ChildNodes(j)
.ChildNodes(z).ChildNodes(k).ChildNodes(m).Name = "Room" Then
Room_Code = ResponseTag.Item(i).
ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).Attributes.GetNamedItem(
"Code").Value
status = ResponseTag.Item(i).Chi
ldNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).Attributes.GetNamedItem("St
atus").Value
If status = "Available" Then
RoomAvailable = "Yes"
AveragePrice = ResponseTag.I
tem(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).Attributes.GetNam
edItem("AveragePrice").Value
AveragePrice = FormatCurrenc
y(AveragePrice, 2)
Else

AveragePrice = "Not Availabl


e"
End If
End If
For n = 0 To ResponseTag.Item(i).Chi
ldNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes.Count - 1
Bonus_Code = ""
Bonus_Name = ""
Bonus_Amount = ""
Bonus_Description = ""
If ResponseTag.Item(i).ChildNode
s(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Name = "Name" Then
Room_Name = ResponseTag.Item
(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).InnerT
ext
End If
If ResponseTag.Item(i).ChildNode
s(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Name = "DailyRates"
Then
RoomCount = 0
room_rate = ""
room_Head = ""
Rate = ""
For o = 0 To ResponseTag.Ite
m(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Child
Nodes.Count - 1
If ResponseTag.Item(i).C
hildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).ChildNodes(
o).Name = "DailyRate" Then
DailyRate_Date = Res
ponseTag.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNo
des(n).ChildNodes(o).Attributes.GetNamedItem("Date").Value
DailyRate_Day = Resp
onseTag.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNod
es(n).ChildNodes(o).Attributes.GetNamedItem("Day").Value
DiscountPercentage =
ResponseTag.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).Chi
ldNodes(n).ChildNodes(o).Attributes.GetNamedItem("DiscountPercentage").Value
DiscountType = Respo
nseTag.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNode
s(n).ChildNodes(o).Attributes.GetNamedItem("DiscountType").Value
Rate = ResponseTag.I
tem(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Chi
ldNodes(o).Attributes.GetNamedItem("Rate").Value
status = ResponseTag
.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).C
hildNodes(o).Attributes.GetNamedItem("Status").Value
RoomCount = RoomCoun
t + 1
RoomArray(RoomCount,
0) = DailyRate_Date
RoomArray(RoomCount,
1) = DailyRate_Day
RoomArray(RoomCount,
2) = DiscountPercentage
RoomArray(RoomCount,

3) = DiscountType
RoomArray(RoomCount,
4) = Rate
RoomArray(RoomCount,
5) = status
End If
Next 'o
End If
If ResponseTag.Item(i).ChildNode
s(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Name = "Bonus" Then
If Not ResponseTag.Item(i).C
hildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Attributes.
GetNamedItem("Code") Is Nothing Then
Bonus_Code = ResponseTag
.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).A
ttributes.GetNamedItem("Code").Value
End If
If Not ResponseTag.Item(i).C
hildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Attributes.
GetNamedItem("Name") Is Nothing Then
Bonus_Name = ResponseTag
.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).A
ttributes.GetNamedItem("Name").Value
End If
If Not ResponseTag.Item(i).C
hildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Attributes.
GetNamedItem("BonusAmount") Is Nothing Then
Bonus_Amount = ResponseT
ag.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n)
.Attributes.GetNamedItem("BonusAmount").Value
End If
For u = 0 To ResponseTag.Ite
m(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).Child
Nodes.Count - 1
If ResponseTag.Item(i).C
hildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).ChildNodes(n).ChildNodes(
u).Name = "Description" Then
Bonus_Description =
ResponseTag.Item(i).ChildNodes(j).ChildNodes(z).ChildNodes(k).ChildNodes(m).Chil
dNodes(n).ChildNodes(u).InnerText
End If
Next 'u
End If
Next
avl = "Available"
For Lp1 = 1 To RoomCount
If RoomArray(Lp1, 5) = "Availabl
e" Then
Else
avl = "NotAvailable"
End If
Next
If avl = "NotAvailable" Then
Else

End If
Next
End If
Next
Icons_AD = ""
If Rating > 0 Then
For ico = 1 To Rating
Icons_AD = Icons_AD & "<img src=images/d
iamond.png border=0> "
Next
Icons_AD = Icons_AD & "<img src=images/caa_l
ogo.png border=0>"
Else
Icons_AD = ""
End If
If Latitude <> "" Then
Rs = Rs + 1
Maplocation(Rs, 1) = Property_Name
Maplocation(Rs, 2) = Replace(Left(Descriptio
n, 60), ",", ", ")
Maplocation(Rs, 3) = Icons_AD
Maplocation(Rs, 4) = Latitude
Maplocation(Rs, 5) = Longitude
''Map Code
Dim PinImg, PropertyBox As String
PinImg = ""
If RmAval = "Avl" Then
PinImg = "images/pin1.Png"
ElseIf RmAval = "NotAvl" Then
PinImg = "images/pin2.Png"
ElseIf RmAval = "ParAvl" Then
PinImg = "images/pin3.Png"
End If
JQuery_Center_Map = "map.setCenter(new googl
e.maps.LatLng(" & Latitude & ", " & Longitude & "));"
JQueryVar = JQueryVar & "$('#map_canvas').gm
ap('addMarker', { 'position': '" & Latitude & "," & Longitude & "', 'bounds': tr
ue,'icon': '" & PinImg & "' }).click(function(){"
''//Map Code
PropertyBox = "<table width=360 border=0>"
PropertyBox = PropertyBox & "<tr><td valign=
top colspan=2 ><font class=Map_Property_Name>" & Property_Name & "</font></td></
tr>"
PropertyBox = PropertyBox & "<tr><td valign=
top colspan=2 ><font class=Map_Property_Address>" & address & "</font></td></tr>
"
PropertyBox = PropertyBox & "<tr><td align=l
eft colspan=2 >" & Icons_AD & "</td></tr>"
PropertyBox = PropertyBox & "<tr><td align=l
eft colspan=2 <font class=Map_PropertyLocation>" & PropertyLocation & "</font></
td></tr>"
PropertyBox = PropertyBox & "<tr><td valign=

top align=left width=50 style=padding-top:5px;>"


PropertyBox = PropertyBox & "<img src=" & Th
umbnail & " width=130 height=120>"
PropertyBox = PropertyBox & "</td>"
PropertyBox = PropertyBox & "<td valign=top
align=right >"
PropertyBox = PropertyBox & "<table class=M
ap_Header_Row border=0 cellpadding=3>"
PropertyBox = PropertyBox & "<tr><td align=r
ight style=padding-top:0px; >
<table border=0><tr><td nowrap class=Map_Avg_Ra
te_Header align=center>BEST AVAILABLE RATE</td></tr> <tr><td nowrap class=Map_A
vg_Rate align=center>" & FormatCurrency(LowestRate, 2) & "</td></tr> "
'If RmAval = "Avl" Then
'
PropertyBox = PropertyBox & "<tr><td><a
border=0 class=Map_ViewButton href=javascript:funBookThisHotel_" & Rs & "()
style=CURSOR:pointer;> VIEW ROOM TYPES</a></td></tr>"
'Else
'
PropertyBox = PropertyBox & "<tr><td al
ign=right style=padding-top:5px class=Room_Sold_Out>SOLD OUT</td></tr>"
'End If
PropertyBox = PropertyBox & "</table></td></
tr>"
PropertyBox
PropertyBox
PropertyBox
PropertyBox

=
=
=
=

PropertyBox
PropertyBox
PropertyBox
PropertyBox

&
&
&
&

"</table>"
"</td>"
"</tr></table>"
"</table>"

''Map Code
JQueryVar = JQueryVar & "$('#map_canvas').gm
ap('openInfoWindow', { 'content': '" & PropertyBox & "','maxWidth': '360' }, thi
s);});"
''//Map Code
Response.Write("<script language=javascript>
")
Response.Write("function funBookThisHotel_"
& Rs & "(){")
Response.Write(" PrpAllRooms('" & PropertyCo
de & "','')")
Response.Write("}")
Response.Write("</script>")
End If
Dim h As New Hotels()
h.HotelID = PropertyCode
h.HotelsAdress = address
h.HotelsName = Replace(Property_Name, "and Confe
rence Centre", "").Replace("Niagara Falls Fallsview", "").Replace("Overlooking t
he Falls", "")

Dim dvHotel As DataView = dsHotel.Tables(0).Defa


ultView
dvHotel.RowFilter = "Id='" & PropertyCode & "'"

' If dvHotel.Count > 0 Then


' h.HotelsDescription = dvHotel(0)("Description"
).ToString().Replace("||", "<li class=listStyle /><font class=ListStyle_Text>")
' Else
Dim Description_temp As String
'Description_temp = Left(Description.Trim(), 250
)
'If Right(Description_temp.Trim(), 1) = "." Then
'Description_temp = Left(Description_temp.Trim()
, 249)
' End If
Description_temp = Left(Description.Trim(), 250)
Description_temp = "<li class=listStyle><font cl
ass=ListStyle_Text>" & Description_temp.ToString().Replace(".", "</font></li><li
class=listStyle><font class=ListStyle_Text>")
Description_temp = Description_temp & "</font></
li>"
Description_temp = Description_temp.Replace("<li
class=listStyle><font class=ListStyle_Text></font></li>", "")
Description_temp = Description_temp.Replace("<li
class=listStyle><font class=ListStyle_Text> </font></li>", "")
' Description_temp = Description_temp.Replace(".
.", ".").Replace("<br/>", "").Replace("<br>", "")
'Description_temp = "." & Description_temp
'Description_temp = Description_temp.ToString().
Replace(".", "<li class=listStyle /><font class=ListStyle_Text>")
h.HotelsDescription = Description_temp.ToString(
)
' End If
h.HotelsImages = "Hotels/Prop_Thumps/" & Propert
yCode & "_Logo.jpg" 'Thumbnail
h.HotelsRates = FormatCurrency(LowestRate, 2)
h.HotelsDetailsUrl = MicrositeUrl
h.Latitude = Latitude
h.Longitude = Longitude
h.CAARating = Icons_AD
h.RoomAvailable = RoomAvailable
h.MapName = "Hotels/Map_Thumps/" & PropertyCode
& "_Thumb.png"
Dim dsAmenity As New DataSet
Dim AmenityDisplay As String
cbfCls._Property_id = PropertyCode
dsAmenity = cbfCls.Get_Amenities()
If dsAmenity.Tables(0).Rows.Count > 0 Then
AmenityDisplay = "<table border=0 border=0 c
ellpadding=0 width=100% class=AmenityBoxBG ><tr>"
For t As Integer = 0 To dsAmenity.Tables(0).
Rows.Count - 1
If t >= 8 Then
Exit For
End If
If t Mod 4 = 0 Then
AmenityDisplay = AmenityDisplay & "<
/tr><tr>"

End If
AmenityDisplay = AmenityDisplay & "<td s
tyle=""padding-left:3px;width:32px;"" align=left><img src=Hotels/Icons/" & dsAme
nity.Tables(0).Rows(t)("Amenity_Image").ToString() & " width=32 height=31 borde
r=0></td><td align=left>" & dsAmenity.Tables(0).Rows(t)("Amenity_Name").ToString
().Replace("Wheelchair Accessible", "Wheelchair").Replace("Spa & Wellness Facili
ties", "Spa") & "</td>"
Next
AmenityDisplay = AmenityDisplay & "</tr></ta
ble>"
h.PropAmenities = AmenityDisplay
End If
cbfCls._Property_id = ""
GridValues.Add(h)
End If
Next
End If
Next
Else
Response.Write("<script language=JavaScript> " & vbCr)
Response.Write("alert(" & Chr(34) & "" & errorText & "" & Chr(34
) & ")" & vbCr)
Response.Write("window.history.back()" & vbCr)
Response.Write("</script>" & vbCr)
End If
End If
''Set Main Hidden Fields
DivMainHiddenFields.InnerHtml = cbfCls.Get_Common_Form()
''//Set Main Hidden Fields
rptName.DataSource = _Hotel_Listing.GridValues
rptName.DataBind()
End Sub
Private Shared privateemp As List(Of Hotels)
Public Shared Property GridValues() As List(Of Hotels)
Get
Return privateemp
End Get
Set(ByVal value As List(Of Hotels))
privateemp = value
End Set
End Property
Protected Sub rptName_ItemDataBound(ByVal sender As Object, ByVal e As Syste
m.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptName.ItemDataBound
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItem
Type.AlternatingItem Then
Dim activeLabel As Label = DirectCast(e.Item.FindControl("lblRoomTyp
e"), Label)
Dim s As String = activeLabel.Text

Dim col = e.Item.FindControl("ctrRoomType")


Dim ctrSold = e.Item.FindControl("ctrSoldOut")
If s = "No" Then
col.Visible = False
ctrSold.Visible = True
Else
col.Visible = True
ctrSold.Visible = False
End If
End If
End Sub
End Class

You might also like