Exemple #1
0
        /// <summary>
        /// Find bookings based on a partial booking reference
        /// </summary>
        /// <param name="businessId">The business Id for the bookings to consider</param>
        /// <param name="searchCriteria">The partial booking reference</param>
        /// <param name="maxSearchResults">The maximum results that should be returned</param>
        /// <param name="cultureCode">culture code</param>
        /// <returns>
        /// List of bookings that match the criteria
        /// </returns>
        public List<Model.Booking.Booking> FindByPartialBookingReference(long businessId, string searchCriteria, int maxSearchResults, string cultureCode = "")
        {
            cultureCode = string.IsNullOrEmpty(cultureCode) ? ConfigHelper.DefaultCultureCode : cultureCode;

            var bookings = new StoredProcedures.Booking.GetBookingDigestMapper().Execute(new BookingDigestRequest
            {
                CultureCode = cultureCode,
                BusinessId = businessId,
                SearchCriteria = searchCriteria,
            });

            FillInGuestPhones(bookings);

            return bookings;
        }
Exemple #2
0
        /// <summary>
        /// Get Booking data between dates
        /// </summary>
        public List<Model.Booking.Booking> GetBetweenDates(long businessId, DateTime startDate, DateTime endDate, string cultureCode = "")
        {
            cultureCode = string.IsNullOrEmpty(cultureCode) ? ConfigHelper.DefaultCultureCode : cultureCode;

            var bookings = new StoredProcedures.Booking.GetBookingDigestMapper().Execute(new BookingDigestRequest
            {
                CultureCode = cultureCode,
                BusinessId = businessId,
                StartDate = startDate,
                EndDate = endDate
            });

            FillInGuestPhones(bookings);

            return bookings;
        }