public ActionResult Change(ChangeConfigurationVm changeViewModel) { ConfigurationManager.AppSettings["SourceLanguage"] = changeViewModel.SourceLanguageId.ToString(); ConfigurationManager.AppSettings["DestinationLanguage"] = changeViewModel.DestinationLanguageId.ToString(); ConfigurationManager.AppSettings["FlipMode"] = changeViewModel.IsFlipModeOn.ToString(); return(RedirectToAction("Index", "Home")); }
public ActionResult Index() { var changeConfigurationVm = new ChangeConfigurationVm { SourceLanguageSelection = GetLanguageSelection(), SourceLanguageId = Guid.Parse(ConfigurationManager.AppSettings["SourceLanguage"]), DestinationLanguageSelection = GetLanguageSelection(), DestinationLanguageId = Guid.Parse(ConfigurationManager.AppSettings["DestinationLanguage"]), IsFlipModeOn = bool.Parse(ConfigurationManager.AppSettings["FlipMode"]) }; return(View(changeConfigurationVm)); }