public int CompareTo(TransactionAdapter other)
        {
            if (0 != Amount.CompareTo(other.Amount))
            {
                return(Amount.CompareTo(other.Amount));
            }
            if (0 != Originator.CompareTo(other.Originator))
            {
                return(Originator.CompareTo(other.Originator));
            }
            if (0 != BeneficiaryName.CompareTo(other.BeneficiaryName))
            {
                return(BeneficiaryName.CompareTo(other.BeneficiaryName));
            }
            if (0 != BeneficiaryAccount.CompareTo(other.BeneficiaryAccount))
            {
                return(BeneficiaryAccount.CompareTo(other.BeneficiaryAccount));
            }
            if (0 != Currency.CompareTo(other.Currency))
            {
                return(Currency.CompareTo(other.Currency));
            }
            if (0 != ExecutionDate.CompareTo(other.ExecutionDate))
            {
                return(ExecutionDate.CompareTo(other.ExecutionDate));
            }
            if (0 != RemittanceInfo.CompareTo(other.RemittanceInfo))
            {
                return(RemittanceInfo.CompareTo(other.RemittanceInfo));
            }

            return(Transaction.CompareTo(other.Transaction));
        }
예제 #2
0
        public int CompareTo(Transaction other)
        {
            if (0 != Amount.CompareTo(other.Amount))
            {
                return(Amount.CompareTo(other.Amount));
            }
            if (0 != Originator.CompareTo(other.Originator))
            {
                return(Originator.CompareTo(other.Originator));
            }
            if (0 != Beneficiary.CompareTo(other.Beneficiary))
            {
                return(Beneficiary.CompareTo(other.Beneficiary));
            }
            if (0 != RequestedExecutionDate.CompareTo(other.RequestedExecutionDate))
            {
                return(RequestedExecutionDate.CompareTo(other.RequestedExecutionDate));
            }
            if (0 != RemittanceInfo.CompareTo(other.RemittanceInfo))
            {
                return(RemittanceInfo.CompareTo(other.RemittanceInfo));
            }

            return(0);
        }
예제 #3
0
 public Transaction()
 {
     TransactionId          = ++NextTransactionId;
     IsSelected             = true;
     Originator             = new Originator();
     Beneficiary            = new Beneficiary();
     Amount                 = new Amount();
     RequestedExecutionDate = DateTime.Today.ToString(Constants.DateFormat);
     RemittanceInfo         = new RemittanceInfo();
 }
예제 #4
0
        public object Clone()
        {
            Transaction clone = new Transaction();

            clone.IsSelected             = IsSelected;
            clone.Amount                 = (Amount)Amount.Clone();
            clone.Beneficiary            = (Beneficiary)Beneficiary.Clone();
            clone.Originator             = (Originator)Originator.Clone();
            clone.RequestedExecutionDate = RequestedExecutionDate;
            clone.RemittanceInfo         = (RemittanceInfo)RemittanceInfo.Clone();

            return(clone);
        }