Esempio n. 1
0
        public ActionResult Settings(Models.NewsSettings settings)
        {
            ModuleContext.Configuration.ModuleSettings["DTNWidgets_Setting1"] = settings.Setting1.ToString();
            ModuleContext.Configuration.ModuleSettings["DTNWidgets_Setting2"] = settings.Setting2.ToUniversalTime().ToString("u");

            return(RedirectToDefaultRoute());
        }
Esempio n. 2
0
        public ActionResult Settings()
        {
            var settings = new Models.NewsSettings();

            settings.Setting1 = ModuleContext.Configuration.ModuleSettings.GetValueOrDefault("DTNWidgets_Setting1", false);
            settings.Setting2 = ModuleContext.Configuration.ModuleSettings.GetValueOrDefault("DTNWidgets_Setting2", System.DateTime.Now);

            return(View(settings));
        }