예제 #1
0
        public async Task <IActionResult> CurrencyDelete(Guid currencyId)
        {
            var currency = await dataManager.FetchCurrency(currencyId);

            if (currency != null)
            {
                await dataManager.DeleteCurrency(currency);

                this.AlertWarning(string.Format(
                                      sr["The currency {0} was successfully deleted."],
                                      currency.Title)
                                  , true);
            }

            return(RedirectToAction("CurrencyList"));
        }
예제 #2
0
        public async Task <IActionResult> CurrencyDelete(Guid currencyGuid)
        {
            ICurrency currency = await dataManager.FetchCurrency(currencyGuid);

            if (currency != null)
            {
                bool result = await dataManager.DeleteCurrency(currency);

                if (result)
                {
                    this.AlertWarning(string.Format(
                                          "The currency <b>{0}</b> was successfully deleted.",
                                          currency.Title)
                                      , true);
                }
            }

            return(RedirectToAction("CurrencyList"));
        }