public QuarterBalanceDTO CalculateQuarterBalance(int QuarterNum) { int income = this.GetIncomeForQuarter(QuarterNum); int outcome = this.GetOutcomeForQuarter(QuarterNum); QuarterBalanceDTO result = new QuarterBalanceDTO(); result.Income = income; result.Outcome = outcome; return(result); }
public IEnumerable <QuarterBalanceDTO> GetYearBalancePerQuarter() { List <QuarterBalanceDTO> yearBalance = new List <QuarterBalanceDTO>(); for (int i = 1; i <= 4; i++) { QuarterBalanceDTO quarterBalance = new QuarterBalanceDTO(); quarterBalance.Income = this.GetIncomeForQuarter(i); quarterBalance.Outcome = this.GetOutcomeForQuarter(i); yearBalance.Add(quarterBalance); } return(yearBalance); }