/// <summary> /// Init values for Revenue Account Spinner /// </summary> private async void InitTaxRatesSpinnerValues() { try { if (CrossConnectivity.Current.IsConnected) { CustomProgressDialog.ShowProgDialog(mActivity, mActivity.Resources.GetString(Resource.String.loading)); string countryCode = string.IsNullOrEmpty(revAccOrderResponseObj.CountryCode) ? ledgerObj.CountryCode : revAccOrderResponseObj.CountryCode; showTaxRatesResponseList = await WebServiceMethods.ShowTaxRates(countryCode); CustomProgressDialog.HideProgressDialog(); } _taxRatesSpinnerItemModelList = new List <SpinnerItemModel>(); for (int i = 0; i < showTaxRatesResponseList.Count; i++) { SpinnerItemModel item = new SpinnerItemModel { Id = (i + 1) + "", TEXT = showTaxRatesResponseList[i].TaxRatePercent + "", STATE = false, EXTRA_TEXT = showTaxRatesResponseList[i].TaxID + "" }; _taxRatesSpinnerItemModelList.Add(item); } SetTaxRatesSpinnerAdapter(); } catch (Exception e) { CustomProgressDialog.HideProgressDialog(); UtilityDroid.PrintLog(Tag, e.StackTrace.ToString(), Global.ConstantsDroid.LogType.ERROR); } }