Example #1
0
        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 override int GetHashCode()
        {
            int hash = 1;

            if (ProviderID.Length != 0)
            {
                hash ^= ProviderID.GetHashCode();
            }
            if (ProviderUserName.Length != 0)
            {
                hash ^= ProviderUserName.GetHashCode();
            }
            if (ProviderPassword.Length != 0)
            {
                hash ^= ProviderPassword.GetHashCode();
            }
            if (HotelID.Length != 0)
            {
                hash ^= HotelID.GetHashCode();
            }
            if (DevDisableBookingConfirmation != false)
            {
                hash ^= DevDisableBookingConfirmation.GetHashCode();
            }
            if (DisableChannelSynchronization != false)
            {
                hash ^= DisableChannelSynchronization.GetHashCode();
            }
            if (DisableCancellation != false)
            {
                hash ^= DisableCancellation.GetHashCode();
            }
            if (DisableAmendment != false)
            {
                hash ^= DisableAmendment.GetHashCode();
            }
            if (EnablePricingConnection != false)
            {
                hash ^= EnablePricingConnection.GetHashCode();
            }
            return(hash);
        }
Example #3
0
        //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);
        }