示例#1
0
 public virtual void RemoveLoanRequestEvaluation(LoanRequestEvaluation loanRequestEvaluation)
 {
     LoanRequestEvaluations.Remove (loanRequestEvaluation);
 }
示例#2
0
        /// <summary>
        /// Creates a new Loan Request Evaluations
        /// </summary>
        /// <param name="loanRequest">loanRequest</param>
        /// <param name="evaluations">evaluations</param>
        public void CreateNewLoanRequestEvaluations(LoanRequest loanRequest, string[,] evaluations)
        {
            try
            {
                //Clear the existing evaluations
                loanRequest.LoanRequestEvaluations.Clear ();

                for (int i = 0; i < evaluations.GetLength (0); i++)
                {
                    ZiblerBusinessObjects.Loans.LoanRequestEvaluation newEvaluation
                    = new LoanRequestEvaluation ();
                    newEvaluation.Concept = evaluations[i,0];
                    newEvaluation.Complies = Convert.ToBoolean (evaluations[i,1]);

                    //Add the evaluation
                    loanRequest.AddLoanRequestEvaluation (newEvaluation);
                }

                if (loanRequest.MiscLoanRequestInformation.CreditReportRating
                    == "-Seleccione una opción-")
                {
                    throw new ZiblerBusinessComponentsException (
                        Resources.LoanRequestOperationsMsgNoCreditScoreSelected);
                }

                //Since the status was updated, then we call this function to make sure
                //all the other data is ok.
                UpdateLoanRequestInformation (loanRequest.Client.FinancialInstitution.Name,
                                              loanRequest);
            }
            /* 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;
            }
        }
示例#3
0
 public virtual void AddLoanRequestEvaluation(LoanRequestEvaluation loanRequestEvaluation)
 {
     loanRequestEvaluation.LoanRequest = this;
     LoanRequestEvaluations.Add (loanRequestEvaluation);
 }