Example #1
0
        public void Add(AccountTransaction transaction, bool updateParent = true)
        {
            var position = this.positionsByCurrencyId[transaction.CurrencyId];
            if (position == null)
            {
                position = new AccountPosition(transaction);
                this.positionsByCurrencyId[position.CurrencyId] = position;
                Positions.Add(position);
            }
            else
            {
                position.Add(transaction);
            }

            Transactions.Add(transaction);
            if (updateParent && UpdateParent)
                Parent?.Add(transaction.DateTime, transaction.Value, transaction.CurrencyId, transaction.Text, updateParent);
        }
Example #2
0
        public void Add(AccountTransaction transaction, bool updateParent = true)
        {
            var position = this.positionsByCurrencyId[transaction.CurrencyId];

            if (position == null)
            {
                position = new AccountPosition(transaction);
                this.positionsByCurrencyId[position.CurrencyId] = position;
                Positions.Add(position);
            }
            else
            {
                position.Add(transaction);
            }

            Transactions.Add(transaction);
            if (updateParent && UpdateParent)
            {
                Parent?.Add(transaction.DateTime, transaction.Value, transaction.CurrencyId, transaction.Text, updateParent);
            }
        }
Example #3
0
 public void Add(AccountTransaction transaction)
 {
     Value += transaction.Value;
 }
Example #4
0
 public AccountPosition(AccountTransaction transaction)
     : this(transaction.CurrencyId, transaction.Value)
 {
 }
Example #5
0
 public void Add(AccountTransaction transaction)
 {
     Value += transaction.Value;
 }
Example #6
0
 public AccountPosition(AccountTransaction transaction)
     : this(transaction.CurrencyId, transaction.Value)
 {
 }