private async void ShowUserCurrency() { try { string countryCode = PickerModel.selectedModel.CountryCode; ShowUserCurrencyResponse userCurrencyResponseObj = null; if (IosUtils.IosUtility.IsReachable()) { IosUtility.showProgressHud(""); userCurrencyResponseObj = await WebServiceMethods.GetUserCurrencyFromCountryCode(countryCode); InvokeOnMainThread(() => { if (userCurrencyResponseObj != null && !string.IsNullOrEmpty(userCurrencyResponseObj.CurrencyName)) { TxtCurrency.Text = userCurrencyResponseObj.CurrencyName; } }); IosUtility.hideProgressHud(); } } catch (Exception e) { IosUtility.hideProgressHud(); IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSUnknownError", "LSErrorTitle")); } }
private async void ShowUserCurrency(string countryCode) { try { ShowUserCurrencyResponse userCurrencyResponseObj = null; if (CrossConnectivity.Current.IsConnected) { CustomProgressDialog.ShowProgDialog(mActivity, mActivity.Resources.GetString(Resource.String.loading)); userCurrencyResponseObj = await WebServiceMethods.GetUserCurrencyFromCountryCode(countryCode); if (userCurrencyResponseObj != null && !string.IsNullOrEmpty(userCurrencyResponseObj.CurrencyName)) { edt_currency.Text = userCurrencyResponseObj.CurrencyName; } CustomProgressDialog.HideProgressDialog(); } } catch (Exception e) { CustomProgressDialog.HideProgressDialog(); UtilityDroid.PrintLog(Tag, e.StackTrace.ToString(), Global.ConstantsDroid.LogType.ERROR); } }