Exemplo n.º 1
0
        public override HttpHandlerResult Get()
        {
            var qGroupId = GetQuery("id");

            var vm = new SecurityEditGroupVM(this)
            {
                GroupId = qGroupId,
            };

            vm.Build();

            return(Response.View("Security\\EditGroup.html", vm));
        }
Exemplo n.º 2
0
        public override HttpHandlerResult Post()
        {
            var vm = new SecurityEditGroupVM(this);

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

                return(Response.Redirect("security"));
            }
            catch (Exception error) {
                vm.Errors.Add(error);

                vm.Build();

                return(Response.View("Security\\EditGroup.html", vm));
            }
        }