21 lines
624 B
C#
21 lines
624 B
C#
using System.Linq;
|
|
|
|
namespace EvoCalculator.Core.Calculation.Columns
|
|
{
|
|
public class SumCurrentTLMColumn : BaseColumn<decimal>
|
|
{
|
|
public SumCurrentTLMColumn(int count) : base(count)
|
|
{
|
|
}
|
|
|
|
public void ComputeValues(TLM_GrColumn tlmGrColumn)
|
|
{
|
|
const int FIRST_YEAR_NUM = 13;
|
|
for (var i = 1; i < Values.Length; i++)
|
|
if (i < FIRST_YEAR_NUM)
|
|
Values[i] = tlmGrColumn.Values.Skip(FIRST_YEAR_NUM).Sum(x => x);
|
|
else
|
|
Values[i] = tlmGrColumn.Values.Skip(i + 1).Sum(x => x);
|
|
}
|
|
}
|
|
} |