示例#1
0
 private TreeNode AddAuthNode(CAuthType authType, TreeNodeCollection nodes)
 {
     return SkyMap.Net.Tools.Authorization.TreeViewHelper.AddTreeNode(nodes, this.GetAuthTypeNodeText(authType), authType);
 }
示例#2
0
 private CAuthType GetNewAuthType()
 {
     CAuthType type = new CAuthType();
     type.Name = "新的权限管理";
     this.currentUnitOfWork.RegisterNew(type);
     this.currentUnitOfWork.Commit();
     return type;
 }
示例#3
0
 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);
 }
示例#4
0
 private string GetAuthTypeNodeText(CAuthType authType)
 {
     if (authType == null)
     {
         throw new ArgumentNullException();
     }
     return authType.Name;
 }
示例#5
0
 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;
 }