示例#1
0
        public void MergeAndReduceBeginningBalances(EquityPeriod that)
        {
            this.DistributeRows();
            that.DistributeRows();

            foreach (InstanceReportRow ebRow in this.EBRows)
            {
                InstanceReportRow bbRow = that.BBRows.Find(bb => IsMatchingRow(ebRow, bb));
                if (bbRow == null)
                {
                    continue;
                }

                for (int c = 0; c < ebRow.Cells.Count; c++)
                {
                    Cell ebCell = ebRow.Cells[c];
                    Cell bbCell = bbRow.Cells[c];
                    if (!ebCell.HasData && bbCell.HasData)
                    {
                        Cell newCell = (Cell)bbCell.Clone();
                        ebRow.ReplaceCell(null, c, newCell);
                    }
                }

                that.BBRows.Remove(bbRow);
            }
        }
示例#2
0
        public bool EndDateMatchesBeginDate(EquityPeriod that)
        {
            this.DistributeRows();
            that.DistributeRows();

            if (this.EBRows == null || this.EBRows.Count == 0)
            {
                return(false);
            }

            if (that.BBRows == null || that.BBRows.Count == 0)
            {
                return(false);
            }

            DateTime thisLastDate  = this.EBRows[0].BalanceDate.StartDate;
            DateTime thatFirstDate = that.BBRows[0].BalanceDate.StartDate;

            if (DateTime.Equals(thisLastDate, thatFirstDate))
            {
                return(true);
            }

            return(false);
        }
示例#3
0
        public bool EndDateMatchesBeginDate( EquityPeriod that )
        {
            this.DistributeRows();
            that.DistributeRows();

            if( this.EBRows == null || this.EBRows.Count == 0 )
                return false;

            if( that.BBRows == null || that.BBRows.Count == 0 )
                return false;

            DateTime thisLastDate = this.EBRows[ 0 ].BalanceDate.StartDate;
            DateTime thatFirstDate = that.BBRows[ 0 ].BalanceDate.StartDate;
            if( DateTime.Equals( thisLastDate, thatFirstDate ) )
                return true;

            return false;
        }
示例#4
0
        public void MergeAndReduceBeginningBalances( EquityPeriod that )
        {
            this.DistributeRows();
            that.DistributeRows();

            foreach( InstanceReportRow ebRow in this.EBRows )
            {
                InstanceReportRow bbRow = that.BBRows.Find( bb => IsMatchingRow( ebRow, bb ) );
                if( bbRow == null )
                    continue;

                for( int c = 0; c < ebRow.Cells.Count; c++ )
                {
                    Cell ebCell = ebRow.Cells[ c ];
                    Cell bbCell = bbRow.Cells[ c ];
                    if( !ebCell.HasData && bbCell.HasData )
                    {
                        Cell newCell = (Cell)bbCell.Clone();
                        ebRow.ReplaceCell( null, c, newCell );
                    }
                }

                that.BBRows.Remove( bbRow );
            }
        }