Exemplo n.º 1
0
 public TransformationTreeItem setCopyReport(TransformationTreeItem copy, Service <InputTable, InputTableBrowserData> service)
 {
     if (!this.loop && this.reportOid.HasValue)
     {
         copy.reportOid = service.SaveAsCopy(this.reportOid.Value);
     }
     return(copy);
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Retire un fils
 /// </summary>
 /// <param name="child"></param>
 public void RemoveChild(TransformationTreeItem child)
 {
     child.parent = null;
     childrenListChangeHandler.AddDeleted(child);
     UpdateParents();
 }
Exemplo n.º 7
0
 /// <summary>
 /// Oublier un fils
 /// </summary>
 /// <param name="child"></param>
 public void ForgetChild(TransformationTreeItem child)
 {
     childrenListChangeHandler.forget(child);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Met à jour un fils
 /// </summary>
 /// <param name="child"></param>
 public void UpdateChild(TransformationTreeItem child)
 {
     childrenListChangeHandler.AddUpdated(child);
     UpdateParents();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Rajoute un fils
 /// </summary>
 /// <param name="child"></param>
 public void AddChild(TransformationTreeItem child)
 {
     child.parent = this;
     childrenListChangeHandler.AddNew(child);
     UpdateParents();
 }
Exemplo n.º 10
0
 public void ForgetItem(TransformationTreeItem item)
 {
     itemListChangeHandler.forget(item);
 }
Exemplo n.º 11
0
 public void UpdateItem(TransformationTreeItem item)
 {
     itemListChangeHandler.AddUpdated(item);
 }
Exemplo n.º 12
0
 public void AddItem(TransformationTreeItem item)
 {
     itemListChangeHandler.AddNew(item);
     item.tree = this;
 }