Booking Main Request to save booking main contents
Example #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;
 }
Example #2
0
 public ActionResult Services(WebApiBookingMainRequest bookingMain)
 {
      webApiService.SaveBookingMain(bookingMain);
      return Json(new
      {
          message = "Booking successfully saved!"
      });
 }
Example #3
0
 /// <summary>
 /// To add the booking on server
 /// </summary>
 public bool SaveBookingMain(WebApiBookingMainRequest bookingMain)
 {
    return BookingMainAsync(bookingMain).Result;
 }