コード例 #1
0
        public override HttpHandlerResult Get()
        {
            var vm = new ConfigurationIndexVM(this);

            vm.Build();
            vm.Load();

            return(Response.View("Configuration\\Index.html", vm));
        }
コード例 #2
0
        public override HttpHandlerResult Post()
        {
            var vm = new ConfigurationIndexVM(this);

            try {
                vm.Restore(Request.FormData());
                vm.Save();

                // TODO: Would be really cool to automatically redirect to the new URI
            }
            catch (Exception error) {
                vm.Errors.Add(error);
            }

            vm.Build();
            return(Response.View("Configuration\\Index.html", vm));
        }