public void SetLastRow(ExcelTransaction value) { if (this.Transactions.Count == 0) { return; } this.Transactions[this.Transactions.Count - 1] = value; }
public bool IsTheSame(ExcelTransaction other) { if (other == null) { return(false); } return(this.ContentId == other.ContentId); }
ExcelTransaction GetNewGroupedTransaction(ExcelTransaction currentTransaction, DateTime endDate) { return(new ExcelTransaction() { AccountingDate = endDate, Sum = currentTransaction.Sum, Currency = currentTransaction.Currency, GroupId = currentTransaction.GroupId, TagNames = currentTransaction.TagNames, TagGroupId = currentTransaction.TagGroupId }); }
public void StoreCurrentGroupedTransaction(ExcelTransaction currentTransaction, string groupId) { var endDate = this.GetEndDayDate(currentTransaction.AccountingDate); if (this.GroupDict.ContainsKey(groupId)) // GroupId already exists { this.GroupDict[groupId].Sum += currentTransaction.Sum; } else // GroupId is new { var newGroupedTransaction = this.GetNewGroupedTransaction(currentTransaction, endDate); this.GroupDict.Add(groupId, newGroupedTransaction); } }
public void AddNewRow(ExcelTransaction row) { this.Transactions.Add(row); }