public void AddBill(IBill bill, IAccount account) { if (bill == null) { return; } account.AddBill(bill); Save(bill); }
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); }
public void AddBill(IBill bill, IAccount account) { AssignRecordIdToBill(bill); account.AddBill(bill); Bills.Add(bill); }