Пример #1
0
 public JsonResult CancelReschedule(CancelRescheduleRequestModel model)
 {
     try
     {
         ApiResultModel apiresult = new ApiResultModel();
         apiresult = oAppointmentRepository.CancelReschedule(model);
         return(Json(new { Success = true, ApiResultModel = apiresult }));
     }
     catch (System.Web.Http.HttpResponseException ex)
     {
         return(Json(new { Message = ex.Response }));
     }
 }
 public ApiResultModel CancelReschedule(CancelRescheduleRequestModel model)
 {
     try
     {
         var strContent = JsonConvert.SerializeObject(model);
         var response   = ApiConsumerHelper.PostData("api/CancelRescheduleRequest", strContent);
         var result     = JsonConvert.DeserializeObject <ApiResultModel>(response);
         return(result);
     }
     catch (HttpResponseException ex)
     {
         throw ex;
     }
 }