public IActionResult ChangeDefCurrency(ChangeCurrencyViewModel vm)
        {
            if (ModelState.IsValid)
                currencyService.SetDefaultCurrency(vm.SelectedCurrencyCode);

            return RedirectToAction("Index");
        }
        public IActionResult ChangeCurrency(string currencyCode)
        {
            var currencies = HttpContext.Session.GetObjectFromJson<List<Currency>>("Currencies");
            var curSelVal = currencies.First(x => x.CurrencyCode.Equals(currencyCode)).CurrencyCode;
            var currencyList = new SelectList(currencies, "CurrencyCode", "CurrencyCode", curSelVal);

            var vm = new ChangeCurrencyViewModel(currencyList);
            return View(vm);
        }
        public IActionResult Index(string currencyCode)
        {
            var currencies = HttpContext.Session.GetObjectFromJson<List<Currency>>("Currencies");
            var curSelVal = currencyService.GetDefaultCurrency().CurrencyCode;
            var currencyList = new SelectList(currencies, "CurrencyCode", "CurrencyCode", curSelVal);

            var vm = new ChangeCurrencyViewModel(currencyList);
            return View(vm);
        }
 public IActionResult ChangeCurrency(ChangeCurrencyViewModel vm)
 {
     if (ModelState.IsValid)
     {
         HttpContext.Session.SetString("Currency", vm.SelectedCurrencyCode);
         /*currencyService.SetDefaultCurrency(vm.SelectedCurrencyCode)*/
         ;
         return RedirectToAction("Index");
     }
     else
         return View();
 }