Esempio n. 1
0
        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"));
        }
Esempio n. 2
0
        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));
        }