public Mail(long a_id, PaymentMailBox a_mailBox) { id = a_id; mailBox = a_mailBox; payment = mailBox.payments[id]; }
Payment ToPayment(FinAcct account, SwiftStatementLine s) { Payment p = new Payment(); p.Currency = s.Currency; p.Value = (double) s.DecValue; p.EntryDate = s.EntryDate.ToDateTime(); p.ValueDate = s.ValueDate.ToDateTime(); p.EntryText = s.EntryText; p.Name = new string[] { s.PayeePayerName1, s.PayeePayerName2 }.JoinLines(); p.AcctNo = s.PayeePayerAcctNo; p.BankCode = s.PayeePayerBankCode; p.Purpose = s.PaymtPurpose.JoinLines(); p.OwnAcctNo = account.AcctNo; p.OwnBankCode = account.BankCode; return p; }
string OwnName(Payment p) { string id = String.Join("/", new string[] { p.OwnBankCode, p.OwnAcctNo }); if (accountAlias.ContainsKey(id)) { return accountAlias[id]; } else { return String.Format("{0}", id); } }