public JsonResult AcceptRejectQuote(AcceptRejectQuoteModel model) { model.UserId = Convert.ToInt64(Session["UserId"]); var status = propertyService.AcceptRejectQuote(model); return(Json("Success", JsonRequestBehavior.AllowGet)); }
public IHttpActionResult AcceptRejectQuote(AcceptRejectQuoteModel model) { var status = propertyService.AcceptRejectQuote(model); return(this.Ok(new { status = status, message = propertyService.message, })); }
private async void AcceptrejectQuote(bool notificationStatusvalue, NotificationsModel item) { try { IsLoaderBusy = true; //await App.Current.MainPage.Navigation.PushPopupAsync(new LoaderPopup()); AcceptRejectQuoteModel request = new AcceptRejectQuoteModel() { is_accept = notificationStatusvalue, job_request_id = item.job_request_id.Value, notification_id = item.id, user_id = user_id }; AcceptRejectQuoteResponseModel response; try { response = await _webApiRestClient.PostAsync <AcceptRejectQuoteModel, AcceptRejectQuoteResponseModel>(ApiUrl.AcceptRejectQuote, request); } catch (Exception ex) { response = null; IsLoaderBusy = false; //LoaderPopup.CloseAllPopup(); await MaterialDialog.Instance.SnackbarAsync(ex.Message, 3000); return; } if (response != null) { await MaterialDialog.Instance.SnackbarAsync(response.message, 3000); if (response.status) { Getnotification(); } } } catch (Exception ex) { } finally { IsLoaderBusy = false; //LoaderPopup.CloseAllPopup(); } }