Esempio n. 1
0
        public void AddBill(IBill bill, IAccount account)
        {
            if (bill == null)
            {
                return;
            }

            account.AddBill(bill);
            Save(bill);
        }
Esempio n. 2
0
        private void GenerateNewBill(IAccount account)
        {
            List <IBill> bills     = account.GetBills().ToList();
            int          lastIndex = bills.Count;
            IBill        lastBill  = bills[lastIndex - 1];
            IBill        newBill   = new Bill();

            newBill.RecordId           = 0;
            newBill.DateOwed           = lastBill.DateOwed.AddMonths(1);
            newBill.MonthlyPayment     = lastBill.MonthlyPayment;
            newBill.Paid               = false;
            newBill.ConfirmationNumber = "";
            account.AddBill(newBill);
        }
Esempio n. 3
0
 public void AddBill(IBill bill, IAccount account)
 {
     AssignRecordIdToBill(bill);
     account.AddBill(bill);
     Bills.Add(bill);
 }