Пример #1
0
 public void DepositSavingValue(Budget budget, Expense expense, decimal value, DateTime date)
 {
     throw new NotImplementedException();
 }
Пример #2
0
        public virtual SavingValue Deposit(Expense depositSource, decimal value, DateTime date, string description = null)
        {
            SavingValue newSavingValue = new SavingValue
                            {
                                Date        = date,
                                Value       = value,
                                Saving      = this,
                                Description = description,
                                Expense     = depositSource,
                            };
            if (depositSource != null)
            {
                newSavingValue.Budget = depositSource.Budget;
                newSavingValue.UpdateDescription();
            }

            Values.Add(newSavingValue);

            return newSavingValue;
        }
Пример #3
0
        public static Expense CreateExpense(Budget budget, CashFlow flow, decimal value, string description, DateTime date)
        {
            var expense = new Expense
            {
                Description = description,
                Date        = date,
                Budget      = budget,
            };

            expense._value = value;
            expense._flow  = flow;

            if (flow.Saving != null)
            {
                expense.SavingValue = flow.Saving.Deposit(expense, value, date, description);
            }

            return expense;
        }
Пример #4
0
 public virtual void RemoveExpense(Expense expense)
 {
     Expenses.Remove(expense);
 }
Пример #5
0
 public void DepositSavingValue(Budget budget, Expense expense, decimal value, DateTime date)
 {
     throw new NotImplementedException();
 }