Пример #1
0
        //[MultipleButton(Name = "action", Argument = "Tourico")]
        public List <string> GetHotels(FormCollection collection)
        {
            GeoLocation gloc = new GeoLocation();

            gloc.Latitude  = Convert.ToDecimal(collection["lat"]);
            gloc.Longitude = Convert.ToDecimal(collection["lan"]);

            HotelSearchRequestDto searchCriteria = new HotelSearchRequestDto();

            //holds list of hotel ids to search
            var hotelIds = new List <string>();

            //Retrieve from catalog the list of hotel ids, that will be passed to the provider, if the coordinates are specified in the request
            var catalogRequest = new HotelCatalogRequest
            {
                GeoLocation = gloc,
                MinRating   = HotelBedsConstants.MinRating,
                MaxRating   = HotelBedsConstants.MaxRating,
            };

            //HotelSearchManager call to get the provider and search
            //If "Skip Local Cache" is false, then call the catalog manager for local search -- (!request.SkipLocalCache)
            if (true)
            {
                var hotelCatalogManager = new HotelCatalogManager();
                hotelIds = hotelCatalogManager.RetrieveHotelsByLatLongCatalog(catalogRequest);
            }

            return(hotelIds);
        }