private bool HasWithdraw() { bool result = false; if (this.transactions != null) { List <Transaction> withdraws = this.transactions.Where(x => x.amount < 0).ToList(); foreach (Transaction trans in withdraws) { if (trans.GetTransactionDate().Date.AddDays(10) > DateProvider.getInstance().Now().Date) { result = true; } } } return(result); }
public Transaction(double amount) { this.amount = amount; this.transactionDate = DateProvider.getInstance().Now(); }