Ejemplo n.º 1
0
        public async Task <ActionResult> CurrentBookings()
        {
            var currentbookings = await new SearchService(AUTHTOKEN, p_mobileNo).BookingListAsync();
            var bookingSearchVM = new BookingSearchDTO();

            bookingSearchVM.booking = currentbookings;
            return(View(bookingSearchVM));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
 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));
     }
 }
Ejemplo n.º 6
0
        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)));
        }