Ejemplo n.º 1
0
 public void SetLastRow(ExcelTransaction value)
 {
     if (this.Transactions.Count == 0)
     {
         return;
     }
     this.Transactions[this.Transactions.Count - 1] = value;
 }
Ejemplo n.º 2
0
 public bool IsTheSame(ExcelTransaction other)
 {
     if (other == null)
     {
         return(false);
     }
     return(this.ContentId == other.ContentId);
 }
Ejemplo n.º 3
0
 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
     });
 }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 public void AddNewRow(ExcelTransaction row)
 {
     this.Transactions.Add(row);
 }