/// <summary>
        /// Creates a new Loan Request Transaction Log Entry
        /// </summary>
        /// <param name="loanRequest">loanRequest</param>
        /// <param name="transactionLog">transactionLog entry</param>
        public void CreateNewLoanRequestTransactionLogEntry(LoanRequest loanRequest,
            TransactionLogEntry transactionLog)
        {
            try
            {
                //Verify we are in a valid state
                if (loanRequest.LoanRequestStatus != LoanRequestStatus.Aprobada
                    && loanRequest.LoanRequestStatus != LoanRequestStatus.Corriente
                    && loanRequest.LoanRequestStatus != LoanRequestStatus.Vencida
                    && loanRequest.LoanRequestStatus != LoanRequestStatus.ExtraJudicial
                    && loanRequest.LoanRequestStatus != LoanRequestStatus.JudicialAltoRiesgo
                    && loanRequest.LoanRequestStatus != LoanRequestStatus.Pagada)
                {
                    throw new ZiblerBusinessComponentsException (
                        Resources.LoanRequestOperationsMsgCannotAddTransactionLogEntry);
                }

                /* Not that this will actually get all entries in the database for the Entry Logs */
                loanRequest.AddTransactionLogEntry (transactionLog);
            }
            /* If the exception was thrown here, just pass it up */
            catch (ZiblerBusinessComponentsException ex)
            {
                throw;
            }
            /* Catch any Data Layer or other exception and throw an unkown exception */
            catch (Exception ex)
            {
                ZiblerBusinessComponentsUnknownException exc
                = new ZiblerBusinessComponentsUnknownException (ex);

                /* Throw the new exception */
                throw exc;
            }
        }
Exemple #2
0
 public virtual void AddTransactionLogEntry(TransactionLogEntry transactionLogEntry)
 {
     transactionLogEntry.LoanRequest = this;
     TransactionLogEntries.Add (transactionLogEntry);
 }