public void Crediter(double montant) { Solde += montant; Transaction trans = new Transaction(montant, TypeTransaction.Debit); Transactions.Add(trans); OnMonAudit(trans); }
public virtual bool Debiter(double montant) { bool reussite = false; if (montant<=Solde) { Solde -= montant; reussite = true; Transaction trans = new Transaction(montant, TypeTransaction.Debit); Transactions.Add(trans); OnMonAudit(trans); } return reussite; }
private void OnMonAudit(Transaction trans) { if (MonAudit!=null) { MonAudit(this, new MonAuditEventArgs(this.Numero,trans.ToString())); } }