Line 1: #pragma checksum "D:\Vinet\Web\Fe\WS\airports.asmx" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4AB6EE4C4B1249B0E9868291537C6A77601269A4B29C926AE9EDFCE7AA70062B"
Line 2:
Line 3: #line 1 "D:\Vinet\Web\Fe\WS\airports.asmx"
Line 4:
Line 5:
Line 6: using System;
Line 7: using System.Web;
Line 8: using System.Web.Services;
Line 9: using System.Web.Services.Protocols;
Line 10: using System.Web.Script.Services;
Line 11:
Line 12: using System.Xml;
Line 13: using System.Data;
Line 14: using System.Data.SqlClient;
Line 15:
Line 16: using System.Collections;
Line 17: using System.Collections.Generic;
Line 18:
Line 19: using NGTOSv3;
Line 20:
Line 21: [WebService(Namespace = "http://vinetamerica.com/webservices/")]
Line 22: [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
Line 23: [ScriptService]
Line 24: public class airports : System.Web.Services.WebService
Line 25: {
Line 26: [WebMethod(Description = "AirportName", EnableSession = true)]
Line 27: public string AirportName(string code)
Line 28: {
Line 29: if (CVinetApplication.App.Translator.airportCodeValid(code))
Line 30: {
Line 31: string s = CVinetApplication.App.Translator.airportName(code);
Line 32: if (s != code)
Line 33: {
Line 34: string cityCode = CVinetApplication.App.Translator.airportCityCode(code);
Line 35: string cityName = CVinetApplication.App.Translator.cityName(cityCode);
Line 36:
Line 37: if (!s.ToUpper().Contains(cityName.ToUpper())) s += " " + cityName;
Line 38:
Line 39: string stateCode = CVinetApplication.App.Translator.cityStateCode(cityCode);
Line 40: if (stateCode != "") s += ", " + stateCode;
Line 41: }
Line 42: else
Line 43: {
Line 44: s = CVinetApplication.App.Translator.cityName(code);
Line 45: s += " (" + CVinetApplication.App.Translator.translate("all airports") + ")";
Line 46:
Line 47: string stateCode = CVinetApplication.App.Translator.cityStateCode(code);
Line 48: if (stateCode != "") s += ", " + stateCode;
Line 49: }
Line 50:
Line 51: return s;
Line 52: }
Line 53:
Line 54: return "";
Line 55: }
Line 56:
Line 57: [WebMethod(Description = "AirportNameOnSite", EnableSession = true)]
Line 58: public string AirportNameOnSite(string siteCode, string code)
Line 59: {
Line 60: CVinetApplication app = CVinetApplication.AppForSite(siteCode);
Line 61: if (app.Translator.airportCodeValid(code))
Line 62: {
Line 63: string s = app.Translator.airportName(code);
Line 64: if (s != code)
Line 65: {
Line 66: string cityCode = app.Translator.airportCityCode(code);
Line 67: string cityName = app.Translator.cityName(cityCode);
Line 68:
Line 69: if (!s.ToUpper().Contains(cityName.ToUpper())) s += " " + cityName;
Line 70:
Line 71: string stateCode = app.Translator.cityStateCode(cityCode);
Line 72: if (stateCode != "") s += ", " + stateCode;
Line 73: }
Line 74: else
Line 75: {
Line 76: s = app.Translator.cityName(code);
Line 77: s += " (" + app.Translator.translate("all airports") + ")";
Line 78:
Line 79: string stateCode = app.Translator.cityStateCode(code);
Line 80: if (stateCode != "") s += ", " + stateCode;
Line 81: }
Line 82:
Line 83: return s;
Line 84: }
Line 85:
Line 86: return "";
Line 87: }
Line 88:
Line 89: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 90: [WebMethod(Description = "airport list", EnableSession = true)]
Line 91: public XmlDocument List(string word, bool noAll)
Line 92: {
Line 93: return List(CVinetApplication.App.LanguageCode, word, noAll);
Line 94: }
Line 95:
Line 96: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 97: [WebMethod(Description = "airport list for site", EnableSession = true)]
Line 98: public XmlDocument ListOnSite(string siteCode, string word, bool noAll)
Line 99: {
Line 100: return List(CVinetApplication.App.siteLanguageCode(siteCode), word, noAll);
Line 101: }
Line 102:
Line 103: private XmlDocument List(string languageCode, string word, bool noAll)
Line 104: {
Line 105: FlightSearchData fd = SearchDataHelpers.GetAirportData(word);
Line 106:
Line 107: if (fd != null)
Line 108: return fd.Xml(languageCode, !noAll);
Line 109:
Line 110: return null;
Line 111: }
Line 112:
Line 113: [WebMethod(Description = "resortCountry", EnableSession = true)]
Line 114: public string resortCountry(int code)
Line 115: {
Line 116: return CVinetApplication.App.Translator.resortCountryCode(code);
Line 117: }
Line 118:
Line 119: [WebMethod(Description = "resortCountry on site", EnableSession = true)]
Line 120: public string resortCountryOnSite(string siteCode, int code)
Line 121: {
Line 122: return CVinetApplication.AppForSite(siteCode).Translator.resortCountryCode(code);
Line 123: }
Line 124:
Line 125: [WebMethod(Description = "hotelResort", EnableSession = true)]
Line 126: public int hotelResort(int code)
Line 127: {
Line 128: return CVinetApplication.App.Translator.hotelResortCode(code);
Line 129: }
Line 130:
Line 131: [WebMethod(Description = "hotelResort on site", EnableSession = true)]
Line 132: public int hotelResortOnSite(string siteCode, int code)
Line 133: {
Line 134: return CVinetApplication.AppForSite(siteCode).Translator.hotelResortCode(code);
Line 135: }
Line 136:
Line 137: [WebMethod(Description = "courseClub", EnableSession = true)]
Line 138: public int courseClub(int code)
Line 139: {
Line 140: return CVinetApplication.App.Translator.courseClubCode(code);
Line 141: }
Line 142:
Line 143: [WebMethod(Description = "clubResort", EnableSession = true)]
Line 144: public int clubResort(int code)
Line 145: {
Line 146: return CVinetApplication.App.Translator.golfClubResortCode(code);
Line 147: }
Line 148:
Line 149: [WebMethod(Description = "hotel destinations", EnableSession = true)]
Line 150: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 151: public XmlDocument hotel_destinations()
Line 152: {
Line 153: XmlDocument xmlDest = new XmlDocument();
Line 154: xmlDest.LoadXml("<dest/>");
Line 155:
Line 156: XmlNode xmlRoot = xmlDest.SelectSingleNode("dest");
Line 157:
Line 158: VSite site = VEnvironmentHelpers.mySite;
Line 159: if (site != null)
Line 160: {
Line 161: List<OptionStrCode> dests = SearchDataHelpers.GetAccommodationData(site.Code).destinations();
Line 162:
Line 163: if (dests != null)
Line 164: for (int i = 0; i < dests.Count; i++)
Line 165: {
Line 166: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 167: xmlRoot.AppendChild(xmlObj);
Line 168:
Line 169: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 170: xmlAttr.Value = dests[i].name;
Line 171: xmlObj.Attributes.Append(xmlAttr);
Line 172:
Line 173: xmlAttr = xmlDest.CreateAttribute("code");
Line 174: xmlAttr.Value = dests[i].code;
Line 175: xmlObj.Attributes.Append(xmlAttr);
Line 176: }
Line 177: }
Line 178:
Line 179: return xmlDest;
Line 180: }
Line 181:
Line 182: [WebMethod(Description = "hotel destinations on Site", EnableSession = true)]
Line 183: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 184: public XmlDocument hotel_destinationsOnSite(string siteCode)
Line 185: {
Line 186: XmlDocument xmlDest = new XmlDocument();
Line 187: xmlDest.LoadXml("<dest/>");
Line 188:
Line 189: XmlNode xmlRoot = xmlDest.SelectSingleNode("dest");
Line 190:
Line 191: VSite site = VEnvironmentHelpers.Site(siteCode);
Line 192: if (site != null)
Line 193: {
Line 194: List<OptionStrCode> dests = SearchDataHelpers.GetAccommodationData(site.Code).destinations();
Line 195:
Line 196: if (dests != null)
Line 197: for (int i = 0; i < dests.Count; i++)
Line 198: {
Line 199: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 200: xmlRoot.AppendChild(xmlObj);
Line 201:
Line 202: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 203: xmlAttr.Value = dests[i].name;
Line 204: xmlObj.Attributes.Append(xmlAttr);
Line 205:
Line 206: xmlAttr = xmlDest.CreateAttribute("code");
Line 207: xmlAttr.Value = dests[i].code;
Line 208: xmlObj.Attributes.Append(xmlAttr);
Line 209: }
Line 210: }
Line 211:
Line 212: return xmlDest;
Line 213: }
Line 214:
Line 215: [WebMethod(Description = "hotel destinations 2", EnableSession = true)]
Line 216: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 217: public XmlDocument hotel_destinations2(int hotelCode)
Line 218: {
Line 219: string countryCode = CVinetApplication.App.Translator.hotelCountryCode(hotelCode);
Line 220: if (countryCode == "") return hotel_destinations();
Line 221:
Line 222: XmlDocument xmlDest = new XmlDocument();
Line 223: xmlDest.LoadXml("<dest/>");
Line 224:
Line 225: XmlNode xmlRoot = xmlDest.SelectSingleNode("dest");
Line 226:
Line 227: VSite site = VEnvironmentHelpers.mySite;
Line 228: if (site != null)
Line 229: {
Line 230: bool bFound = false;
Line 231:
Line 232: List<OptionStrCode> dests = SearchDataHelpers.GetAccommodationData(site.Code).destinations();
Line 233:
Line 234: if (dests != null)
Line 235: for (int i = 0; i < dests.Count; i++)
Line 236: {
Line 237: if (countryCode == dests[i].code)
Line 238: bFound = true;
Line 239:
Line 240: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 241: xmlRoot.AppendChild(xmlObj);
Line 242:
Line 243: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 244: xmlAttr.Value = dests[i].name;
Line 245: xmlObj.Attributes.Append(xmlAttr);
Line 246:
Line 247: xmlAttr = xmlDest.CreateAttribute("code");
Line 248: xmlAttr.Value = dests[i].code;
Line 249: xmlObj.Attributes.Append(xmlAttr);
Line 250: }
Line 251:
Line 252: if (!bFound)
Line 253: {
Line 254: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 255: xmlRoot.AppendChild(xmlObj);
Line 256:
Line 257: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 258: if (site != null)
Line 259: xmlAttr.Value = CVinetApplication.App.Translator.countryName(countryCode, site.LanguageCode);
Line 260: else
Line 261: xmlAttr.Value = CVinetApplication.App.Translator.countryName(countryCode);
Line 262: xmlObj.Attributes.Append(xmlAttr);
Line 263:
Line 264: xmlAttr = xmlDest.CreateAttribute("code");
Line 265: xmlAttr.Value = countryCode;
Line 266: xmlObj.Attributes.Append(xmlAttr);
Line 267: }
Line 268: }
Line 269:
Line 270: return xmlDest;
Line 271: }
Line 272:
Line 273: [WebMethod(Description = "golf destinations", EnableSession = true)]
Line 274: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 275: public XmlDocument golf_destinations()
Line 276: {
Line 277: XmlDocument xmlDest = new XmlDocument();
Line 278: xmlDest.LoadXml("<dest/>");
Line 279:
Line 280: XmlNode xmlRoot = xmlDest.SelectSingleNode("dest");
Line 281:
Line 282: VSite site = VEnvironmentHelpers.mySite;
Line 283: if (site != null)
Line 284: {
Line 285: List<OptionStrCode> dests = SearchDataHelpers.GetGolfData(site.Code).destinations();
Line 286:
Line 287: if (dests != null)
Line 288: for (int i = 0; i < dests.Count; i++)
Line 289: {
Line 290: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 291: xmlRoot.AppendChild(xmlObj);
Line 292:
Line 293: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 294: xmlAttr.Value = dests[i].name;
Line 295: xmlObj.Attributes.Append(xmlAttr);
Line 296:
Line 297: xmlAttr = xmlDest.CreateAttribute("code");
Line 298: xmlAttr.Value = dests[i].code;
Line 299: xmlObj.Attributes.Append(xmlAttr);
Line 300: }
Line 301: }
Line 302:
Line 303: return xmlDest;
Line 304: }
Line 305:
Line 306: [WebMethod(Description = "product destinations", EnableSession = true)]
Line 307: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 308: public XmlDocument product_destinations()
Line 309: {
Line 310: XmlDocument xmlDest = new XmlDocument();
Line 311: xmlDest.LoadXml("<dest/>");
Line 312:
Line 313: XmlNode xmlRoot = xmlDest.SelectSingleNode("dest");
Line 314:
Line 315: VSite site = VEnvironmentHelpers.mySite;
Line 316: if (site != null)
Line 317: {
Line 318: List<OptionStrCode> dests = SearchDataHelpers.GetPackageData(site.Code).destinations();
Line 319:
Line 320: if (dests != null)
Line 321: for (int i = 0; i < dests.Count; i++)
Line 322: {
Line 323: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 324: xmlRoot.AppendChild(xmlObj);
Line 325:
Line 326: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 327: xmlAttr.Value = dests[i].name;
Line 328: xmlObj.Attributes.Append(xmlAttr);
Line 329:
Line 330: xmlAttr = xmlDest.CreateAttribute("code");
Line 331: xmlAttr.Value = dests[i].code;
Line 332: xmlObj.Attributes.Append(xmlAttr);
Line 333: }
Line 334: }
Line 335:
Line 336: return xmlDest;
Line 337: }
Line 338:
Line 339: [WebMethod(Description = "product themes", EnableSession = true)]
Line 340: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 341: public XmlDocument product_themes()
Line 342: {
Line 343: XmlDocument xmlDest = new XmlDocument();
Line 344: xmlDest.LoadXml("<theme/>");
Line 345:
Line 346: XmlNode xmlRoot = xmlDest.SelectSingleNode("theme");
Line 347:
Line 348: VSite site = VEnvironmentHelpers.mySite;
Line 349: if (site != null)
Line 350: {
Line 351: List<OptionIntCode> dests = SearchDataHelpers.GetPackageData(site.Code).themes();
Line 352:
Line 353: if (dests != null)
Line 354: for (int i = 0; i < dests.Count; i++)
Line 355: {
Line 356: XmlNode xmlObj = xmlDest.CreateElement("itm");
Line 357: xmlRoot.AppendChild(xmlObj);
Line 358:
Line 359: XmlAttribute xmlAttr = xmlDest.CreateAttribute("name");
Line 360: xmlAttr.Value = dests[i].name;
Line 361: xmlObj.Attributes.Append(xmlAttr);
Line 362:
Line 363: xmlAttr = xmlDest.CreateAttribute("code");
Line 364: xmlAttr.Value = dests[i].code.ToString();
Line 365: xmlObj.Attributes.Append(xmlAttr);
Line 366: }
Line 367: }
Line 368:
Line 369: return xmlDest;
Line 370: }
Line 371:
Line 372: [WebMethod(Description = "hotel locations2", EnableSession = true)]
Line 373: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 374: public XmlDocument hotel_locations2(int resortCode)
Line 375: {
Line 376: return hotel_locations2(CVinetApplication.App, resortCode);
Line 377: }
Line 378:
Line 379: [WebMethod(Description = "hotel locations2 on site", EnableSession = true)]
Line 380: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 381: public XmlDocument hotel_locations2OnSite(string siteCode, int resortCode)
Line 382: {
Line 383: return hotel_locations2(CVinetApplication.AppForSite(siteCode), resortCode);
Line 384: }
Line 385:
Line 386: private XmlDocument hotel_locations2(CVinetApplication app, int resortCode)
Line 387: {
Line 388: XmlDocument xmlLoc = new XmlDocument();
Line 389: xmlLoc.LoadXml("<loc/>");
Line 390:
Line 391: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 392:
Line 393: string destCode = app.Translator.resortCountryCode(resortCode);
Line 394: if (destCode != "")
Line 395: {
Line 396: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("dest");
Line 397: xmlAttr.Value = destCode;
Line 398: xmlRoot.Attributes.Append(xmlAttr);
Line 399:
Line 400: VSite site = VEnvironmentHelpers.Site(app.SiteCode);
Line 401: if (site != null)
Line 402: {
Line 403: List<OptionIntCode> locs = SearchDataHelpers.GetAccommodationData(site.Code).resorts(destCode);
Line 404:
Line 405: if (locs != null)
Line 406: for (int i = 0; i < locs.Count; i++)
Line 407: {
Line 408: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 409: xmlRoot.AppendChild(xmlObj);
Line 410:
Line 411: xmlAttr = xmlLoc.CreateAttribute("name");
Line 412: xmlAttr.Value = locs[i].name;
Line 413: xmlObj.Attributes.Append(xmlAttr);
Line 414:
Line 415: xmlAttr = xmlLoc.CreateAttribute("code");
Line 416: xmlAttr.Value = locs[i].code.ToString();
Line 417: xmlObj.Attributes.Append(xmlAttr);
Line 418: }
Line 419:
Line 420: List<OptionIntCode> htels = SearchDataHelpers.GetAccommodationData(site.Code).hotels(destCode, "", resortCode);
Line 421:
Line 422: if (htels != null)
Line 423: for (int i = 0; i < htels.Count; i++)
Line 424: {
Line 425: XmlNode xmlObj = xmlLoc.CreateElement("hitm");
Line 426: xmlRoot.AppendChild(xmlObj);
Line 427:
Line 428: xmlAttr = xmlLoc.CreateAttribute("name");
Line 429: xmlAttr.Value = htels[i].name;
Line 430: xmlObj.Attributes.Append(xmlAttr);
Line 431:
Line 432: xmlAttr = xmlLoc.CreateAttribute("code");
Line 433: xmlAttr.Value = htels[i].code.ToString();
Line 434: xmlObj.Attributes.Append(xmlAttr);
Line 435: }
Line 436:
Line 437: List<OptionStrCode> meals = SearchDataHelpers.GetAccommodationData(site.Code).mealPlans(destCode, "", resortCode);
Line 438:
Line 439: if (meals != null)
Line 440: for (int i = 0; i < meals.Count; i++)
Line 441: {
Line 442: XmlNode xmlObj = xmlLoc.CreateElement("mitm");
Line 443: xmlRoot.AppendChild(xmlObj);
Line 444:
Line 445: xmlAttr = xmlLoc.CreateAttribute("name");
Line 446: xmlAttr.Value = meals[i].name;
Line 447: xmlObj.Attributes.Append(xmlAttr);
Line 448:
Line 449: xmlAttr = xmlLoc.CreateAttribute("code");
Line 450: xmlAttr.Value = meals[i].code;
Line 451: xmlObj.Attributes.Append(xmlAttr);
Line 452: }
Line 453: }
Line 454: }
Line 455:
Line 456: return xmlLoc;
Line 457: }
Line 458:
Line 459: [WebMethod(Description = "hotel locations", EnableSession = true)]
Line 460: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 461: public XmlDocument hotel_locations(string countryCode)
Line 462: {
Line 463: return hotel_locations(VEnvironmentHelpers.mySite, countryCode);
Line 464: }
Line 465:
Line 466: [WebMethod(Description = "hotel locations", EnableSession = true)]
Line 467: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 468: public XmlDocument hotel_locationsOnSite(string siteCode, string countryCode)
Line 469: {
Line 470: return hotel_locations(VEnvironmentHelpers.Site(siteCode), countryCode);
Line 471: }
Line 472:
Line 473: private XmlDocument hotel_locations(VSite site, string countryCode)
Line 474: {
Line 475: XmlDocument xmlLoc = new XmlDocument();
Line 476: xmlLoc.LoadXml("<loc/>");
Line 477:
Line 478: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 479:
Line 480: if (site != null)
Line 481: {
Line 482: List<OptionIntCode> locs = SearchDataHelpers.GetAccommodationData(site.Code).resorts(countryCode);
Line 483:
Line 484: if (locs != null)
Line 485: for (int i = 0; i < locs.Count; i++)
Line 486: {
Line 487: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 488: xmlRoot.AppendChild(xmlObj);
Line 489:
Line 490: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("name");
Line 491: xmlAttr.Value = locs[i].name;
Line 492: xmlObj.Attributes.Append(xmlAttr);
Line 493:
Line 494: xmlAttr = xmlLoc.CreateAttribute("code");
Line 495: xmlAttr.Value = locs[i].code.ToString();
Line 496: xmlObj.Attributes.Append(xmlAttr);
Line 497: }
Line 498:
Line 499: List<OptionStrCode> meals = SearchDataHelpers.GetAccommodationData(site.Code).mealPlans(countryCode);
Line 500:
Line 501: if (meals != null)
Line 502: for (int i = 0; i < meals.Count; i++)
Line 503: {
Line 504: XmlNode xmlObj = xmlLoc.CreateElement("mitm");
Line 505: xmlRoot.AppendChild(xmlObj);
Line 506:
Line 507: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("name");
Line 508: xmlAttr.Value = meals[i].name;
Line 509: xmlObj.Attributes.Append(xmlAttr);
Line 510:
Line 511: xmlAttr = xmlLoc.CreateAttribute("code");
Line 512: xmlAttr.Value = meals[i].code;
Line 513: xmlObj.Attributes.Append(xmlAttr);
Line 514: }
Line 515: }
Line 516:
Line 517: return xmlLoc;
Line 518: }
Line 519:
Line 520: [WebMethod(Description = "hotel locations 3", EnableSession = true)]
Line 521: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 522: public XmlDocument hotel_locations3(string countryCode, int hotelCode)
Line 523: {
Line 524: if (countryCode != CVinetApplication.App.Translator.hotelCountryCode(hotelCode))
Line 525: return hotel_locations(countryCode);
Line 526:
Line 527: int resortCode = CVinetApplication.App.Translator.hotelResortCode(hotelCode);
Line 528: if (resortCode == 0) return hotel_locations(countryCode);
Line 529:
Line 530: XmlDocument xmlLoc = new XmlDocument();
Line 531: xmlLoc.LoadXml("<loc/>");
Line 532:
Line 533: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 534:
Line 535: VSite site = VEnvironmentHelpers.mySite;
Line 536: if (site != null)
Line 537: {
Line 538: bool bFound = false;
Line 539: List<OptionIntCode> locs = SearchDataHelpers.GetAccommodationData(site.Code).resorts(countryCode);
Line 540:
Line 541: if (locs != null)
Line 542: for (int i = 0; i < locs.Count; i++)
Line 543: {
Line 544: if (resortCode == locs[i].code)
Line 545: bFound = true;
Line 546:
Line 547: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 548: xmlRoot.AppendChild(xmlObj);
Line 549:
Line 550: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("name");
Line 551: xmlAttr.Value = locs[i].name;
Line 552: xmlObj.Attributes.Append(xmlAttr);
Line 553:
Line 554: xmlAttr = xmlLoc.CreateAttribute("code");
Line 555: xmlAttr.Value = locs[i].code.ToString();
Line 556: xmlObj.Attributes.Append(xmlAttr);
Line 557: }
Line 558:
Line 559: if (!bFound)
Line 560: {
Line 561: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 562: xmlRoot.AppendChild(xmlObj);
Line 563:
Line 564: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("name");
Line 565: if (site != null) xmlAttr.Value = CVinetApplication.App.Translator.resortName(resortCode, site.LanguageCode);
Line 566: else xmlAttr.Value = CVinetApplication.App.Translator.resortName(resortCode);
Line 567: xmlObj.Attributes.Append(xmlAttr);
Line 568:
Line 569: xmlAttr = xmlLoc.CreateAttribute("code");
Line 570: xmlAttr.Value = resortCode.ToString();
Line 571: xmlObj.Attributes.Append(xmlAttr);
Line 572: }
Line 573: }
Line 574:
Line 575: return xmlLoc;
Line 576: }
Line 577:
Line 578: [WebMethod(Description = "product locations", EnableSession = true)]
Line 579: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 580: public XmlDocument product_locations(string countryCode)
Line 581: {
Line 582: XmlDocument xmlLoc = new XmlDocument();
Line 583: xmlLoc.LoadXml("<loc/>");
Line 584:
Line 585: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 586:
Line 587: VSite site = VEnvironmentHelpers.mySite;
Line 588: if (site != null)
Line 589: {
Line 590: List<OptionIntCode> locs = SearchDataHelpers.GetPackageData(site.Code).resorts(countryCode);
Line 591:
Line 592: if (locs != null)
Line 593: for (int i = 0; i < locs.Count; i++)
Line 594: {
Line 595: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 596: xmlRoot.AppendChild(xmlObj);
Line 597:
Line 598: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("name");
Line 599: xmlAttr.Value = locs[i].name;
Line 600: xmlObj.Attributes.Append(xmlAttr);
Line 601:
Line 602: xmlAttr = xmlLoc.CreateAttribute("code");
Line 603: xmlAttr.Value = locs[i].code.ToString();
Line 604: xmlObj.Attributes.Append(xmlAttr);
Line 605: }
Line 606: }
Line 607:
Line 608: return xmlLoc;
Line 609: }
Line 610:
Line 611: private XmlDocument product_locations2(int resortCode)
Line 612: {
Line 613: XmlDocument xmlLoc = new XmlDocument();
Line 614: xmlLoc.LoadXml("<loc/>");
Line 615:
Line 616: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 617:
Line 618: VSite site = VEnvironmentHelpers.mySite;
Line 619: if (site != null)
Line 620: {
Line 621: string destCode = CVinetApplication.App.Translator.resortCountryCode(resortCode);
Line 622: if (destCode != "")
Line 623: {
Line 624: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("dest");
Line 625: xmlAttr.Value = destCode;
Line 626: xmlRoot.Attributes.Append(xmlAttr);
Line 627:
Line 628: List<OptionIntCode> locs = SearchDataHelpers.GetPackageData(site.Code).resorts(destCode);
Line 629:
Line 630: if (locs != null)
Line 631: for (int i = 0; i < locs.Count; i++)
Line 632: {
Line 633: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 634: xmlRoot.AppendChild(xmlObj);
Line 635:
Line 636: xmlAttr = xmlLoc.CreateAttribute("name");
Line 637: xmlAttr.Value = locs[i].name;
Line 638: xmlObj.Attributes.Append(xmlAttr);
Line 639:
Line 640: xmlAttr = xmlLoc.CreateAttribute("code");
Line 641: xmlAttr.Value = locs[i].code.ToString();
Line 642: xmlObj.Attributes.Append(xmlAttr);
Line 643: }
Line 644: }
Line 645: }
Line 646:
Line 647: return xmlLoc;
Line 648: }
Line 649:
Line 650: [WebMethod(Description = "golf locations2", EnableSession = true)]
Line 651: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 652: public XmlDocument golf_locations2(int resortCode)
Line 653: {
Line 654: XmlDocument xmlLoc = new XmlDocument();
Line 655: xmlLoc.LoadXml("<loc/>");
Line 656:
Line 657: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 658:
Line 659: string destCode = CVinetApplication.App.Translator.resortCountryCode(resortCode);
Line 660: if (destCode != "")
Line 661: {
Line 662: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("dest");
Line 663: xmlAttr.Value = destCode;
Line 664: xmlRoot.Attributes.Append(xmlAttr);
Line 665:
Line 666: VSite site = VEnvironmentHelpers.mySite;
Line 667: if (site != null)
Line 668: {
Line 669: List<OptionIntCode> locs = SearchDataHelpers.GetGolfData(site.Code).resorts(destCode);
Line 670:
Line 671: if (locs != null)
Line 672: for (int i = 0; i < locs.Count; i++)
Line 673: {
Line 674: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 675: xmlRoot.AppendChild(xmlObj);
Line 676:
Line 677: xmlAttr = xmlLoc.CreateAttribute("name");
Line 678: xmlAttr.Value = locs[i].name;
Line 679: xmlObj.Attributes.Append(xmlAttr);
Line 680:
Line 681: xmlAttr = xmlLoc.CreateAttribute("code");
Line 682: xmlAttr.Value = locs[i].code.ToString();
Line 683: xmlObj.Attributes.Append(xmlAttr);
Line 684: }
Line 685:
Line 686: List<OptionIntCode> clubs = SearchDataHelpers.GetGolfData(site.Code).clubs(destCode, "", resortCode);
Line 687:
Line 688: if (clubs != null)
Line 689: for (int i = 0; i < clubs.Count; i++)
Line 690: {
Line 691: XmlNode xmlObj = xmlLoc.CreateElement("citm");
Line 692: xmlRoot.AppendChild(xmlObj);
Line 693:
Line 694: xmlAttr = xmlLoc.CreateAttribute("name");
Line 695: xmlAttr.Value = clubs[i].name;
Line 696: xmlObj.Attributes.Append(xmlAttr);
Line 697:
Line 698: xmlAttr = xmlLoc.CreateAttribute("code");
Line 699: xmlAttr.Value = clubs[i].code.ToString();
Line 700: xmlObj.Attributes.Append(xmlAttr);
Line 701: }
Line 702: }
Line 703: }
Line 704:
Line 705: return xmlLoc;
Line 706: }
Line 707:
Line 708: [WebMethod(Description = "golf locations", EnableSession = true)]
Line 709: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 710: public XmlDocument golf_locations(string countryCode)
Line 711: {
Line 712: XmlDocument xmlLoc = new XmlDocument();
Line 713: xmlLoc.LoadXml("<loc/>");
Line 714:
Line 715: XmlNode xmlRoot = xmlLoc.SelectSingleNode("loc");
Line 716:
Line 717: VSite site = VEnvironmentHelpers.mySite;
Line 718: if (site != null)
Line 719: {
Line 720: List<OptionIntCode> locs = SearchDataHelpers.GetGolfData(site.Code).resorts(countryCode);
Line 721:
Line 722: if (locs != null)
Line 723: for (int i = 0; i < locs.Count; i++)
Line 724: {
Line 725: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 726: xmlRoot.AppendChild(xmlObj);
Line 727:
Line 728: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("name");
Line 729: xmlAttr.Value = locs[i].name;
Line 730: xmlObj.Attributes.Append(xmlAttr);
Line 731:
Line 732: xmlAttr = xmlLoc.CreateAttribute("code");
Line 733: xmlAttr.Value = locs[i].code.ToString();
Line 734: xmlObj.Attributes.Append(xmlAttr);
Line 735: }
Line 736: }
Line 737:
Line 738: return xmlLoc;
Line 739: }
Line 740:
Line 741: [WebMethod(Description = "hotels", EnableSession = true)]
Line 742: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 743: public XmlDocument hotel_hotels(string countryCode, int resortCode)
Line 744: {
Line 745: return hotel_hotels(CVinetApplication.App, countryCode, resortCode);
Line 746: }
Line 747:
Line 748: [WebMethod(Description = "hotels on site", EnableSession = true)]
Line 749: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 750: public XmlDocument hotel_hotelsOnSite(string siteCode, string countryCode, int resortCode)
Line 751: {
Line 752: return hotel_hotels(CVinetApplication.AppForSite(siteCode), countryCode, resortCode);
Line 753: }
Line 754:
Line 755: private XmlDocument hotel_hotels(CVinetApplication app, string countryCode, int resortCode)
Line 756: {
Line 757: XmlDocument xmlHotel = new XmlDocument();
Line 758: xmlHotel.LoadXml("<hotel/>");
Line 759:
Line 760: XmlNode xmlRoot = xmlHotel.SelectSingleNode("hotel");
Line 761:
Line 762: VSite site = VEnvironmentHelpers.Site(app.SiteCode);
Line 763: if (site != null)
Line 764: {
Line 765: List<OptionIntCode> htels = SearchDataHelpers.GetAccommodationData(site.Code).hotels(countryCode, "", resortCode);
Line 766:
Line 767: if (htels != null)
Line 768: for (int i = 0; i < htels.Count; i++)
Line 769: {
Line 770: XmlNode xmlObj = xmlHotel.CreateElement("itm");
Line 771: xmlRoot.AppendChild(xmlObj);
Line 772:
Line 773: XmlAttribute xmlAttr = xmlHotel.CreateAttribute("name");
Line 774: xmlAttr.Value = htels[i].name;
Line 775: xmlObj.Attributes.Append(xmlAttr);
Line 776:
Line 777: xmlAttr = xmlHotel.CreateAttribute("code");
Line 778: xmlAttr.Value = htels[i].code.ToString();
Line 779: xmlObj.Attributes.Append(xmlAttr);
Line 780: }
Line 781:
Line 782: List<OptionStrCode> meals = SearchDataHelpers.GetAccommodationData(site.Code).mealPlans(countryCode, "", resortCode);
Line 783:
Line 784: if (meals != null)
Line 785: for (int i = 0; i < meals.Count; i++)
Line 786: {
Line 787: XmlNode xmlObj = xmlHotel.CreateElement("mitm");
Line 788: xmlRoot.AppendChild(xmlObj);
Line 789:
Line 790: XmlAttribute xmlAttr = xmlHotel.CreateAttribute("name");
Line 791: xmlAttr.Value = meals[i].name;
Line 792: xmlObj.Attributes.Append(xmlAttr);
Line 793:
Line 794: xmlAttr = xmlHotel.CreateAttribute("code");
Line 795: xmlAttr.Value = meals[i].code;
Line 796: xmlObj.Attributes.Append(xmlAttr);
Line 797: }
Line 798: }
Line 799:
Line 800: return xmlHotel;
Line 801: }
Line 802:
Line 803: [WebMethod(Description = "hotels 2", EnableSession = true)]
Line 804: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 805: public XmlDocument hotel_hotels2(string countryCode, int resortCode, int hotelCode)
Line 806: {
Line 807: return hotel_hotels2(CVinetApplication.App, countryCode, resortCode, hotelCode);
Line 808: }
Line 809:
Line 810: [WebMethod(Description = "hotels 2 on site", EnableSession = true)]
Line 811: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 812: public XmlDocument hotel_hotels2OnSite(string siteCode, string countryCode, int resortCode, int hotelCode)
Line 813: {
Line 814: return hotel_hotels2(CVinetApplication.AppForSite(siteCode), countryCode, resortCode, hotelCode);
Line 815: }
Line 816:
Line 817: private XmlDocument hotel_hotels2(CVinetApplication app, string countryCode, int resortCode, int hotelCode)
Line 818: {
Line 819: if (countryCode != app.Translator.hotelCountryCode(hotelCode))
Line 820: return hotel_hotels(app, countryCode, resortCode);
Line 821:
Line 822: if (resortCode != app.Translator.hotelResortCode(hotelCode))
Line 823: return hotel_hotels(app, countryCode, resortCode);
Line 824:
Line 825: XmlDocument xmlHotel = new XmlDocument();
Line 826: xmlHotel.LoadXml("<hotel/>");
Line 827:
Line 828: XmlNode xmlRoot = xmlHotel.SelectSingleNode("hotel");
Line 829:
Line 830: VSite site = VEnvironmentHelpers.Site(app.SiteCode);
Line 831: if (site != null)
Line 832: {
Line 833: bool bFound = false;
Line 834:
Line 835: List<OptionIntCode> htels = SearchDataHelpers.GetAccommodationData(site.Code).hotels(countryCode, "", resortCode);
Line 836:
Line 837: if (htels != null)
Line 838: for (int i = 0; i < htels.Count; i++)
Line 839: {
Line 840: if (hotelCode == htels[i].code)
Line 841: bFound = true;
Line 842:
Line 843: XmlNode xmlObj = xmlHotel.CreateElement("itm");
Line 844: xmlRoot.AppendChild(xmlObj);
Line 845:
Line 846: XmlAttribute xmlAttr = xmlHotel.CreateAttribute("name");
Line 847: xmlAttr.Value = htels[i].name;
Line 848: xmlObj.Attributes.Append(xmlAttr);
Line 849:
Line 850: xmlAttr = xmlHotel.CreateAttribute("code");
Line 851: xmlAttr.Value = htels[i].code.ToString();
Line 852: xmlObj.Attributes.Append(xmlAttr);
Line 853: }
Line 854:
Line 855: if (!bFound)
Line 856: {
Line 857: XmlNode xmlObj = xmlHotel.CreateElement("itm");
Line 858: xmlRoot.AppendChild(xmlObj);
Line 859:
Line 860: XmlAttribute xmlAttr = xmlHotel.CreateAttribute("name");
Line 861: if (site != null) xmlAttr.Value = CVinetApplication.App.Translator.hotelName(hotelCode, site.LanguageCode);
Line 862: else xmlAttr.Value = CVinetApplication.App.Translator.hotelName(hotelCode);
Line 863: xmlObj.Attributes.Append(xmlAttr);
Line 864:
Line 865: xmlAttr = xmlHotel.CreateAttribute("code");
Line 866: xmlAttr.Value = hotelCode.ToString();
Line 867: xmlObj.Attributes.Append(xmlAttr);
Line 868: }
Line 869: }
Line 870:
Line 871: return xmlHotel;
Line 872: }
Line 873:
Line 874: [WebMethod(Description = "clubs", EnableSession = true)]
Line 875: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 876: public XmlDocument golf_clubs(string countryCode, int resortCode)
Line 877: {
Line 878: XmlDocument xmlClub = new XmlDocument();
Line 879: xmlClub.LoadXml("<club/>");
Line 880:
Line 881: XmlNode xmlRoot = xmlClub.SelectSingleNode("club");
Line 882:
Line 883: VSite site = VEnvironmentHelpers.mySite;
Line 884: if (site != null)
Line 885: {
Line 886: List<OptionIntCode> clubs = SearchDataHelpers.GetGolfData(site.Code).clubs(countryCode, "", resortCode);
Line 887:
Line 888: if (clubs != null)
Line 889: for (int i = 0; i < clubs.Count; i++)
Line 890: {
Line 891: XmlNode xmlObj = xmlClub.CreateElement("itm");
Line 892: xmlRoot.AppendChild(xmlObj);
Line 893:
Line 894: XmlAttribute xmlAttr = xmlClub.CreateAttribute("name");
Line 895: xmlAttr.Value = clubs[i].name;
Line 896: xmlObj.Attributes.Append(xmlAttr);
Line 897:
Line 898: xmlAttr = xmlClub.CreateAttribute("code");
Line 899: xmlAttr.Value = clubs[i].code.ToString();
Line 900: xmlObj.Attributes.Append(xmlAttr);
Line 901: }
Line 902: }
Line 903:
Line 904: return xmlClub;
Line 905: }
Line 906:
Line 907: [WebMethod(Description = "courses", EnableSession = true)]
Line 908: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 909: public XmlDocument golf_courses(int clubCode)
Line 910: {
Line 911: XmlDocument xmlCourse = new XmlDocument();
Line 912: xmlCourse.LoadXml("<course/>");
Line 913:
Line 914: XmlNode xmlRoot = xmlCourse.SelectSingleNode("course");
Line 915:
Line 916: VSite site = VEnvironmentHelpers.mySite;
Line 917: if (site != null)
Line 918: {
Line 919: List<OptionIntCode> courses = SearchDataHelpers.GetGolfData(site.Code).courses(clubCode: clubCode);
Line 920:
Line 921: if (courses != null)
Line 922: for (int i = 0; i < courses.Count; i++)
Line 923: {
Line 924: XmlNode xmlObj = xmlCourse.CreateElement("itm");
Line 925: xmlRoot.AppendChild(xmlObj);
Line 926:
Line 927: XmlAttribute xmlAttr = xmlCourse.CreateAttribute("name");
Line 928: xmlAttr.Value = courses[i].name;
Line 929: xmlObj.Attributes.Append(xmlAttr);
Line 930:
Line 931: xmlAttr = xmlCourse.CreateAttribute("code");
Line 932: xmlAttr.Value = courses[i].code.ToString();
Line 933: xmlObj.Attributes.Append(xmlAttr);
Line 934: }
Line 935: }
Line 936:
Line 937: return xmlCourse;
Line 938: }
Line 939:
Line 940: [WebMethod(Description = "hotel hotel info", EnableSession = true)]
Line 941: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 942: public XmlDocument hotel_hotel(int hotelCode)
Line 943: {
Line 944: return hotel_hotel(CVinetApplication.App, hotelCode);
Line 945: }
Line 946:
Line 947: [WebMethod(Description = "hotel hotel info on site", EnableSession = true)]
Line 948: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 949: public XmlDocument hotel_hotelOnSite(string siteCode, int hotelCode)
Line 950: {
Line 951: return hotel_hotel(CVinetApplication.AppForSite(siteCode), hotelCode);
Line 952: }
Line 953:
Line 954: private XmlDocument hotel_hotel(CVinetApplication app, int hotelCode)
Line 955: {
Line 956: XmlDocument xmlLoc = new XmlDocument();
Line 957: xmlLoc.LoadXml("<hotel/>");
Line 958:
Line 959: XmlNode xmlRoot = xmlLoc.SelectSingleNode("hotel");
Line 960:
Line 961: string destCode = app.Translator.hotelCountryCode(hotelCode);
Line 962: int resortCode = app.Translator.hotelResortCode(hotelCode);
Line 963:
Line 964: if (destCode != "")
Line 965: {
Line 966: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("dest");
Line 967: xmlAttr.Value = destCode;
Line 968: xmlRoot.Attributes.Append(xmlAttr);
Line 969:
Line 970:
Line 971: xmlAttr = xmlLoc.CreateAttribute("loc");
Line 972: xmlAttr.Value = resortCode.ToString();
Line 973: xmlRoot.Attributes.Append(xmlAttr);
Line 974:
Line 975: VSite site = VEnvironmentHelpers.Site(app.SiteCode);
Line 976: if (site != null)
Line 977: {
Line 978: List<OptionIntCode> locs = SearchDataHelpers.GetAccommodationData(site.Code).resorts(destCode);
Line 979:
Line 980: if (locs != null)
Line 981: for (int i = 0; i < locs.Count; i++)
Line 982: {
Line 983: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 984: xmlRoot.AppendChild(xmlObj);
Line 985:
Line 986: xmlAttr = xmlLoc.CreateAttribute("name");
Line 987: xmlAttr.Value = locs[i].name;
Line 988: xmlObj.Attributes.Append(xmlAttr);
Line 989:
Line 990: xmlAttr = xmlLoc.CreateAttribute("code");
Line 991: xmlAttr.Value = locs[i].code.ToString();
Line 992: xmlObj.Attributes.Append(xmlAttr);
Line 993: }
Line 994:
Line 995: List<OptionIntCode> htels = SearchDataHelpers.GetAccommodationData(site.Code).hotels(destCode, resortCode: resortCode);
Line 996:
Line 997: if (htels != null)
Line 998: for (int i = 0; i < htels.Count; i++)
Line 999: {
Line 1000: XmlNode xmlObj = xmlLoc.CreateElement("hitm");
Line 1001: xmlRoot.AppendChild(xmlObj);
Line 1002:
Line 1003: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1004: xmlAttr.Value = htels[i].name;
Line 1005: xmlObj.Attributes.Append(xmlAttr);
Line 1006:
Line 1007: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1008: xmlAttr.Value = htels[i].code.ToString();
Line 1009: xmlObj.Attributes.Append(xmlAttr);
Line 1010: }
Line 1011:
Line 1012: List<OptionStrCode> meals = SearchDataHelpers.GetAccommodationData(site.Code).mealPlans(destCode, resortCode: resortCode, hotelCode: hotelCode);
Line 1013:
Line 1014: if (meals != null)
Line 1015: for (int i = 0; i < meals.Count; i++)
Line 1016: {
Line 1017: XmlNode xmlObj = xmlLoc.CreateElement("mitm");
Line 1018: xmlRoot.AppendChild(xmlObj);
Line 1019:
Line 1020: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1021: xmlAttr.Value = meals[i].name;
Line 1022: xmlObj.Attributes.Append(xmlAttr);
Line 1023:
Line 1024: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1025: xmlAttr.Value = meals[i].code;
Line 1026: xmlObj.Attributes.Append(xmlAttr);
Line 1027: }
Line 1028: }
Line 1029: }
Line 1030:
Line 1031: return xmlLoc;
Line 1032: }
Line 1033:
Line 1034: [WebMethod(Description = "golf club info", EnableSession = true)]
Line 1035: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1036: public XmlDocument golf_club(int clubCode)
Line 1037: {
Line 1038: XmlDocument xmlLoc = new XmlDocument();
Line 1039: xmlLoc.LoadXml("<club/>");
Line 1040:
Line 1041: XmlNode xmlRoot = xmlLoc.SelectSingleNode("club");
Line 1042:
Line 1043: string destCode = CVinetApplication.App.Translator.golfClubCountryCode(clubCode);
Line 1044: int resortCode = CVinetApplication.App.Translator.golfClubResortCode(clubCode);
Line 1045:
Line 1046: if (destCode != "")
Line 1047: {
Line 1048: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("dest");
Line 1049: xmlAttr.Value = destCode;
Line 1050: xmlRoot.Attributes.Append(xmlAttr);
Line 1051:
Line 1052: xmlAttr = xmlLoc.CreateAttribute("loc");
Line 1053: xmlAttr.Value = resortCode.ToString();
Line 1054: xmlRoot.Attributes.Append(xmlAttr);
Line 1055:
Line 1056: VSite site = VEnvironmentHelpers.mySite;
Line 1057: if (site != null)
Line 1058: {
Line 1059: List<OptionIntCode> locs = SearchDataHelpers.GetGolfData(site.Code).resorts(destCode);
Line 1060:
Line 1061: if (locs != null)
Line 1062: for (int i = 0; i < locs.Count; i++)
Line 1063: {
Line 1064: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 1065: xmlRoot.AppendChild(xmlObj);
Line 1066:
Line 1067: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1068: xmlAttr.Value = locs[i].name;
Line 1069: xmlObj.Attributes.Append(xmlAttr);
Line 1070:
Line 1071: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1072: xmlAttr.Value = locs[i].code.ToString();
Line 1073: xmlObj.Attributes.Append(xmlAttr);
Line 1074: }
Line 1075:
Line 1076: List<OptionIntCode> clubs = SearchDataHelpers.GetGolfData(site.Code).clubs(destCode, resortCode: resortCode);
Line 1077:
Line 1078: if (clubs != null)
Line 1079: for (int i = 0; i < clubs.Count; i++)
Line 1080: {
Line 1081: XmlNode xmlObj = xmlLoc.CreateElement("citm");
Line 1082: xmlRoot.AppendChild(xmlObj);
Line 1083:
Line 1084: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1085: xmlAttr.Value = clubs[i].name;
Line 1086: xmlObj.Attributes.Append(xmlAttr);
Line 1087:
Line 1088: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1089: xmlAttr.Value = clubs[i].code.ToString();
Line 1090: xmlObj.Attributes.Append(xmlAttr);
Line 1091: }
Line 1092:
Line 1093: List<OptionIntCode> courses = SearchDataHelpers.GetGolfData(site.Code).courses(clubCode: clubCode);
Line 1094:
Line 1095: if (courses != null)
Line 1096: for (int i = 0; i < courses.Count; i++)
Line 1097: {
Line 1098: XmlNode xmlObj = xmlLoc.CreateElement("sitm");
Line 1099: xmlRoot.AppendChild(xmlObj);
Line 1100:
Line 1101: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1102: xmlAttr.Value = courses[i].name;
Line 1103: xmlObj.Attributes.Append(xmlAttr);
Line 1104:
Line 1105: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1106: xmlAttr.Value = courses[i].code.ToString();
Line 1107: xmlObj.Attributes.Append(xmlAttr);
Line 1108: }
Line 1109: }
Line 1110: }
Line 1111:
Line 1112: return xmlLoc;
Line 1113: }
Line 1114:
Line 1115: [WebMethod(Description = "golf course info", EnableSession = true)]
Line 1116: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1117: public XmlDocument golf_course(int courseCode)
Line 1118: {
Line 1119: XmlDocument xmlLoc = new XmlDocument();
Line 1120: xmlLoc.LoadXml("<club/>");
Line 1121:
Line 1122: XmlNode xmlRoot = xmlLoc.SelectSingleNode("club");
Line 1123:
Line 1124: int clubCode = CVinetApplication.App.Translator.courseClubCode(courseCode);
Line 1125: string destCode = CVinetApplication.App.Translator.golfClubCountryCode(clubCode);
Line 1126: int resortCode = CVinetApplication.App.Translator.golfClubResortCode(clubCode);
Line 1127:
Line 1128: if (destCode != "")
Line 1129: {
Line 1130: XmlAttribute xmlAttr = xmlLoc.CreateAttribute("dest");
Line 1131: xmlAttr.Value = destCode;
Line 1132: xmlRoot.Attributes.Append(xmlAttr);
Line 1133:
Line 1134: xmlAttr = xmlLoc.CreateAttribute("loc");
Line 1135: xmlAttr.Value = resortCode.ToString();
Line 1136: xmlRoot.Attributes.Append(xmlAttr);
Line 1137:
Line 1138: xmlAttr = xmlLoc.CreateAttribute("club");
Line 1139: xmlAttr.Value = clubCode.ToString();
Line 1140: xmlRoot.Attributes.Append(xmlAttr);
Line 1141:
Line 1142: VSite site = VEnvironmentHelpers.mySite;
Line 1143: if (site != null)
Line 1144: {
Line 1145: List<OptionIntCode> locs = SearchDataHelpers.GetGolfData(site.Code).resorts(destCode);
Line 1146:
Line 1147: if (locs != null)
Line 1148: for (int i = 0; i < locs.Count; i++)
Line 1149: {
Line 1150: XmlNode xmlObj = xmlLoc.CreateElement("itm");
Line 1151: xmlRoot.AppendChild(xmlObj);
Line 1152:
Line 1153: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1154: xmlAttr.Value = locs[i].name;
Line 1155: xmlObj.Attributes.Append(xmlAttr);
Line 1156:
Line 1157: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1158: xmlAttr.Value = locs[i].code.ToString();
Line 1159: xmlObj.Attributes.Append(xmlAttr);
Line 1160: }
Line 1161:
Line 1162: List<OptionIntCode> clubs = SearchDataHelpers.GetGolfData(site.Code).clubs(destCode, resortCode: resortCode);
Line 1163:
Line 1164: if (clubs != null)
Line 1165: for (int i = 0; i < clubs.Count; i++)
Line 1166: {
Line 1167: XmlNode xmlObj = xmlLoc.CreateElement("citm");
Line 1168: xmlRoot.AppendChild(xmlObj);
Line 1169:
Line 1170: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1171: xmlAttr.Value = clubs[i].name;
Line 1172: xmlObj.Attributes.Append(xmlAttr);
Line 1173:
Line 1174: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1175: xmlAttr.Value = clubs[i].code.ToString();
Line 1176: xmlObj.Attributes.Append(xmlAttr);
Line 1177: }
Line 1178:
Line 1179: List<OptionIntCode> courses = SearchDataHelpers.GetGolfData(site.Code).courses(clubCode: clubCode);
Line 1180:
Line 1181: if (courses != null)
Line 1182: for (int i = 0; i < courses.Count; i++)
Line 1183: {
Line 1184: XmlNode xmlObj = xmlLoc.CreateElement("sitm");
Line 1185: xmlRoot.AppendChild(xmlObj);
Line 1186:
Line 1187: xmlAttr = xmlLoc.CreateAttribute("name");
Line 1188: xmlAttr.Value = courses[i].name;
Line 1189: xmlObj.Attributes.Append(xmlAttr);
Line 1190:
Line 1191: xmlAttr = xmlLoc.CreateAttribute("code");
Line 1192: xmlAttr.Value = courses[i].code.ToString();
Line 1193: xmlObj.Attributes.Append(xmlAttr);
Line 1194: }
Line 1195: }
Line 1196: }
Line 1197:
Line 1198: return xmlLoc;
Line 1199: }
Line 1200:
Line 1201: [WebMethod(Description = "hotel deal", EnableSession = true)]
Line 1202: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1203: public XmlDocument hotel_deal(int dealid)
Line 1204: {
Line 1205: XmlDocument xmlDeal = new XmlDocument();
Line 1206: xmlDeal.LoadXml("<deal/>");
Line 1207:
Line 1208: NGTOSv3.DB.HotelDeal deal = MainFeHelpers.getHotelDeal(dealid);
Line 1209: if (deal != null) fillDealData(CVinetApplication.App, xmlDeal, deal);
Line 1210:
Line 1211: return xmlDeal;
Line 1212: }
Line 1213:
Line 1214: [WebMethod(Description = "hotel deal on site", EnableSession = true)]
Line 1215: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1216: public XmlDocument hotel_dealOnSite(string siteCode, int dealid)
Line 1217: {
Line 1218: XmlDocument xmlDeal = new XmlDocument();
Line 1219: xmlDeal.LoadXml("<deal/>");
Line 1220:
Line 1221: NGTOSv3.DB.HotelDeal deal = MainFeHelpers.getHotelDeal(dealid);
Line 1222: if (deal != null) fillDealData(CVinetApplication.AppForSite(siteCode), xmlDeal, deal);
Line 1223:
Line 1224: return xmlDeal;
Line 1225: }
Line 1226:
Line 1227: [WebMethod(Description = "hotel landing page", EnableSession = true)]
Line 1228: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1229: public XmlDocument hotel_landingPage(string code)
Line 1230: {
Line 1231: XmlDocument xmlDeal = new XmlDocument();
Line 1232: xmlDeal.LoadXml("<deal/>");
Line 1233:
Line 1234:
Line 1235: NGTOSv3.DB.LandingPage lp = VEnvironmentHelpers.mySite.LandingPage(code);
Line 1236: if (lp != null && lp.GetType() == typeof(NGTOSv3.DB.HotelLandingPage))
Line 1237: {
Line 1238: NGTOSv3.DB.HotelDeal deal = MainFeHelpers.getHotelDeal(lp.DealID);
Line 1239: if (deal != null) fillDealData(CVinetApplication.App, xmlDeal, deal);
Line 1240: }
Line 1241:
Line 1242: return xmlDeal;
Line 1243: }
Line 1244:
Line 1245: [WebMethod(Description = "hotel landing page on site", EnableSession = true)]
Line 1246: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1247: public XmlDocument hotel_landingPageOnSite(string siteCode, string code)
Line 1248: {
Line 1249: XmlDocument xmlDeal = new XmlDocument();
Line 1250: xmlDeal.LoadXml("<deal/>");
Line 1251:
Line 1252: NGTOSv3.DB.LandingPage lp = VEnvironmentHelpers.Site(siteCode).LandingPage(code);
Line 1253: if (lp != null && lp.GetType() == typeof(NGTOSv3.DB.HotelLandingPage))
Line 1254: {
Line 1255: NGTOSv3.DB.HotelDeal deal = MainFeHelpers.getHotelDeal(lp.DealID);
Line 1256: if (deal != null) fillDealData(CVinetApplication.AppForSite(siteCode), xmlDeal, deal);
Line 1257: }
Line 1258:
Line 1259: return xmlDeal;
Line 1260: }
Line 1261:
Line 1262: protected void fillDealData(CVinetApplication app, XmlDocument xmlDeal, NGTOSv3.DB.HotelDeal deal)
Line 1263: {
Line 1264: XmlNode xmlRoot = xmlDeal.SelectSingleNode("deal");
Line 1265:
Line 1266: NGTOSUtil.xmlAddAttribute(xmlRoot, "id", deal.ID.ToString());
Line 1267: NGTOSUtil.xmlAddAttribute(xmlRoot, "promo", deal.PromotionCode);
Line 1268: NGTOSUtil.xmlAddAttribute(xmlRoot, "passenger", deal.PassengerType);
Line 1269: NGTOSUtil.xmlAddAttribute(xmlRoot, "meal", deal.MealCode);
Line 1270: NGTOSUtil.xmlAddAttribute(xmlRoot, "theme", deal.ThemeCode.ToString());
Line 1271: NGTOSUtil.xmlAddAttribute(xmlRoot, "golf", deal.GolfPackageId.ToString());
Line 1272: NGTOSUtil.xmlAddAttribute(xmlRoot, "air", deal.FlightOption.ToString());
Line 1273: NGTOSUtil.xmlAddAttribute(xmlRoot, "airsource", deal.FlightSourceStr.ToString());
Line 1274: NGTOSUtil.xmlAddAttribute(xmlRoot, "airline", deal.AirlineCode);
Line 1275: NGTOSUtil.xmlAddAttribute(xmlRoot, "cabin", deal.CabinCode);
Line 1276: NGTOSUtil.xmlAddAttribute(xmlRoot, "direct", deal.DirectFlights ? "1" : "0");
Line 1277: NGTOSUtil.xmlAddAttribute(xmlRoot, "notransfer", deal.NoTransfer ? "1" : "0");
Line 1278:
Line 1279: List<OptionStrCode> ms = SearchDataHelpers.GetAccommodationData(app.SiteCode).mealPlans();
Line 1280:
Line 1281: if (ms != null)
Line 1282: for (int i = 0; i < ms.Count; i++)
Line 1283: {
Line 1284: XmlNode xmlObj = xmlDeal.CreateElement("mitm");
Line 1285: xmlRoot.AppendChild(xmlObj);
Line 1286:
Line 1287: NGTOSUtil.xmlAddAttribute(xmlObj, "name", ms[i].name);
Line 1288: NGTOSUtil.xmlAddAttribute(xmlObj, "code", ms[i].code);
Line 1289: }
Line 1290:
Line 1291: string s = "";
Line 1292: for (int i = 0; i < deal.DepartureAirports.Count; i++)
Line 1293: {
Line 1294: s += (i > 0 ? ";" : "") + deal.DepartureAirports[i];
Line 1295:
Line 1296: XmlNode xmlObj = xmlDeal.CreateElement("airport");
Line 1297: xmlRoot.AppendChild(xmlObj);
Line 1298:
Line 1299: NGTOSUtil.xmlAddAttribute(xmlObj, "code", deal.DepartureAirports[i]);
Line 1300: NGTOSUtil.xmlAddAttribute(xmlObj, "name", app.Translator.airportName(deal.DepartureAirports[i]));
Line 1301: }
Line 1302:
Line 1303: NGTOSUtil.xmlAddAttribute(xmlRoot, "airports", s);
Line 1304: NGTOSUtil.xmlAddAttribute(xmlRoot, "dstart", deal.DepartureStartDate.ToString("M/d/yy"));
Line 1305: NGTOSUtil.xmlAddAttribute(xmlRoot, "dend", deal.DepartureEndDate.ToString("M/d/yy"));
Line 1306:
Line 1307: s = "";
Line 1308: for (int i = 0; i < 7; i++)
Line 1309: s += (i > 0 ? "," : "") + (deal.departureDays[i] ? "1" : "0");
Line 1310:
Line 1311: NGTOSUtil.xmlAddAttribute(xmlRoot, "ddays", s);
Line 1312:
Line 1313: s = "";
Line 1314: for (int i = 0; i < 7; i++)
Line 1315: s += (i > 0 ? "," : "") + (deal.returnDays[i] ? "1" : "0");
Line 1316:
Line 1317: NGTOSUtil.xmlAddAttribute(xmlRoot, "rdays", s);
Line 1318: NGTOSUtil.xmlAddAttribute(xmlRoot, "minstay", deal.MinStay.ToString());
Line 1319: NGTOSUtil.xmlAddAttribute(xmlRoot, "maxstay", deal.MaxStay.ToString());
Line 1320: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minroom", deal.MinRoom.ToString());
Line 1321: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxroom", deal.MaxRoom.ToString());
Line 1322: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_room", deal.DefaultRoom.ToString());
Line 1323:
Line 1324: NGTOSv3.DB.DealRoom room = deal.Room(0);
Line 1325:
Line 1326: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", room.minAdult.ToString());
Line 1327: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", room.maxAdult.ToString());
Line 1328: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", room.minChild.ToString());
Line 1329: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", room.maxChild.ToString());
Line 1330: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_mininfant", room.minInfant.ToString());
Line 1331: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxinfant", room.maxInfant.ToString());
Line 1332: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", app.Cache["minChildAge"]);
Line 1333: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", app.Cache["maxChildAge"]);
Line 1334:
Line 1335: for (int i = 1; i < deal.MaxRoom; i++)
Line 1336: {
Line 1337: NGTOSv3.DB.DealRoom room2 = deal.Room(i);
Line 1338:
Line 1339: if (!room.Equals(room2))
Line 1340: {
Line 1341: XmlNode xmlObj = xmlDeal.CreateElement("room");
Line 1342: xmlRoot.AppendChild(xmlObj);
Line 1343:
Line 1344: NGTOSUtil.xmlAddAttribute(xmlObj, "no", (i + 1).ToString());
Line 1345: NGTOSUtil.xmlAddAttribute(xmlObj, "p_minadult", room2.minAdult.ToString());
Line 1346: NGTOSUtil.xmlAddAttribute(xmlObj, "p_maxadult", room2.maxAdult.ToString());
Line 1347: NGTOSUtil.xmlAddAttribute(xmlObj, "p_minchild", room2.minChild.ToString());
Line 1348: NGTOSUtil.xmlAddAttribute(xmlObj, "p_maxchild", room2.maxChild.ToString());
Line 1349: NGTOSUtil.xmlAddAttribute(xmlObj, "p_mininfant", room2.minInfant.ToString());
Line 1350: NGTOSUtil.xmlAddAttribute(xmlObj, "p_maxinfant", room2.maxInfant.ToString());
Line 1351: }
Line 1352: }
Line 1353: }
Line 1354:
Line 1355: [WebMethod(Description = "hotel search parameters", EnableSession = true)]
Line 1356: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1357: public XmlDocument hotel_searchParameters()
Line 1358: {
Line 1359: return hotel_searchParameters(CVinetApplication.App);
Line 1360: }
Line 1361:
Line 1362: [WebMethod(Description = "hotel search parameters", EnableSession = true)]
Line 1363: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1364: public XmlDocument hotel_searchParametersOnSite(string siteCode)
Line 1365: {
Line 1366: return hotel_searchParameters(CVinetApplication.AppForSite(siteCode));
Line 1367: }
Line 1368:
Line 1369: private XmlDocument hotel_searchParameters(CVinetApplication app)
Line 1370: {
Line 1371: XmlDocument xmlParams = new XmlDocument();
Line 1372: xmlParams.LoadXml("<parameters/>");
Line 1373:
Line 1374: XmlNode xmlRoot = xmlParams.SelectSingleNode("parameters");
Line 1375:
Line 1376: NGTOSUtil.xmlAddAttribute(xmlRoot, "defdur", app.Cache["feDuration"] != null ? app.Cache["feDuration"] : "1");
Line 1377: NGTOSUtil.xmlAddAttribute(xmlRoot, "imageurl", "http://" + app.DomainName + "/" + app.SiteCode + "/image");
Line 1378: NGTOSUtil.xmlAddAttribute(xmlRoot, "dateformat", VEnvironmentHelpers.Site(app.SiteCode).dateFormat());
Line 1379: NGTOSUtil.xmlAddAttribute(xmlRoot, "lang", VEnvironmentHelpers.Site(app.SiteCode).LanguageCode);
Line 1380: NGTOSUtil.xmlAddAttribute(xmlRoot, "fextend", app.Cache.FeSearchExtentYear.ToString());
Line 1381: NGTOSUtil.xmlAddAttribute(xmlRoot, "maxstay", app.Cache["feMaxSearchDuration"] != null ? app.Cache["feMaxSearchDuration"] : "14");
Line 1382: NGTOSUtil.xmlAddAttribute(xmlRoot, "min", app.Cache.FeMinDepartureDays.ToString());
Line 1383: NGTOSUtil.xmlAddAttribute(xmlRoot, "countrycode", app.Cache["feDefCountry"] != null ? app.Cache["feDefCountry"] : "");
Line 1384: NGTOSUtil.xmlAddAttribute(xmlRoot, "promobox", app.Cache["showPromotionBox"] != null ? app.Cache["showPromotionBox"] : "0");
Line 1385: NGTOSUtil.xmlAddAttribute(xmlRoot, "location", app.Cache["showLOConsearch"] != null ? app.Cache["showLOConsearch"] : "1");
Line 1386: NGTOSUtil.xmlAddAttribute(xmlRoot, "meal", app.Cache["showMPonsearch"] != null ? app.Cache["showMPonsearch"] : "0");
Line 1387: NGTOSUtil.xmlAddAttribute(xmlRoot, "theme", app.Cache["showTHEonsearch"] != null ? app.Cache["showTHEonsearch"] : "0");
Line 1388: NGTOSUtil.xmlAddAttribute(xmlRoot, "expandadvfo", app.Cache["flightAdvOptOpen"] != null ? app.Cache["flightAdvOptOpen"] : "0");
Line 1389: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_origin", app.Translator.translate("provide_origin"));
Line 1390: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_destination", app.Translator.translate("provide_destinaton"));
Line 1391: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_location", app.Translator.translate("provide_location"));
Line 1392: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_checkin", app.Translator.translate("invalid_checkin_date"));
Line 1393: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_checkout", app.Translator.translate("invalid_checkout_date"));
Line 1394: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_clater", app.Translator.translate("checkout_date_must_be_later_checkin"));
Line 1395: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_departure", app.Translator.translate("invalid_departure_date"));
Line 1396: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_return", app.Translator.translate("invalid_return_date"));
Line 1397: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_dlater", app.Translator.translate("return_date_must_be_later_departure"));
Line 1398: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_maxstay", app.Translator.translate("max_number_of_nigths_to_search"));
Line 1399: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_childage", app.Translator.translate("provide_child_age"));
Line 1400: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_pax", app.Translator.translate("max_number_of_pax_to_search"));
Line 1401: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_roompax", app.Translator.translate("max_number_of_pax_in_room"));
Line 1402: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_noair", app.Translator.translate("Accommodation only"));
Line 1403: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_origin", app.Translator.translate("origin"));
Line 1404: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_class", app.Translator.translate("flightclass"));
Line 1405: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_allclass", app.Translator.translate("search_all_classes"));
Line 1406: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_airline", app.Translator.translate("Airline"));
Line 1407: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_allairline", app.Translator.translate("search_all_airlines"));
Line 1408: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_direct", app.Translator.translate("search_direct_flights_only"));
Line 1409: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_advflightoption", app.Translator.translate("Advanced_flight_options"));
Line 1410: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_selectlocation", app.Translator.translate("select_location"));
Line 1411: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_location", app.Translator.translate("location"));
Line 1412: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_alllocation", app.Translator.translate("all_locations"));
Line 1413: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_hotel", app.Translator.translate("hotel_resort"));
Line 1414: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_selecthotel", app.Translator.translate("all_hotels_resorts"));
Line 1415: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_promotionbox", app.Translator.translate("Promotion code"));
Line 1416: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_promotion", app.Translator.translate("Promotion code"));
Line 1417: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_destination", app.Translator.translate("destination"));
Line 1418: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_selectdestination", app.Translator.translate("hs_select_destination") != "hs_select_destination" ? app.Translator.translate("hs_select_destination") : "");
Line 1419: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_departurereturn", app.Translator.translate("departure_and_return_date"));
Line 1420: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_departure", app.Translator.translate("departure_date"));
Line 1421: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_checkinout", app.Translator.translate("checkin_checkout_date"));
Line 1422: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_checkin", app.Translator.translate("checkin_date"));
Line 1423: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_return", app.Translator.translate("return_date"));
Line 1424: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_checkout", app.Translator.translate("checkout_date"));
Line 1425: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_stay", app.Translator.translate("duration"));
Line 1426: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_mealprefered", app.Translator.translate("meal plan prefered"));
Line 1427: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_meal", app.Translator.translate("meal plan"));
Line 1428: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_allmeal", app.Translator.translate("all plans"));
Line 1429: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_themeprefered", app.Translator.translate("theme prefered"));
Line 1430: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_theme", app.Translator.translate("theme"));
Line 1431: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_alltheme", app.Translator.translate("not specified"));
Line 1432: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_pax", app.Translator.translate("select travelers"));
Line 1433: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_search", app.Translator.translate("search"));
Line 1434: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_golf", app.Translator.translate("golf_play_count_title"));
Line 1435: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_golf2", app.Translator.translate("golf_play_count"));
Line 1436: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_nogolf", app.Translator.translate("no_golf"));
Line 1437: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_select", app.Translator.translate("select"));
Line 1438: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_selgolf", app.Translator.translate("select_golf_play_count"));
Line 1439:
Line 1440: CPaxDisplay pd = new CPaxDisplay(app, "H");
Line 1441:
Line 1442: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minroom", pd.minRoom.ToString());
Line 1443: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxroom", pd.maxRoom.ToString());
Line 1444: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxpax", pd.maxPax.ToString());
Line 1445: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxpaxroom", pd.general.maxPaxInRoom.ToString());
Line 1446: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", pd.general.minAdultInRoom.ToString());
Line 1447: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", pd.general.maxAdultInRoom.ToString());
Line 1448: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", pd.general.minChildInRoom.ToString());
Line 1449: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", pd.general.maxChildInRoom.ToString());
Line 1450: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", pd.general.minChildAge.ToString());
Line 1451: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", pd.general.maxChildAge.ToString());
Line 1452: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_mininfant", pd.general.minInfantInRoom.ToString());
Line 1453: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxinfant", pd.general.maxInfantInRoom.ToString());
Line 1454: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_room", pd.room.ToString());
Line 1455: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_adult", pd.general.adult.ToString());
Line 1456: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_child", pd.general.child.ToString());
Line 1457: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_infant", pd.general.infant.ToString());
Line 1458: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_adult", app.Translator.translate("feAdult"));
Line 1459: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_child", app.Translator.translate("feChild"));
Line 1460: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_infant", app.Translator.translate("feInfant"));
Line 1461: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_rooms", app.Translator.translate("feRooms"));
Line 1462: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_room", app.Cache["roomFormatFe"]);
Line 1463: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childage", app.Cache["childAgeFormatFe"]);
Line 1464: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childexpl", app.Translator.translate("feSelectChildAge"));
Line 1465:
Line 1466: for (int i = 0; i < CGlobal.Global.flightTimes.Length; i += 2)
Line 1467: {
Line 1468: XmlNode xmlObj = xmlParams.CreateElement("ftimes");
Line 1469: xmlRoot.AppendChild(xmlObj);
Line 1470:
Line 1471: NGTOSUtil.xmlAddAttribute(xmlObj, "val", app.Translator.translate(CGlobal.Global.flightTimes[i]));
Line 1472: NGTOSUtil.xmlAddAttribute(xmlObj, "key", CGlobal.Global.flightTimes[i + 1]);
Line 1473: }
Line 1474:
Line 1475: List<keyValuePair> cabins = app.Translator.getCabins();
Line 1476: for (int i = 0; i < cabins.Count; i++)
Line 1477: if (cabins[i].Key.ToString() != "W")
Line 1478: {
Line 1479: XmlNode xmlObj = xmlParams.CreateElement("cabin");
Line 1480: xmlRoot.AppendChild(xmlObj);
Line 1481:
Line 1482: NGTOSUtil.xmlAddAttribute(xmlObj, "val", cabins[i].Value);
Line 1483: NGTOSUtil.xmlAddAttribute(xmlObj, "key", cabins[i].Key.ToString());
Line 1484: }
Line 1485:
Line 1486: List<keyValuePair> airlines = app.Translator.getAirlines(app.SiteCode);
Line 1487: for (int i = 0; i < airlines.Count; i++)
Line 1488: {
Line 1489: XmlNode xmlObj = xmlParams.CreateElement("airline");
Line 1490: xmlRoot.AppendChild(xmlObj);
Line 1491:
Line 1492: NGTOSUtil.xmlAddAttribute(xmlObj, "val", airlines[i].Value);
Line 1493: NGTOSUtil.xmlAddAttribute(xmlObj, "key", airlines[i].Key.ToString());
Line 1494: }
Line 1495:
Line 1496: List<OptionStrCode> mp = SearchDataHelpers.GetAccommodationData(app.SiteCode).mealPlans();
Line 1497: for (int i = 0; i < mp.Count; i++)
Line 1498: {
Line 1499: XmlNode xmlObj = xmlParams.CreateElement("meal");
Line 1500: xmlRoot.AppendChild(xmlObj);
Line 1501:
Line 1502: NGTOSUtil.xmlAddAttribute(xmlObj, "val", mp[i].name);
Line 1503: NGTOSUtil.xmlAddAttribute(xmlObj, "key", mp[i].code);
Line 1504: }
Line 1505:
Line 1506: List<OptionIntCode> themes = SearchDataHelpers.GetAccommodationData(app.SiteCode).themes();
Line 1507: for (int i = 0; i < themes.Count; i++)
Line 1508: {
Line 1509: XmlNode xmlObj = xmlParams.CreateElement("theme");
Line 1510: xmlRoot.AppendChild(xmlObj);
Line 1511:
Line 1512: NGTOSUtil.xmlAddAttribute(xmlObj, "val", themes[i].name);
Line 1513: NGTOSUtil.xmlAddAttribute(xmlObj, "key", themes[i].code.ToString());
Line 1514: }
Line 1515:
Line 1516: return xmlParams;
Line 1517: }
Line 1518:
Line 1519: [WebMethod(Description = "flight search parameters", EnableSession = true)]
Line 1520: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1521: public XmlDocument flight_searchParameters()
Line 1522: {
Line 1523: XmlDocument xmlParams = new XmlDocument();
Line 1524: xmlParams.LoadXml("<parameters/>");
Line 1525:
Line 1526: XmlNode xmlRoot = xmlParams.SelectSingleNode("parameters");
Line 1527:
Line 1528: NGTOSUtil.xmlAddAttribute(xmlRoot, "lang", CVinetApplication.App.LanguageCode);
Line 1529: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_origin", CVinetApplication.App.Translator.translate("provide_origin"));
Line 1530: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_origin_2", CVinetApplication.App.Translator.translate("provide_origin_for_flight_2"));
Line 1531: NGTOSUtil.xmlAddAttribute(xmlRoot, "imageurl", "/" + CGlobal.Global.Host + "/image");
Line 1532: NGTOSUtil.xmlAddAttribute(xmlRoot, "dateformat", VEnvironmentHelpers.mySite.dateFormat());
Line 1533: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_destination", CVinetApplication.App.Translator.translate("provide_destination"));
Line 1534: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_destination_2", CVinetApplication.App.Translator.translate("provide_destination_for_flight_2"));
Line 1535: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_laterthan", CVinetApplication.App.Translator.translate("departure_date_should_not_be_later_than_return_date"));
Line 1536: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_laterthanprevious", CVinetApplication.App.Translator.translate("departure_date_should_not_be_later_than_that_of_previous_flight"));
Line 1537: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_invaliddepart", CVinetApplication.App.Translator.translate("invalid_depart_date"));
Line 1538: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_invaliddepart_2", CVinetApplication.App.Translator.translate("invalid_depart_date_for_flight_2"));
Line 1539: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_invaliddepart_3", CVinetApplication.App.Translator.translate("invalid_depart_date_for_flight_3"));
Line 1540: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_invalidreturn", CVinetApplication.App.Translator.translate("invalid_return_date"));
Line 1541: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_flight_3", CVinetApplication.App.Translator.translate("you_have_to_provide_values_for_flight_3"));
Line 1542: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_flight", CVinetApplication.App.Translator.translate("Flight"));
Line 1543: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_flight1", CVinetApplication.App.Translator.translate("Flight 1"));
Line 1544: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_flight2", CVinetApplication.App.Translator.translate("Flight 2"));
Line 1545: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_flight3", CVinetApplication.App.Translator.translate("Flight 3 (optional)"));
Line 1546:
Line 1547: bool calSearch = false;
Line 1548: if (CVinetApplication.App.Cache["sabreCalSearch"] != null && CVinetApplication.App.Cache["sabreCalSearch"] == "1") calSearch = true;
Line 1549: if (CVinetApplication.App.Cache["amadeusCalSearch"] != null && CVinetApplication.App.Cache["amadeusCalSearch"] == "1") calSearch = true;
Line 1550:
Line 1551: NGTOSUtil.xmlAddAttribute(xmlRoot, "cal_search", calSearch ? "1" : "0");
Line 1552: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_depart", CVinetApplication.App.Translator.translate("Depart"));
Line 1553: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_return", CVinetApplication.App.Translator.translate("Return"));
Line 1554: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_from", CVinetApplication.App.Translator.translate("From"));
Line 1555: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_to", CVinetApplication.App.Translator.translate("To"));
Line 1556: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_flex", CVinetApplication.App.Translator.translate("dates flexible"));
Line 1557: NGTOSUtil.xmlAddAttribute(xmlRoot, "daydeparture", CVinetApplication.App.Cache.FeMinDepartureDays.ToString());
Line 1558: NGTOSUtil.xmlAddAttribute(xmlRoot, "dayreturn", CVinetApplication.App.Cache["flightreturninterval"] != null ? CVinetApplication.App.Cache["flightreturninterval"] : "7");
Line 1559: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_oneway", CVinetApplication.App.Translator.translate("One-way"));
Line 1560: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_roundtrip", CVinetApplication.App.Translator.translate("Round-trip"));
Line 1561: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_multidest", CVinetApplication.App.Translator.translate("Multi-destination"));
Line 1562: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_invaliddeparture", CVinetApplication.App.Translator.translate("invalid_departure_date"));
Line 1563: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_invalidreturn", CVinetApplication.App.Translator.translate("invalid_return_date"));
Line 1564: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_class", CVinetApplication.App.Translator.translate("flightclass"));
Line 1565: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_airline", CVinetApplication.App.Translator.translate("airline"));
Line 1566: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_direct", CVinetApplication.App.Translator.translate("search_direct_flights_only"));
Line 1567: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_allclass", CVinetApplication.App.Translator.translate("search_all_classes"));
Line 1568: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_allairline", CVinetApplication.App.Translator.translate("search_all_airlines"));
Line 1569: NGTOSUtil.xmlAddAttribute(xmlRoot, "expandadvfo", CVinetApplication.App.Cache["flightAdvOptOpen"] == null || CVinetApplication.App.Cache["flightAdvOptOpen"] != "1" ? "0" : "1");
Line 1570: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_advoption", CVinetApplication.App.Translator.translate("Advanced_flight_options"));
Line 1571: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_pax", CVinetApplication.App.Translator.translate("max_number_of_pax_to_search"));
Line 1572: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_childage", CVinetApplication.App.Translator.translate("provide_child_age"));
Line 1573: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_pax", CVinetApplication.App.Translator.translate("select travelers"));
Line 1574: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_search", CVinetApplication.App.Translator.translate("search"));
Line 1575:
Line 1576: CPaxDisplay pd = new CPaxDisplay("F");
Line 1577:
Line 1578: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxpax", pd.maxPax.ToString());
Line 1579: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", pd.general.minAdultInRoom.ToString());
Line 1580: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", pd.general.maxAdultInRoom.ToString());
Line 1581: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", pd.general.minChildInRoom.ToString());
Line 1582: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", pd.general.maxChildInRoom.ToString());
Line 1583: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", pd.general.minChildAge.ToString());
Line 1584: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", pd.general.maxChildAge.ToString());
Line 1585: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_mininfant", pd.general.minInfantInRoom.ToString());
Line 1586: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxinfant", pd.general.maxInfantInRoom.ToString());
Line 1587: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_adult", pd.general.adult.ToString());
Line 1588: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_child", pd.general.child.ToString());
Line 1589: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_infant", pd.general.infant.ToString());
Line 1590: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_adult", CVinetApplication.App.Translator.translate("feAdult"));
Line 1591: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_child", CVinetApplication.App.Translator.translate("feChild"));
Line 1592: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_infant", CVinetApplication.App.Translator.translate("feInfant"));
Line 1593: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childage", CVinetApplication.App.Cache["childAgeFormatFe"]);
Line 1594: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childexpl", CVinetApplication.App.Translator.translate("feSelectChildAge"));
Line 1595:
Line 1596: for (int i = 0; i < CGlobal.Global.flightTimes.Length; i += 2)
Line 1597: {
Line 1598: XmlNode xmlObj = xmlParams.CreateElement("ftimes");
Line 1599: xmlRoot.AppendChild(xmlObj);
Line 1600:
Line 1601: NGTOSUtil.xmlAddAttribute(xmlObj, "val", CVinetApplication.App.Translator.translate(CGlobal.Global.flightTimes[i]));
Line 1602: NGTOSUtil.xmlAddAttribute(xmlObj, "key", CGlobal.Global.flightTimes[i + 1]);
Line 1603: }
Line 1604:
Line 1605: List<keyValuePair> cabins = CVinetApplication.App.Translator.getCabins();
Line 1606: for (int i = 0; i < cabins.Count; i++)
Line 1607: if (cabins[i].Key.ToString() != "W")
Line 1608: {
Line 1609: XmlNode xmlObj = xmlParams.CreateElement("cabin");
Line 1610: xmlRoot.AppendChild(xmlObj);
Line 1611:
Line 1612: NGTOSUtil.xmlAddAttribute(xmlObj, "val", cabins[i].Value);
Line 1613: NGTOSUtil.xmlAddAttribute(xmlObj, "key", cabins[i].Key.ToString());
Line 1614: }
Line 1615:
Line 1616: List<keyValuePair> airlines = CVinetApplication.App.Translator.getAirlines();
Line 1617: for (int i = 0; i < airlines.Count; i++)
Line 1618: if (airlines[i].Key.ToString() != "DL" || (CVinetApplication.App.SiteCode != "BVE" && CVinetApplication.App.SiteCode != "BVF"))
Line 1619: {
Line 1620: XmlNode xmlObj = xmlParams.CreateElement("airline");
Line 1621: xmlRoot.AppendChild(xmlObj);
Line 1622:
Line 1623: NGTOSUtil.xmlAddAttribute(xmlObj, "val", airlines[i].Value);
Line 1624: NGTOSUtil.xmlAddAttribute(xmlObj, "key", airlines[i].Key.ToString());
Line 1625: }
Line 1626:
Line 1627: return xmlParams;
Line 1628: }
Line 1629:
Line 1630: [WebMethod(Description = "flight deal", EnableSession = true)]
Line 1631: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1632: public XmlDocument flight_deal(int dealid)
Line 1633: {
Line 1634: XmlDocument xmlDeal = new XmlDocument();
Line 1635: xmlDeal.LoadXml("<deal/>");
Line 1636:
Line 1637: NGTOSv3.DB.FlightDeal deal = MainFeHelpers.getFlightDeal(dealid);
Line 1638: if (deal != null) fillFlightDealData(xmlDeal, deal);
Line 1639:
Line 1640: return xmlDeal;
Line 1641: }
Line 1642:
Line 1643: [WebMethod(Description = "flight landing page", EnableSession = true)]
Line 1644: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1645: public XmlDocument flight_landingPage(string code)
Line 1646: {
Line 1647: XmlDocument xmlDeal = new XmlDocument();
Line 1648: xmlDeal.LoadXml("<deal/>");
Line 1649:
Line 1650: NGTOSv3.DB.LandingPage lp = VEnvironmentHelpers.mySite.LandingPage(code);
Line 1651: if (lp != null && lp.GetType() == typeof(NGTOSv3.DB.FlightLandingPage))
Line 1652: {
Line 1653: NGTOSv3.DB.FlightDeal deal = MainFeHelpers.getFlightDeal(lp.DealID);
Line 1654: if (deal != null) fillFlightDealData(xmlDeal, deal);
Line 1655: }
Line 1656:
Line 1657: return xmlDeal;
Line 1658: }
Line 1659:
Line 1660: protected void fillFlightDealData(XmlDocument xmlDeal, NGTOSv3.DB.FlightDeal deal)
Line 1661: {
Line 1662: XmlNode xmlRoot = xmlDeal.SelectSingleNode("deal");
Line 1663:
Line 1664: NGTOSUtil.xmlAddAttribute(xmlRoot, "id", deal.ID.ToString());
Line 1665: NGTOSUtil.xmlAddAttribute(xmlRoot, "passenger", deal.PassengerType);
Line 1666: NGTOSUtil.xmlAddAttribute(xmlRoot, "type", deal.FlightType);
Line 1667: NGTOSUtil.xmlAddAttribute(xmlRoot, "flexiable", deal.DateFlexiable.ToString());
Line 1668: NGTOSUtil.xmlAddAttribute(xmlRoot, "airsource", deal.sourceTypeSqlStr.ToString());
Line 1669: NGTOSUtil.xmlAddAttribute(xmlRoot, "airline", deal.Airline);
Line 1670: NGTOSUtil.xmlAddAttribute(xmlRoot, "cabin", deal.Cabin);
Line 1671: NGTOSUtil.xmlAddAttribute(xmlRoot, "direct", deal.DirectFlight ? "1" : "0");
Line 1672:
Line 1673: string s = "";
Line 1674: for (int i = 0; i < deal.DepartureAirports.Count; i++)
Line 1675: {
Line 1676: s += (i > 0 ? ";" : "") + deal.DepartureAirports[i];
Line 1677:
Line 1678: XmlNode xmlObj = xmlDeal.CreateElement("depar");
Line 1679: xmlRoot.AppendChild(xmlObj);
Line 1680:
Line 1681: NGTOSUtil.xmlAddAttribute(xmlObj, "code", deal.DepartureAirports[i]);
Line 1682: NGTOSUtil.xmlAddAttribute(xmlObj, "name", CVinetApplication.App.Translator.airportName(deal.DepartureAirports[i]));
Line 1683: }
Line 1684:
Line 1685: NGTOSUtil.xmlAddAttribute(xmlRoot, "departureairports", s);
Line 1686:
Line 1687: s = "";
Line 1688: for (int i = 0; i < deal.ArrivalAirports.Count; i++)
Line 1689: {
Line 1690: s += (i > 0 ? ";" : "") + deal.ArrivalAirports[i];
Line 1691:
Line 1692: XmlNode xmlObj = xmlDeal.CreateElement("arrive");
Line 1693: xmlRoot.AppendChild(xmlObj);
Line 1694:
Line 1695: NGTOSUtil.xmlAddAttribute(xmlObj, "code", deal.ArrivalAirports[i]);
Line 1696: NGTOSUtil.xmlAddAttribute(xmlObj, "name", CVinetApplication.App.Translator.airportName(deal.ArrivalAirports[i]));
Line 1697: }
Line 1698:
Line 1699: NGTOSUtil.xmlAddAttribute(xmlRoot, "arriveairports", s);
Line 1700: NGTOSUtil.xmlAddAttribute(xmlRoot, "dstart", deal.DepartureStartDate.ToString("M/d/yy"));
Line 1701: NGTOSUtil.xmlAddAttribute(xmlRoot, "dtime", deal.DepartureTime);
Line 1702: NGTOSUtil.xmlAddAttribute(xmlRoot, "dend", deal.DepartureEndDate.ToString("M/d/yy"));
Line 1703: NGTOSUtil.xmlAddAttribute(xmlRoot, "rtime", deal.ReturnTime);
Line 1704:
Line 1705: s = "";
Line 1706: for (int i = 0; i < 7; i++)
Line 1707: s += (i > 0 ? "," : "") + (deal.departureDays[i] ? "1" : "0");
Line 1708:
Line 1709: NGTOSUtil.xmlAddAttribute(xmlRoot, "ddays", s);
Line 1710:
Line 1711: s = "";
Line 1712: for (int i = 0; i < 7; i++)
Line 1713: s += (i > 0 ? "," : "") + (deal.returnDays[i] ? "1" : "0");
Line 1714:
Line 1715: NGTOSUtil.xmlAddAttribute(xmlRoot, "rdays", s);
Line 1716: NGTOSUtil.xmlAddAttribute(xmlRoot, "minstay", deal.MinStay.ToString());
Line 1717: NGTOSUtil.xmlAddAttribute(xmlRoot, "maxstay", deal.MaxStay.ToString());
Line 1718: }
Line 1719:
Line 1720: [WebMethod(Description = "golf search parameters", EnableSession = true)]
Line 1721: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1722: public XmlDocument golf_searchParameters()
Line 1723: {
Line 1724: XmlDocument xmlParams = new XmlDocument();
Line 1725: xmlParams.LoadXml("<parameters/>");
Line 1726:
Line 1727: XmlNode xmlRoot = xmlParams.SelectSingleNode("parameters");
Line 1728:
Line 1729: NGTOSUtil.xmlAddAttribute(xmlRoot, "lang", CVinetApplication.App.LanguageCode);
Line 1730: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_golf_course", CVinetApplication.App.Translator.translate("golf_course"));
Line 1731: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_destination", CVinetApplication.App.Translator.translate("destination"));
Line 1732: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_location", CVinetApplication.App.Translator.translate("location"));
Line 1733: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_club", CVinetApplication.App.Translator.translate("golf club"));
Line 1734: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_course", CVinetApplication.App.Translator.translate("course"));
Line 1735: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_date", CVinetApplication.App.Translator.translate("play_date_interval"));
Line 1736: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_play_date", CVinetApplication.App.Translator.translate("play_date"));
Line 1737: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_msgplaydate", CVinetApplication.App.Translator.translate("invalid_play_date"));
Line 1738: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_childage", CVinetApplication.App.Translator.translate("provide_child_age"));
Line 1739: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_extent", CVinetApplication.App.Translator.translate("extent"));
Line 1740: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_tee_time", CVinetApplication.App.Translator.translate("tee_time"));
Line 1741: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_golfers", CVinetApplication.App.Translator.translate("select golfers"));
Line 1742: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_holes", CVinetApplication.App.Translator.translate("Number of holes"));
Line 1743: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_all", CVinetApplication.App.Translator.translate("all..."));
Line 1744: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_selectdest", CVinetApplication.App.Translator.translate("select_destination"));
Line 1745: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_selectloc", CVinetApplication.App.Translator.translate("select_location"));
Line 1746: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_allclubs", CVinetApplication.App.Translator.translate("all_clubs"));
Line 1747: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_allcourses", CVinetApplication.App.Translator.translate("all_courses"));
Line 1748: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_exactdate", CVinetApplication.App.Translator.translate("exact_date"));
Line 1749: NGTOSUtil.xmlAddAttribute(xmlRoot, "imageurl", CGlobal.Global.hostFolder + "/image");
Line 1750: NGTOSUtil.xmlAddAttribute(xmlRoot, "countrycode", CVinetApplication.App.Cache["feDefCountry"] != null ? CVinetApplication.App.Cache["feDefCountry"] : "");
Line 1751: NGTOSUtil.xmlAddAttribute(xmlRoot, "fextend", CVinetApplication.App.Cache.FeSearchExtentYear.ToString());
Line 1752: NGTOSUtil.xmlAddAttribute(xmlRoot, "min", CVinetApplication.App.Cache.FeMinDepartureDays.ToString());
Line 1753: NGTOSUtil.xmlAddAttribute(xmlRoot, "dplus", CVinetApplication.App.Cache["feGolfSearchDPlus"] != null ? CVinetApplication.App.Cache["feGolfSearchDPlus"] : "6");
Line 1754: NGTOSUtil.xmlAddAttribute(xmlRoot, "location", CVinetApplication.App.Cache["showLOConsearch"] != null ? CVinetApplication.App.Cache["showLOConsearch"] : "1");
Line 1755: NGTOSUtil.xmlAddAttribute(xmlRoot, "dateformat", VEnvironmentHelpers.mySite.dateFormat());
Line 1756: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_search", CVinetApplication.App.Translator.translate("search"));
Line 1757:
Line 1758: CPaxDisplay pd = new CPaxDisplay("G");
Line 1759:
Line 1760: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxpax", pd.maxPax.ToString());
Line 1761: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", pd.general.minAdultInRoom.ToString());
Line 1762: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", pd.general.maxAdultInRoom.ToString());
Line 1763: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", pd.general.minChildInRoom.ToString());
Line 1764: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", pd.general.maxChildInRoom.ToString());
Line 1765: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", pd.general.minChildAge.ToString());
Line 1766: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", pd.general.maxChildAge.ToString());
Line 1767: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_adult", pd.general.adult.ToString());
Line 1768: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_child", pd.general.child.ToString());
Line 1769: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_adult", CVinetApplication.App.Translator.translate("feAdult"));
Line 1770: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_child", CVinetApplication.App.Translator.translate("feChild"));
Line 1771: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childage", CVinetApplication.App.Cache["childAgeFormatFe"]);
Line 1772: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childexpl", CVinetApplication.App.Translator.translate("feSelectChildAge"));
Line 1773:
Line 1774: for (int i = 0; i < CGlobal.Global.golfTeeTimes.Length; i += 2)
Line 1775: {
Line 1776: XmlNode xmlObj = xmlParams.CreateElement("time");
Line 1777: xmlRoot.AppendChild(xmlObj);
Line 1778:
Line 1779: NGTOSUtil.xmlAddAttribute(xmlObj, "val", CVinetApplication.App.Translator.translate(CGlobal.Global.golfTeeTimes[i]));
Line 1780: NGTOSUtil.xmlAddAttribute(xmlObj, "key", CGlobal.Global.golfTeeTimes[i + 1]);
Line 1781: }
Line 1782:
Line 1783: List<int> holes = SearchDataHelpers.GetGolfData(CVinetApplication.App.SiteCode).holes();
Line 1784: for (int i = 0; i < holes.Count; i++)
Line 1785: {
Line 1786: XmlNode xmlObj = xmlParams.CreateElement("hole");
Line 1787: xmlRoot.AppendChild(xmlObj);
Line 1788:
Line 1789: NGTOSUtil.xmlAddAttribute(xmlObj, "val", holes[i].ToString());
Line 1790: }
Line 1791:
Line 1792: return xmlParams;
Line 1793: }
Line 1794:
Line 1795: [WebMethod(Description = "golf deal", EnableSession = true)]
Line 1796: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1797: public XmlDocument golf_deal(int dealid)
Line 1798: {
Line 1799: XmlDocument xmlDeal = new XmlDocument();
Line 1800: xmlDeal.LoadXml("<deal/>");
Line 1801:
Line 1802: NGTOSv3.DB.GolfDeal deal = MainFeHelpers.getGolfDeal(dealid);
Line 1803: if (deal != null) fillGolfDealData(xmlDeal, deal);
Line 1804:
Line 1805: return xmlDeal;
Line 1806: }
Line 1807:
Line 1808: [WebMethod(Description = "golf landing page", EnableSession = true)]
Line 1809: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1810: public XmlDocument golf_landingPage(string code)
Line 1811: {
Line 1812: XmlDocument xmlDeal = new XmlDocument();
Line 1813: xmlDeal.LoadXml("<deal/>");
Line 1814:
Line 1815:
Line 1816: NGTOSv3.DB.LandingPage lp = VEnvironmentHelpers.mySite.LandingPage(code);
Line 1817: if (lp != null && lp.GetType() == typeof(NGTOSv3.DB.GolfLandingPage))
Line 1818: {
Line 1819: NGTOSv3.DB.GolfDeal deal = MainFeHelpers.getGolfDeal(lp.DealID);
Line 1820: if (deal != null) fillGolfDealData(xmlDeal, deal);
Line 1821: }
Line 1822:
Line 1823: return xmlDeal;
Line 1824: }
Line 1825:
Line 1826: protected void fillGolfDealData(XmlDocument xmlDeal, NGTOSv3.DB.GolfDeal deal)
Line 1827: {
Line 1828: XmlNode xmlRoot = xmlDeal.SelectSingleNode("deal");
Line 1829:
Line 1830: NGTOSUtil.xmlAddAttribute(xmlRoot, "id", deal.ID.ToString());
Line 1831: NGTOSUtil.xmlAddAttribute(xmlRoot, "passenger", deal.PassengerType);
Line 1832: NGTOSUtil.xmlAddAttribute(xmlRoot, "type", deal.Package ? "P" : "N");
Line 1833: NGTOSUtil.xmlAddAttribute(xmlRoot, "start", deal.PlayStart.ToString("M/d/yy"));
Line 1834: NGTOSUtil.xmlAddAttribute(xmlRoot, "end", deal.PlayEnd.ToString("M/d/yy"));
Line 1835:
Line 1836: string s = "";
Line 1837: for (int i = 0; i < 7; i++)
Line 1838: s += (i > 0 ? "," : "") + (deal.playDays[i] ? "1" : "0");
Line 1839:
Line 1840: NGTOSUtil.xmlAddAttribute(xmlRoot, "pdays", s);
Line 1841: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", deal.MinAdult.ToString());
Line 1842: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", deal.MaxAdult.ToString());
Line 1843: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", deal.MinChild.ToString());
Line 1844: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", deal.MaxChild.ToString());
Line 1845:
Line 1846: CPaxDisplay pd = new CPaxDisplay("G");
Line 1847:
Line 1848: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", pd.general.minChildAge.ToString());
Line 1849: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", pd.general.maxChildAge.ToString());
Line 1850: }
Line 1851:
Line 1852: [WebMethod(Description = "product search parameters", EnableSession = true)]
Line 1853: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1854: public XmlDocument product_searchParameters()
Line 1855: {
Line 1856: XmlDocument xmlParams = new XmlDocument();
Line 1857: xmlParams.LoadXml("<parameters/>");
Line 1858:
Line 1859: XmlNode xmlRoot = xmlParams.SelectSingleNode("parameters");
Line 1860:
Line 1861: NGTOSUtil.xmlAddAttribute(xmlRoot, "imageurl", CGlobal.Global.hostFolder + "/image");
Line 1862: NGTOSUtil.xmlAddAttribute(xmlRoot, "lang", CVinetApplication.App.LanguageCode);
Line 1863: NGTOSUtil.xmlAddAttribute(xmlRoot, "dateformat", VEnvironmentHelpers.mySite.dateFormat());
Line 1864: NGTOSUtil.xmlAddAttribute(xmlRoot, "fextend", CVinetApplication.App.Cache.FeSearchExtentYear.ToString());
Line 1865: NGTOSUtil.xmlAddAttribute(xmlRoot, "min", CVinetApplication.App.Cache.FeMinDepartureDays.ToString());
Line 1866: NGTOSUtil.xmlAddAttribute(xmlRoot, "maxstay", CVinetApplication.App.Cache["feMaxSearchDuration"] != null ? CVinetApplication.App.Cache["feMaxSearchDuration"] : "14");
Line 1867: NGTOSUtil.xmlAddAttribute(xmlRoot, "countrycode", CVinetApplication.App.Cache["feDefCountry"] != null ? CVinetApplication.App.Cache["feDefCountry"] : "");
Line 1868: NGTOSUtil.xmlAddAttribute(xmlRoot, "promobox", CVinetApplication.App.Cache["showPromotionBox"] != null ? CVinetApplication.App.Cache["showPromotionBox"] : "0");
Line 1869: NGTOSUtil.xmlAddAttribute(xmlRoot, "location", CVinetApplication.App.Cache["showLOConsearch"] != null ? CVinetApplication.App.Cache["showLOConsearch"] : "1");
Line 1870: NGTOSUtil.xmlAddAttribute(xmlRoot, "meal", CVinetApplication.App.Cache["showMPonsearch"] != null ? CVinetApplication.App.Cache["showMPonsearch"] : "0");
Line 1871: NGTOSUtil.xmlAddAttribute(xmlRoot, "expandadvfo", CVinetApplication.App.Cache["flightAdvOptOpen"] != null ? CVinetApplication.App.Cache["flightAdvOptOpen"] : "0");
Line 1872: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_origin", CVinetApplication.App.Translator.translate("provide_origin"));
Line 1873: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_destination", CVinetApplication.App.Translator.translate("provide_destinaton"));
Line 1874: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_location", CVinetApplication.App.Translator.translate("provide_location"));
Line 1875: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_theme", CVinetApplication.App.Translator.translate("provide_theme"));
Line 1876: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_checkin", CVinetApplication.App.Translator.translate("invalid_checkin_date"));
Line 1877: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_childage", CVinetApplication.App.Translator.translate("provide_child_age"));
Line 1878: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_pax", CVinetApplication.App.Translator.translate("max_number_of_pax_to_search"));
Line 1879: NGTOSUtil.xmlAddAttribute(xmlRoot, "m_roompax", CVinetApplication.App.Translator.translate("max_number_of_pax_in_room"));
Line 1880: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_noair", CVinetApplication.App.Translator.translate("Accommodation only"));
Line 1881: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_origin", CVinetApplication.App.Translator.translate("origin"));
Line 1882: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_class", CVinetApplication.App.Translator.translate("flightclass"));
Line 1883: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_allclass", CVinetApplication.App.Translator.translate("search_all_classes"));
Line 1884: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_airline", CVinetApplication.App.Translator.translate("Airline"));
Line 1885: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_allairline", CVinetApplication.App.Translator.translate("search_all_airlines"));
Line 1886: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_direct", CVinetApplication.App.Translator.translate("search_direct_flights_only"));
Line 1887: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_advflightoption", CVinetApplication.App.Translator.translate("Advanced_flight_options"));
Line 1888: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_bydest", CVinetApplication.App.Translator.translate("By destination"));
Line 1889: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_bytheme", CVinetApplication.App.Translator.translate("By theme"));
Line 1890: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_promotionbox", CVinetApplication.App.Translator.translate("Promotion code"));
Line 1891: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_promotion", CVinetApplication.App.Translator.translate("Promotion code"));
Line 1892: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_destination", CVinetApplication.App.Translator.translate("destination_theme"));
Line 1893: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_destination2", CVinetApplication.App.Translator.translate("destination"));
Line 1894: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_selectdestination", CVinetApplication.App.Translator.translate("hs_select_destination") != "hs_select_destination" ? CVinetApplication.App.Translator.translate("hs_select_destination") : "");
Line 1895: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_selectlocation", CVinetApplication.App.Translator.translate("select_location"));
Line 1896: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_location", CVinetApplication.App.Translator.translate("location"));
Line 1897: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_alllocation", CVinetApplication.App.Translator.translate("all_locations"));
Line 1898: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_selecttheme", CVinetApplication.App.Translator.translate("select_theme"));
Line 1899: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_checkin2", CVinetApplication.App.Translator.translate("checkin_title"));
Line 1900: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_checkin", CVinetApplication.App.Translator.translate("checkin_date"));
Line 1901: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_theme", CVinetApplication.App.Translator.translate("theme"));
Line 1902: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_pax", CVinetApplication.App.Translator.translate("select travelers"));
Line 1903: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_search", CVinetApplication.App.Translator.translate("search"));
Line 1904: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_mealprefered", CVinetApplication.App.Translator.translate("meal plan prefered"));
Line 1905: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_meal", CVinetApplication.App.Translator.translate("meal plan"));
Line 1906: NGTOSUtil.xmlAddAttribute(xmlRoot, "t_allmeal", CVinetApplication.App.Translator.translate("all plans"));
Line 1907:
Line 1908: CPaxDisplay pd = new CPaxDisplay("H");
Line 1909:
Line 1910: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minroom", pd.minRoom.ToString());
Line 1911: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxroom", pd.maxRoom.ToString());
Line 1912: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxpax", pd.maxPax.ToString());
Line 1913: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxpaxroom", pd.general.maxPaxInRoom.ToString());
Line 1914: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", pd.general.minAdultInRoom.ToString());
Line 1915: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", pd.general.maxAdultInRoom.ToString());
Line 1916: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", pd.general.minChildInRoom.ToString());
Line 1917: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", pd.general.maxChildInRoom.ToString());
Line 1918: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", pd.general.minChildAge.ToString());
Line 1919: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", pd.general.maxChildAge.ToString());
Line 1920: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_mininfant", pd.general.minInfantInRoom.ToString());
Line 1921: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxinfant", pd.general.maxInfantInRoom.ToString());
Line 1922: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_room", pd.room.ToString());
Line 1923: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_adult", pd.general.adult.ToString());
Line 1924: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_child", pd.general.child.ToString());
Line 1925: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_infant", pd.general.infant.ToString());
Line 1926: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_adult", CVinetApplication.App.Translator.translate("feAdult"));
Line 1927: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_child", CVinetApplication.App.Translator.translate("feChild"));
Line 1928: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_infant", CVinetApplication.App.Translator.translate("feInfant"));
Line 1929: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_rooms", CVinetApplication.App.Translator.translate("feRooms"));
Line 1930: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_room", CVinetApplication.App.Cache["roomFormatFe"]);
Line 1931: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childage", CVinetApplication.App.Cache["childAgeFormatFe"]);
Line 1932: NGTOSUtil.xmlAddAttribute(xmlRoot, "pt_childexpl", CVinetApplication.App.Translator.translate("feSelectChildAge"));
Line 1933:
Line 1934: List<keyValuePair> cabins = CVinetApplication.App.Translator.getCabins();
Line 1935: for (int i = 0; i < cabins.Count; i++)
Line 1936: if (cabins[i].Key.ToString() != "W")
Line 1937: {
Line 1938: XmlNode xmlObj = xmlParams.CreateElement("cabin");
Line 1939: xmlRoot.AppendChild(xmlObj);
Line 1940:
Line 1941: NGTOSUtil.xmlAddAttribute(xmlObj, "val", cabins[i].Value);
Line 1942: NGTOSUtil.xmlAddAttribute(xmlObj, "key", cabins[i].Key.ToString());
Line 1943: }
Line 1944:
Line 1945: List<keyValuePair> airlines = CVinetApplication.App.Translator.getAirlines();
Line 1946: for (int i = 0; i < airlines.Count; i++)
Line 1947: {
Line 1948: XmlNode xmlObj = xmlParams.CreateElement("airline");
Line 1949: xmlRoot.AppendChild(xmlObj);
Line 1950:
Line 1951: NGTOSUtil.xmlAddAttribute(xmlObj, "val", airlines[i].Value);
Line 1952: NGTOSUtil.xmlAddAttribute(xmlObj, "key", airlines[i].Key.ToString());
Line 1953: }
Line 1954:
Line 1955: List<OptionStrCode> mp = SearchDataHelpers.GetAccommodationData(CVinetApplication.App.SiteCode).mealPlans();
Line 1956: for (int i = 0; i < mp.Count; i++)
Line 1957: {
Line 1958: XmlNode xmlObj = xmlParams.CreateElement("meal");
Line 1959: xmlRoot.AppendChild(xmlObj);
Line 1960:
Line 1961: NGTOSUtil.xmlAddAttribute(xmlObj, "val", mp[i].name);
Line 1962: NGTOSUtil.xmlAddAttribute(xmlObj, "key", mp[i].code);
Line 1963: }
Line 1964:
Line 1965: return xmlParams;
Line 1966: }
Line 1967:
Line 1968: [WebMethod(Description = "product deal", EnableSession = true)]
Line 1969: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1970: public XmlDocument product_deal(int dealid)
Line 1971: {
Line 1972: XmlDocument xmlDeal = new XmlDocument();
Line 1973: xmlDeal.LoadXml("<deal/>");
Line 1974:
Line 1975: NGTOSv3.DB.QuickProductDeal deal = MainFeHelpers.getProductDeal(dealid);
Line 1976: if (deal != null) fillProductDealData(xmlDeal, deal);
Line 1977:
Line 1978: return xmlDeal;
Line 1979: }
Line 1980:
Line 1981: [WebMethod(Description = "product landing page", EnableSession = true)]
Line 1982: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 1983: public XmlDocument product_landingPage(string code)
Line 1984: {
Line 1985: XmlDocument xmlDeal = new XmlDocument();
Line 1986: xmlDeal.LoadXml("<deal/>");
Line 1987:
Line 1988: NGTOSv3.DB.LandingPage lp = VEnvironmentHelpers.mySite.LandingPage(code);
Line 1989: if (lp != null && lp.GetType() == typeof(NGTOSv3.DB.QuickProductLandingPage))
Line 1990: {
Line 1991: NGTOSv3.DB.QuickProductDeal deal = MainFeHelpers.getProductDeal(lp.DealID);
Line 1992: if (deal != null) fillProductDealData(xmlDeal, deal);
Line 1993: }
Line 1994:
Line 1995: return xmlDeal;
Line 1996: }
Line 1997:
Line 1998: protected void fillProductDealData(XmlDocument xmlDeal, NGTOSv3.DB.QuickProductDeal deal)
Line 1999: {
Line 2000: XmlNode xmlRoot = xmlDeal.SelectSingleNode("deal");
Line 2001:
Line 2002: NGTOSUtil.xmlAddAttribute(xmlRoot, "id", deal.ID.ToString());
Line 2003: NGTOSUtil.xmlAddAttribute(xmlRoot, "promo", deal.PromotionCode);
Line 2004: NGTOSUtil.xmlAddAttribute(xmlRoot, "meal", deal.MealCode);
Line 2005: NGTOSUtil.xmlAddAttribute(xmlRoot, "air", deal.FlightOption.ToString());
Line 2006: NGTOSUtil.xmlAddAttribute(xmlRoot, "airsource", deal.FlightSourceStr.ToString());
Line 2007: NGTOSUtil.xmlAddAttribute(xmlRoot, "airline", deal.AirlineCode);
Line 2008: NGTOSUtil.xmlAddAttribute(xmlRoot, "cabin", deal.CabinCode);
Line 2009: NGTOSUtil.xmlAddAttribute(xmlRoot, "direct", deal.DirectFlights ? "1" : "0");
Line 2010: NGTOSUtil.xmlAddAttribute(xmlRoot, "notransfer", deal.NoTransfer ? "1" : "0");
Line 2011:
Line 2012: string s = "";
Line 2013: for (int i = 0; i < deal.DepartureAirports.Count; i++)
Line 2014: {
Line 2015: s += (i > 0 ? ";" : "") + deal.DepartureAirports[i];
Line 2016:
Line 2017: XmlNode xmlObj = xmlDeal.CreateElement("airport");
Line 2018: xmlRoot.AppendChild(xmlObj);
Line 2019:
Line 2020: NGTOSUtil.xmlAddAttribute(xmlObj, "code", deal.DepartureAirports[i]);
Line 2021: NGTOSUtil.xmlAddAttribute(xmlObj, "name", CVinetApplication.App.Translator.airportName(deal.DepartureAirports[i]));
Line 2022: }
Line 2023:
Line 2024: NGTOSUtil.xmlAddAttribute(xmlRoot, "airports", s);
Line 2025: NGTOSUtil.xmlAddAttribute(xmlRoot, "dstart", deal.ProductMinCheckinDate.ToString("M/d/yy"));
Line 2026: NGTOSUtil.xmlAddAttribute(xmlRoot, "dend", deal.ProductMaxCheckinDate.ToString("M/d/yy"));
Line 2027:
Line 2028: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minroom", deal.MinRoom.ToString());
Line 2029: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxroom", deal.MaxRoom.ToString());
Line 2030: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_room", deal.DefaultRoom.ToString());
Line 2031:
Line 2032: NGTOSv3.DB.DealRoom room = deal.Room(0);
Line 2033:
Line 2034: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minadult", room.minAdult.ToString());
Line 2035: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxadult", room.maxAdult.ToString());
Line 2036: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minchild", room.minChild.ToString());
Line 2037: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxchild", room.maxChild.ToString());
Line 2038: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_mininfant", room.minInfant.ToString());
Line 2039: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxinfant", room.maxInfant.ToString());
Line 2040: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_minage", CVinetApplication.App.Cache["minChildAge"]);
Line 2041: NGTOSUtil.xmlAddAttribute(xmlRoot, "p_maxage", CVinetApplication.App.Cache["maxChildAge"]);
Line 2042:
Line 2043: for (int i = 1; i < deal.MaxRoom; i++)
Line 2044: {
Line 2045: NGTOSv3.DB.DealRoom room2 = deal.Room(i);
Line 2046:
Line 2047: if (!room.Equals(room2))
Line 2048: {
Line 2049: XmlNode xmlObj = xmlDeal.CreateElement("room");
Line 2050: xmlRoot.AppendChild(xmlObj);
Line 2051:
Line 2052: NGTOSUtil.xmlAddAttribute(xmlObj, "no", (i + 1).ToString());
Line 2053: NGTOSUtil.xmlAddAttribute(xmlObj, "p_minadult", room2.minAdult.ToString());
Line 2054: NGTOSUtil.xmlAddAttribute(xmlObj, "p_maxadult", room2.maxAdult.ToString());
Line 2055: NGTOSUtil.xmlAddAttribute(xmlObj, "p_minchild", room2.minChild.ToString());
Line 2056: NGTOSUtil.xmlAddAttribute(xmlObj, "p_maxchild", room2.maxChild.ToString());
Line 2057: NGTOSUtil.xmlAddAttribute(xmlObj, "p_mininfant", room2.minInfant.ToString());
Line 2058: NGTOSUtil.xmlAddAttribute(xmlObj, "p_maxinfant", room2.maxInfant.ToString());
Line 2059: }
Line 2060: }
Line 2061: }
Line 2062:
Line 2063: [WebMethod(Description = "meals", EnableSession = true)]
Line 2064: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 2065: public XmlDocument meals(string countryCode, int resortCode, int hotelCode)
Line 2066: {
Line 2067: return meals(CVinetApplication.App, countryCode, resortCode, hotelCode);
Line 2068: }
Line 2069:
Line 2070: [WebMethod(Description = "meals on site", EnableSession = true)]
Line 2071: [ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
Line 2072: public XmlDocument mealsOnSite(string siteCode, string countryCode, int resortCode, int hotelCode)
Line 2073: {
Line 2074: return meals(CVinetApplication.AppForSite(siteCode), countryCode, resortCode, hotelCode);
Line 2075: }
Line 2076:
Line 2077: private XmlDocument meals(CVinetApplication app, string countryCode, int resortCode, int hotelCode)
Line 2078: {
Line 2079: if (hotelCode != 0) resortCode = app.Translator.hotelResortCode(hotelCode);
Line 2080: if (resortCode != 0) countryCode = app.Translator.resortCountryCode(resortCode);
Line 2081:
Line 2082: XmlDocument xmlMeal = new XmlDocument();
Line 2083: xmlMeal.LoadXml("<meal/>");
Line 2084:
Line 2085: XmlNode xmlRoot = xmlMeal.SelectSingleNode("meal");
Line 2086:
Line 2087: VSite site = VEnvironmentHelpers.Site(app.SiteCode);
Line 2088:
Line 2089: if (site != null)
Line 2090: {
Line 2091: List<OptionStrCode> ms = SearchDataHelpers.GetAccommodationData(site.Code).mealPlans(countryCode, resortCode: resortCode, hotelCode: hotelCode);
Line 2092:
Line 2093: for (int i = 0; i < ms.Count; i++)
Line 2094: {
Line 2095: XmlNode xmlObj = xmlMeal.CreateElement("itm");
Line 2096: xmlRoot.AppendChild(xmlObj);
Line 2097:
Line 2098: XmlAttribute xmlAttr = xmlMeal.CreateAttribute("name");
Line 2099: xmlAttr.Value = ms[i].name;
Line 2100: xmlObj.Attributes.Append(xmlAttr);
Line 2101:
Line 2102: xmlAttr = xmlMeal.CreateAttribute("code");
Line 2103: xmlAttr.Value = ms[i].code;
Line 2104: xmlObj.Attributes.Append(xmlAttr);
Line 2105: }
Line 2106: }
Line 2107:
Line 2108: return xmlMeal;
Line 2109: }
Line 2110: }
Line 2111:
Line 2112:
Line 2113:
Line 2114: #line default
Line 2115: #line hidden
Line 2116:
|