예제 #1
0
        protected ExcelFormula GetTopParentFirstEntryFormulas(Guid uid)
        {
            ExcelFormula innerFormulasUnited = new ExcelFormula();

            if (Parent != null)
            {
                return(Parent.GetTopParentFirstEntryFormulas(uid));
            }
            else
            {
                innerFormulasUnited.AddElementsRange(GetInnerFirstEntryFormulas(uid).Elements);
                return(innerFormulasUnited);
            }
        }
예제 #2
0
        //TODO: Похоже на проблему, дублирование функционала
        protected ExcelFormula GetFirstLevelFormulas(Guid uid)
        {
            ExcelFormula innerFormulasUnited = new ExcelFormula();

            if (InnerBlocks != null && InnerBlocks.Count > 0)
            {
                foreach (var innerBlock in InnerBlocks)
                {
                    ExcelFormula innerFormula = innerBlock.GetFormula(uid);
                    innerFormulasUnited.AddElementsRange(innerFormula.Elements);
                }
            }

            return(innerFormulasUnited);
        }