Ejemplo n.º 1
0
        /// <summary>
        /// Get SECOM bank account by specific payment type
        /// </summary>
        /// <param name="paymentType"></param>
        /// <returns></returns>
        private List <doSECOMAccount> ICS010_GetSECOMAccountByPaymentType(string paymentType)
        {
            IMasterHandler        masterHandler  = ServiceContainer.GetService <IMasterHandler>() as IMasterHandler;
            List <doSECOMAccount> doSECOMAccount = null;

            if (paymentType == PaymentType.C_PAYMENT_TYPE_AUTO_TRANSFER)
            {
                //return auto transfer bank
                doSECOMAccount = masterHandler.GetSECOMAccountAutoTransfer();
            }
            else if (paymentType == PaymentType.C_PAYMENT_TYPE_PROMISSORY_NOTE ||
                     paymentType == PaymentType.C_PAYMENT_TYPE_CHEQUE_POST_DATED)
            {
                //return dummy bank
                doSECOMAccount = masterHandler.GetSECOMAccountDummyTransfer();
            }
            else if (string.IsNullOrEmpty(paymentType))
            {
                //no bank
                doSECOMAccount = new List <doSECOMAccount>();
            }
            else
            {
                //return bank transfer bank
                doSECOMAccount = masterHandler.GetSECOMAccountBankTransfer();
            }
            return(doSECOMAccount);
        }