public virtual ActionResult Index()
 {
     return(View(
                ConfigurationEditModel.FromDomain(
                    Configurations.All().First())
                ));
 }
        public virtual ActionResult Index(ConfigurationEditModel c)
        {
            if (!ModelState.IsValid)
            {
                return(View(c));
            }
            var cfg = Configurations.All().First();

            try
            {
                c.Apply(cfg);
                Configurations.Save(cfg);
                Notifier.Notify(
                    Severity.Info,
                    "Configuraton udpated.",
                    "The configuration has been updated. You must either wait for the application to reset (typically at midnight), or manually reseset the application for changes to take immediate effect.",
                    cfg);
                return(this.RedirectToAction(d => d.Index()));
            }
            catch (Exception ex)
            {
                Notifier.Notify(ex);
                return(View(c));
            }
        }
        public virtual ActionResult Index(ConfigurationEditModel c)
        {
            if (!ModelState.IsValid)
			{
				return View(c);
			}
            var cfg = Configurations.All().First();
            try
            {
                c.Apply(cfg);
				Configurations.Save(cfg);
                Notifier.Notify(
                    Severity.Info,
                    "Configuraton udpated.",
                    "The configuration has been updated. You must either wait for the application to reset (typically at midnight), or manually reseset the application for changes to take immediate effect.",
                    cfg);
                return this.RedirectToAction(d => d.Index());
            }
            catch (Exception ex)
            {
				Notifier.Notify(ex);
                return View(c);
            }
        }