public TransformationTreeItem setCopyReport(TransformationTreeItem copy, Service <InputTable, InputTableBrowserData> service) { if (!this.loop && this.reportOid.HasValue) { copy.reportOid = service.SaveAsCopy(this.reportOid.Value); } return(copy); }
public List <TransformationTreeItem> GetAscendentsTree() { List <TransformationTreeItem> entities = new List <TransformationTreeItem>(0); TransformationTreeItem parent = this.parent; while (parent != null) { entities.Add(parent); parent = parent.parent; } return(entities); }
public void ReplaceChild(TransformationTreeItem child) { TransformationTreeItem found = null; foreach (TransformationTreeItem item in this.childrenListChangeHandler.Items) { if (item.oid.HasValue && item.oid.Value == child.oid.Value) { found = item; break; } } if (found != null) { ForgetChild(found); } this.childrenListChangeHandler.originalList.Add(child); this.childrenListChangeHandler.Items.Add(child); }
public List <TransformationTreeItem> GetAscendentsLoopTree(bool addCurrent = false) { List <TransformationTreeItem> entities = new List <TransformationTreeItem>(0); if (addCurrent && this.IsLoop) { entities.Add(this); } TransformationTreeItem parent = this.parent; while (parent != null) { if (parent.IsLoop) { entities.Insert(0, parent); } parent = parent.parent; } return(entities); }
public TransformationTreeItem GetCopy(bool isCutMode = false) { TransformationTreeItem item = new TransformationTreeItem(); item.name = isCutMode ? this.name : "Copy Of " + this.name; item.position = -1; item.parent = null; item.tree = this.tree; item.type = this.type; item.ranking = this.ranking; item.increase = this.increase; item.conditions = this.conditions; item.reportOid = this.reportOid; item.loop = this.loop; item.valueListChangeHandler = new PersistentListChangeHandler <TransformationTreeLoopValue>(); foreach (TransformationTreeLoopValue loopValue in this.valueListChangeHandler.Items) { TransformationTreeLoopValue value = loopValue.GetCopy(); value.loop = item; item.valueListChangeHandler.AddNew(value); } return(item); }
/// <summary> /// Retire un fils /// </summary> /// <param name="child"></param> public void RemoveChild(TransformationTreeItem child) { child.parent = null; childrenListChangeHandler.AddDeleted(child); UpdateParents(); }
/// <summary> /// Oublier un fils /// </summary> /// <param name="child"></param> public void ForgetChild(TransformationTreeItem child) { childrenListChangeHandler.forget(child); }
/// <summary> /// Met à jour un fils /// </summary> /// <param name="child"></param> public void UpdateChild(TransformationTreeItem child) { childrenListChangeHandler.AddUpdated(child); UpdateParents(); }
/// <summary> /// Rajoute un fils /// </summary> /// <param name="child"></param> public void AddChild(TransformationTreeItem child) { child.parent = this; childrenListChangeHandler.AddNew(child); UpdateParents(); }
public void ForgetItem(TransformationTreeItem item) { itemListChangeHandler.forget(item); }
public void UpdateItem(TransformationTreeItem item) { itemListChangeHandler.AddUpdated(item); }
public void AddItem(TransformationTreeItem item) { itemListChangeHandler.AddNew(item); item.tree = this; }