public async void RateItem(int RateNum, string itemId) { if (IsBusy) { return; } try { DialogService.ShowLoading("Please wait"); mRate rate = new mRate() { Rate = RateNum.ToString(), By = AccountService.Instance.Current_Account.Email, Itemid = itemId.ToString() }; var result = await ProductService.Instance.RateProduct(rate); DialogService.HideLoading(); if (result == "true") { Finsih.Add(itemId); DialogService.ShowToast("Thank you for your feedback"); return; } DialogService.ShowError(result); } catch (Exception ex) { Debug.WriteLine(Keys.TAG + ex); DialogService.ShowError(Strings.SomethingWrong); Crashes.TrackError(ex); } finally { IsBusy = false; } }
void OnFinish() { Finsih?.Invoke(this, new EventArgs()); }