コード例 #1
0
        private async void OnDeleteCurrency(Currency currency)
        {
            if (_accessUtility.HasAccess(30))
            {
                var x = await _currencysService.GetExchangeRateAsync(currency.CurrencyId);

                if (x == true)
                {
                    Error(".امکان حذف وجود ندارد");
                }
                else
                {
                    if (Deleting())
                    {
                        try
                        {
                            await _currencysService.DeleteCurrencyAsync(currency.CurrencyId);

                            Currencies.Remove(currency);
                            Deleted();
                        }
                        catch (Exception ex)
                        {
                            Failed(ex);
                        }
                    }
                }
            }
        }