예제 #1
0
        public ActionResult AccessAnalytics(VMConfigAccessAnalytics args)
        {
            if (!this.ModelState.IsValid)
            {
                return new HttpNotFoundResult();
            }

            BlogConfig config = new BlogConfig();
            config.Name = "google_analytics";
            config.Value = args.GoogleAnalytics;
            List<BlogConfig> configs = new List<BlogConfig> { };
            configs.Add(config);
            bool result = HNKBlogConfigFetcher.UpdateConfigs(AppSettings.GetDbConnectionString(), configs);
            if (!result)
            {
                return new HttpStatusCodeResult(500);
            }

            VMConfigBase model = new VMConfigBase();
            return View("Index", model);
        }
예제 #2
0
 public ActionResult Index()
 {
     VMConfigBase model = new VMConfigBase();
     model.LoadUIElements();
     return View(model);
 }