Example #1
0
 /// <summary>
 /// Logs an account's loss.
 /// </summary>
 /// <param name="account">The sender's account.</param>
 /// <param name="amount">The amount of currency.</param>
 /// <param name="message">An optional message for the transaction.</param>
 public void Loss(BankAccount account, long amount, string message = "")
 {
     Write("{0} lost {1}{2}", account.AccountName, BankMain.FormatMoney(amount),
           String.IsNullOrWhiteSpace(message) ? "" : " with the message \"" + message + "\"");
 }
Example #2
0
 /// <summary>
 /// Logs a payment transaction to the log.
 /// </summary>
 /// <param name="sender">The sender's account.</param>
 /// <param name="receiver">The receiver's account.</param>
 /// <param name="amount">The amount of currency.</param>
 /// <param name="message">An optional message for the transaction.</param>
 public void Payment(BankAccount sender, BankAccount receiver, long amount, string message = "")
 {
     Write("{0} paid {1} to {2}{3}", sender.AccountName, BankMain.FormatMoney(amount), receiver.AccountName,
           String.IsNullOrWhiteSpace(message) ? "" : " with the message \"" + message + "\"");
 }