public TWS_HotelDetailsV3 Execute(HotelID[] hotelCode) { //instantiate HotelFlowClient _hotelflowClient = new HotelFlowClient(); //search Hotels var sreq = _hotelflowClient.GetHotelDetailsV3(GetHeader(),hotelCode, GetFeature()); //close instance _hotelflowClient.Close(); return sreq; }
public TWS_HotelDetailsV3 Execute(HotelID[] hotelCode) { //instantiate HotelFlowClient _hotelflowClient = new HotelFlowClient(); //search Hotels var sreq = _hotelflowClient.GetHotelDetailsV3(GetHeader(), hotelCode, GetFeature()); //close instance _hotelflowClient.Close(); return(sreq); }
//public ActionResult SearchDestination() //{ // //Auth Header // Common.hotelDestSvc.LoginHeader loginHdr = new Common.hotelDestSvc.LoginHeader(); // loginHdr.username = "******"; // loginHdr.password = "******"; // loginHdr.culture = Common.hotelDestSvc.Culture.en_US; // loginHdr.version = "7.123"; // //DestinationRequest drq = new DestinationRequest(); // //drq.LoginHeader = loginHdr; // //drq.Destination = new Destination() { Continent = "North America" }; // //Search Destination Request // DestinationContractsClient dclient = new DestinationContractsClient(); // Destination dst = new Destination(); // dst.Continent = "North America"; // dst.Country = "United States"; // dst.State = "New York"; // dst.City = "New York City"; // try // { // DestinationResult destResult = dclient.GetDestination(loginHdr, dst); // dclient.Close(); // } // catch (Exception ex) // { // } // return View(); //} //NOTE: skipped using this method in POC - GetHotelDetailsV3 could be combined with CheckAvailabilityAndPrices to show more details public ActionResult GetHotelInfo(FormCollection collection) { //AuthHeader Common.hotelflowSvc.AuthenticationHeader auth = new AuthenticationHeader(); auth.LoginName = "Tra105"; auth.Password = "******"; var hotelIds = new HotelID[] { new HotelID { id = Convert.ToInt32(collection["hotelCode"]) } }; HotelFlowClient client = new HotelFlowClient(); TWS_HotelDetailsV3 sreq = client.GetHotelDetailsV3(auth, hotelIds, new Feature[] { new Feature { name = "OriginalImageSize", value = "true" } }); client.Close(); ViewBag.StartDate = collection["startDate"]; ViewBag.EndDate = collection["endDate"]; //return View("HotelInfo", sreq); return(View("HotelDisplay", sreq)); }
//public ActionResult SearchDestination() //{ // //Auth Header // Common.hotelDestSvc.LoginHeader loginHdr = new Common.hotelDestSvc.LoginHeader(); // loginHdr.username = "******"; // loginHdr.password = "******"; // loginHdr.culture = Common.hotelDestSvc.Culture.en_US; // loginHdr.version = "7.123"; // //DestinationRequest drq = new DestinationRequest(); // //drq.LoginHeader = loginHdr; // //drq.Destination = new Destination() { Continent = "North America" }; // //Search Destination Request // DestinationContractsClient dclient = new DestinationContractsClient(); // Destination dst = new Destination(); // dst.Continent = "North America"; // dst.Country = "United States"; // dst.State = "New York"; // dst.City = "New York City"; // try // { // DestinationResult destResult = dclient.GetDestination(loginHdr, dst); // dclient.Close(); // } // catch (Exception ex) // { // } // return View(); //} //NOTE: skipped using this method in POC - GetHotelDetailsV3 could be combined with CheckAvailabilityAndPrices to show more details public ActionResult GetHotelInfo(FormCollection collection) { //AuthHeader Common.hotelflowSvc.AuthenticationHeader auth = new AuthenticationHeader(); auth.LoginName = "Tra105"; auth.Password = "******"; var hotelIds = new HotelID[] { new HotelID { id = Convert.ToInt32(collection["hotelCode"]) } }; HotelFlowClient client = new HotelFlowClient(); TWS_HotelDetailsV3 sreq = client.GetHotelDetailsV3(auth, hotelIds, new Feature[] { new Feature { name = "OriginalImageSize", value = "true" } }); client.Close(); ViewBag.StartDate = collection["startDate"]; ViewBag.EndDate = collection["endDate"]; //return View("HotelInfo", sreq); return View("HotelDisplay", sreq); }