Ejemplo n.º 1
0
 protected PlannedIncome(Guid id, string name, string description, decimal bill, DateTime transactionDateTime,
                         IncomeType type)
 {
     Id          = id;
     Name        = name;
     Description = description;
     SetBill(bill);
     Type = type;
     TransactionDateTime = transactionDateTime;
     CreatedAt           = DateTime.UtcNow;
 }
Ejemplo n.º 2
0
        public void AddIncomeType(string name, string description)
        {
            var type = GetIncomeType(name);

            if (type != null)
            {
                throw new Exception(); // TODO
            }

            _incomeTypes.Add(IncomeType.Create(name, description));
        }
Ejemplo n.º 3
0
        public void AddPlannedIncome(Guid id, string name, string description, decimal bill,
                                     DateTime transactionDateTime, IncomeType type)
        {
            var income = GetPlannedIncome(id);

            if (income != null)
            {
                throw new Exception(); // TODO
            }

            _plannedIncomes.Add(PlannedIncome.Create(id, name, description, bill, transactionDateTime, type));
        }
Ejemplo n.º 4
0
 public static PlannedIncome Create(Guid id, string name, string description, decimal bill, DateTime transactionDateTime,
                                    IncomeType type)
 => new PlannedIncome(id, name, description, bill, transactionDateTime, type);