NFT
NFT
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
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
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=
=
=
=
=
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", "")
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