예제 #1
0
        public void Add(FinanceNote note)
        {
            var financeNotes = GetAll().ToList();

            financeNotes.Add(note);
            File.WriteAllText(_connectionString, JsonSerializer.Serialize(financeNotes));
        }
예제 #2
0
        public void AddExpenseNote(decimal financeAmount)
        {
            var note = new FinanceNote
            {
                CreationDate  = DateTime.Now,
                FinanceAmount = -financeAmount,
            };

            _financeNoteRepository.Add(note);
        }
예제 #3
0
        public void AddIncomeNote(decimal financeAmount)
        {
            financeAmount = WithdrawTaxes(financeAmount);

            var note = new FinanceNote
            {
                CreationDate  = DateTime.Now,
                FinanceAmount = -financeAmount,
            };

            _financeNoteRepository.Add(note);
        }
예제 #4
0
 public void Add(FinanceNote note)
 {
     FinanceNotes.Add(note);
 }