public void OnNewAuthNode(object sender, EventArgs e)
        {
            frmAuthNode form = GetAuthNodeForm();

            form.EditMode(false);
            form.AuthId   = "";
            form.AuthName = "";
            if (form.ShowDialog() == DialogResult.OK)
            {
                TreeListNode node = View.TLAuth.AppendNode(new object[] { form.AuthName, form.AuthId }, CurrentAuthNode);
                node.Tag = new AuthorizationNode()
                {
                    Id   = form.AuthId,
                    Name = form.AuthName
                };

                AuthorizationNode authNode = node.Tag as AuthorizationNode;
                if (authNode != null)
                {
                    authNode.AuthorizationUri = View.GetAuthrizationNodePath(node);
                    AuthorizationNodeService.Save(authNode);
                    UpdateRoleAuthorization(authNode);
                }

                node.ImageIndex       = 0;
                node.SelectImageIndex = 1;
                CurrentAuthNode.ExpandAll();
            }
        }
        public void OnEditAuthNode(object sender, EventArgs e)
        {
            frmAuthNode       form     = GetAuthNodeForm();
            AuthorizationNode authNode = CurrentAuthNode.Tag as AuthorizationNode;

            form.EditMode(true);
            form.AuthId   = authNode.Id;
            form.AuthName = authNode.Name;
            if (form.ShowDialog() == DialogResult.OK)
            {
                authNode.Id   = form.AuthId;
                authNode.Name = form.AuthName;
                AuthorizationNodeService.Save(authNode);
                UpdateRoleAuthorization(authNode);
            }
        }