public ActionResult Index(KeyConfigurationInputModel keys)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    keys.Update(this.ConfigurationRepository);
                    TempData["Message"] = Resources.KeyConfigurationController.UpdateSuccessful;
                    return RedirectToAction("Index");
                }
                catch (ValidationException ex)
                {
                    ModelState.AddModelError("", ex.Message);
                }
                catch
                {
                    ModelState.AddModelError("", Resources.KeyConfigurationController.ErrorUpdatingKeys);
                }
            }

            var vm = new KeyConfigurationViewModel(this.ConfigurationRepository.Keys);
            vm.Keys = keys;
            return View("Index", vm);
        }
 public KeyConfigurationViewModel(Models.Configuration.KeyMaterialConfiguration config)
 {
     this.Keys = new KeyConfigurationInputModel(config);
 }
 public KeyConfigurationViewModel(Models.Configuration.KeyMaterialConfiguration config)
 {
     this.Keys = new KeyConfigurationInputModel(config);
 }