Beispiel #1
0
        public async Task <List <Booking> > SearchBookingAsync(BookingSearchsDTO bookingDTO)
        {
            IRestClient client  = new RestClient(ApiBaseUrl);
            var         request = p_request;

            request.Method   = Method.POST;
            request.Resource = "operation/search/bookingHistory";
            request.AddJsonBody(bookingDTO);

            return(ServiceResponse(
                       await client.ExecuteTaskAsync <List <Booking> >(request)));
        }
        public IHttpActionResult BookingHistorySearch(BookingSearchsDTO bookingDTO)
        {
            try
            {
                var bookingResult = new SearchBO().SearchBookingsHistory(
                    bookingDTO.Datefrom,
                    bookingDTO.DateTo);

                return(Ok(bookingResult));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }