Example #1
0
 /// <summary>
 ///     设置根节点
 /// </summary>
 /// <param name="parentAcConfig">父项构型</param>
 public void SetRootId(AcConfig parentAcConfig)
 {
     RootId = parentAcConfig != null ? parentAcConfig.RootId : Id;
     //如果有父项,则从父项中取根节点ID;如果没父项,则根节点为自身
 }
Example #2
0
 /// <summary>
 ///     设置父项
 /// </summary>
 /// <param name="parentAcConfig">父项</param>
 public void SetParentItem(AcConfig parentAcConfig)
 {
     if (parentAcConfig != null)
     {
         ParentId = parentAcConfig.Id;
         SetRootId(parentAcConfig);
     }
     else
     {
         ParentId = null;
         SetRootId(null);
     }
 }