public virtual void RemoveLoanRequestEvaluation(LoanRequestEvaluation loanRequestEvaluation) { LoanRequestEvaluations.Remove (loanRequestEvaluation); }
/// <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; } }
public virtual void AddLoanRequestEvaluation(LoanRequestEvaluation loanRequestEvaluation) { loanRequestEvaluation.LoanRequest = this; LoanRequestEvaluations.Add (loanRequestEvaluation); }