private async Task Save() { var Wait = UserDialogs.Instance.Loading("Wait...", Cancel(), "Cancel", true, MaskType.Black); Wait.Show(); if (HasErrors) { // Error message ScrollToControlProperty(GetFirstInvalidPropertyName); } else { if (_Retailer_Collected_Cash_Amount > 0) { if (_Resived_OTP == _OTP) { CashCollection_Class_Data.Collected_CashAmount = _Retailer_Collected_Cash_Amount; JObject result = await _IAllDataServices.SaveCashCollection(CashCollection_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 == "Cash Collection").FirstOrDefault(); if (ChackPriousPage != null) { _INavigation.RemovePage(ChackPriousPage); } await _INavigation.PushAsync(new CashCollectionPage()); } 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"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "OTP is Not Mached...", "Ok"); } } else { await App.Current.MainPage.DisplayAlert("Oops!", "Please fill Amount...", "Ok"); } } Wait.Dispose(); }