Booking Main Request to save booking main contents
Ejemplo n.º 1
0
 private async Task<bool> BookingMainAsync(WebApiBookingMainRequest webApiRequest)
 {
     string orderContents = Newtonsoft.Json.JsonConvert.SerializeObject(webApiRequest);
     HttpResponseMessage responseMessage = await PostHttpRequestAsync(orderContents, new Uri(SetBookingMaineUri)).ConfigureAwait(false);
     if (responseMessage.IsSuccessStatusCode)
     {
         await responseMessage.Content.ReadAsStringAsync();
         return true;
     }
     await responseMessage.Content.ReadAsStringAsync();
     return false;
 }
Ejemplo n.º 2
0
 public ActionResult Services(WebApiBookingMainRequest bookingMain)
 {
      webApiService.SaveBookingMain(bookingMain);
      return Json(new
      {
          message = "Booking successfully saved!"
      });
 }
Ejemplo n.º 3
0
 /// <summary>
 /// To add the booking on server
 /// </summary>
 public bool SaveBookingMain(WebApiBookingMainRequest bookingMain)
 {
    return BookingMainAsync(bookingMain).Result;
 }