コード例 #1
0
        public virtual void SaveAdminRole()
        {
            String target = ctx.Post("Name");

            if (strUtil.IsNullOrEmpty(target))
            {
                errors.Add(lang("exName"));
                run(AddAdminRole);
            }
            else
            {
                SiteRole role = new SiteRole();
                role.Name    = target;
                role.GroupId = RoleGroup.Admin;
                roleService.InsertSiteRole(role);
                log(SiteLogString.InsertSiteAdminRole(), role);

                echoToParentPart(lang("opok"));
            }
        }