public static SiteSettingsViewModel LoadSiteSettings(WebDataContext context)
        {
            var model = new SiteSettingsViewModel
            {
                Settings = context.SiteSettings.FirstOrDefault(),
                RolesList = Roles.GetAllRoles().ToList()
            };

            var configs = context.Configurations;
            foreach (var config in configs)
            {
               model.ConfigSettings.Add(config.Key, config.Value);
            }

            return model;
        }
示例#2
0
        public static SiteSettingsViewModel LoadSiteSettings(WebDataContext context)
        {
            var model = new SiteSettingsViewModel
            {
                Settings  = context.SiteSettings.FirstOrDefault(),
                RolesList = Roles.GetAllRoles().ToList()
            };

            var configs = context.Configurations;

            foreach (var config in configs)
            {
                model.ConfigSettings.Add(config.Key, config.Value);
            }

            return(model);
        }
        public ActionResult SiteSettings()
        {
            var model = new SiteSettingsViewModel();

            return View(model);
        }