public async Task <OpsBookingSearchRes> GetOpsBookingDetails([FromBody] OpsBookingSearchReq request) { var response = new OpsBookingSearchRes(); try { if (request != null) { var result = await _opsRepository.GetBookingDetails(request); if (result != null && result.Bookings.Count > 0) { response.ResponseStatus.Status = "Success"; response.BookingTotalCount = result.BookingTotalCount; response.Bookings = result.Bookings.ToList(); } else { response.ResponseStatus.Status = "Success"; response.ResponseStatus.ErrorMessage = "No Records Found."; } } else { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "Booking details can not be blank."; } } catch (Exception ex) { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "An error occurs " + ex.Message; } return(response); }
public async Task <OpsBookingSearchRes> GetOpsBookingDetails(OpsBookingSearchReq bookingGetReq, string ticket) { OpsBookingSearchRes HotelsDeptSearchRes = new OpsBookingSearchRes(); HotelsDeptSearchRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceOperations:GetOpsBookingDetails"), bookingGetReq, typeof(OpsBookingSearchRes), ticket); return(HotelsDeptSearchRes); }