public async Task <ActionResult> CurrentBookings() { var currentbookings = await new SearchService(AUTHTOKEN, p_mobileNo).BookingListAsync(); var bookingSearchVM = new BookingSearchDTO(); bookingSearchVM.booking = currentbookings; return(View(bookingSearchVM)); }
public async Task <ActionResult> CurrentBookings(BookingDTO search) { var currentbookings = await new SearchService(AUTHTOKEN, p_mobileNo).SearchCurrentBookingAsync(search); var bookingSearchVM = new BookingSearchDTO(); bookingSearchVM.booking = currentbookings; return(View("SearchBookingHistory", bookingSearchVM)); }
public async Task <ActionResult> CurrentBookings(BookingSearchDTO booking) { var currentbooking = await new SearchService(AUTHTOKEN, p_mobileNo).SearchBookingByDateAsync(booking); var bookingSearchVM = new BookingSearchDTO(); bookingSearchVM.booking = currentbooking; return(View("CurrentBookings", bookingSearchVM)); }
public async Task <ActionResult> CurrentBookings() { var currentbookings = await new SearchService(AUTHTOKEN, p_mobileNo).BookingListAsync(); var bookingSearchVM = new BookingSearchDTO(); bookingSearchVM.booking = currentbookings; var tripMonitor = await GetTripMonitorData(); ViewBag.trips = tripMonitor; return(View(bookingSearchVM)); }
public IHttpActionResult BookingByDate(BookingSearchDTO booking) { try { var bookingresult = new SearchBO().BookingByDate(booking.dates.fromDate, booking.dates.toDate); return(Ok(bookingresult)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public async Task <List <Booking> > SearchBookingByDateAsync(BookingSearchDTO booking) { IRestClient client = new RestClient(ApiBaseUrl); var request = p_request; request.Method = Method.POST; request.Resource = "operation/search/bookingbydate"; request.AddJsonBody(booking); //request.AddParameter("fromDate", fromDate, ParameterType.UrlSegment); //request.AddParameter("toDate", toDate, ParameterType.UrlSegment); return(ServiceResponse(await client.ExecuteTaskAsync <List <Booking> >(request))); }