private async Task SendFeedback() { //if (!string.IsNullOrEmpty(_Feedback)) // { OrderMaster_Class oc = new OrderMaster_Class(); oc.Order_Id = orderMaster_Class_Data.Order_Id; oc.Feedback = _Feedback; JObject result = await _IAllDataServices.SaveFeedBack(oc); if (result != null) { string type = result["Type"].ToString(); if (type == "1") { await App.Current.MainPage.DisplayAlert("Success!", (string)result["ResponseMessage"], "Ok"); var ChackPriousPage = _INavigation.NavigationStack.Where(x => x.Title == "UpComing Request Detail").FirstOrDefault(); if (ChackPriousPage != null) { _INavigation.RemovePage(ChackPriousPage); } var secondChackPriousPage = _INavigation.NavigationStack.Where(x => x.Title == "UpComing Request").FirstOrDefault(); if (secondChackPriousPage != null) { _INavigation.RemovePage(secondChackPriousPage); } await _INavigation.PushAsync(new UpComingStockRequestPage()); } else { await App.Current.MainPage.DisplayAlert("Oops!", (string)result["ResponseMessage"], "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please Refresh Page And try Again....", "Ok"); } // } //else //{ // _Feedback = ""; // await App.Current.MainPage.DisplayAlert("Oops!", "Please fill Feedback......", "Ok"); //} }
async Task Send() { try { if (HasErrors) { ScrollToControlProperty(GetFirstInvalidPropertyName); } else { if (!string.IsNullOrEmpty(FranchiseFeedback_Class_Data._Title) && !string.IsNullOrEmpty(FranchiseFeedback_Class_Data._Description)) { var Wait = UserDialogs.Instance.Loading("Wait...", null, null, true, MaskType.Black); Wait.Show(); JObject result = await _IAllDataServices.SaveFeedBack(FranchiseFeedback_Class_Data); if (result != null) { string type = result["Type"].ToString(); if (type == "1") { await App.Current.MainPage.DisplayAlert("Success!", (string)result["ResponseMessage"], "Ok"); var ChackPriousPage = _INavigation.NavigationStack.Where(x => x.Title == "Feedback").FirstOrDefault(); if (ChackPriousPage != null) { _INavigation.RemovePage(ChackPriousPage); } await _INavigation.PushAsync(new FeedbackPage()); } else { await App.Current.MainPage.DisplayAlert("Error", (string)result["ResponseMessage"], "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please Refresh Page And try Again....", "Ok"); } Wait.Dispose(); } else { if (string.IsNullOrEmpty(FranchiseFeedback_Class_Data._Title)) { Title = ""; } else if (string.IsNullOrEmpty(FranchiseFeedback_Class_Data._Description)) { Description = ""; } } } } catch (Exception ee) { await App.Current.MainPage.DisplayAlert("Error", ee.Message, "Ok"); } }