private TreeNode AddAuthNode(CAuthType authType, TreeNodeCollection nodes) { return SkyMap.Net.Tools.Authorization.TreeViewHelper.AddTreeNode(nodes, this.GetAuthTypeNodeText(authType), authType); }
private CAuthType GetNewAuthType() { CAuthType type = new CAuthType(); type.Name = "新的权限管理"; this.currentUnitOfWork.RegisterNew(type); this.currentUnitOfWork.Commit(); return type; }
private void DisplayAuthorization(CAuthType authType) { BinderHelper.DoBinding(new TextBox[] { this.txtAuthName, this.txtTypeCode, this.txtResourceName, this.txtResourceTable, this.txtResourceIdField, this.txtResourceNameField, this.txtAuthTable, this.txtAuthSetClass, this.txtAuthGetClass, this.txtDescription }, authType, new string[] { "Name", "TypeCode", "ResourceName", "ResourceTable", "ResourceIdField", "ResourceNameField", "AuthTable", "AuthSetClass", "AuthGetClass", "Description" }); this.BindingContext[authType].CurrentChanged += new EventHandler(this.AuthDataChanged); }
private string GetAuthTypeNodeText(CAuthType authType) { if (authType == null) { throw new ArgumentNullException(); } return authType.Name; }
private bool CheckAuthType(CAuthType authType) { if ((((StringHelper.IsNull(authType.Name) || StringHelper.IsNull(authType.ResourceIdField)) || (StringHelper.IsNull(authType.ResourceNameField) || StringHelper.IsNull(authType.ResourceTable))) || StringHelper.IsNull(authType.AuthTable)) || StringHelper.IsNull(authType.AuthSetClass)) { return false; } return true; }