/// <summary> /// Adds a new credit object to the collection with the specified source type and score values. /// </summary> /// <param name="sourceType">The credit repository source type.</param> /// <param name="creditScore">The credit score.</param> /// <returns>The position of the addition in the collection</returns> public int Add(MISMO.Enums.CreditRepositorySourceType sourceType, short creditScore) { AUS.CreditScore credscore = new AUS.CreditScore(_borrower); credscore.CreditRepositorySourceType = (short)sourceType; credscore.CreditScoreValue = creditScore; return(this.Add(credscore)); }
/// <summary> /// Adds a new credit object to the collection with the specified source type and score values. /// </summary> /// <param name="sourceType">The credit repository source type.</param> /// <param name="creditScore">The credit score.</param> /// <returns>The position of the addition in the collection</returns> public int Add(MISMO.Enums.CreditRepositorySourceType sourceType, short creditScore) { AUS.CreditScore credscore = new AUS.CreditScore(_borrower); credscore.CreditRepositorySourceType = (short) sourceType; credscore.CreditScoreValue = creditScore; return this.Add(credscore); }
/// <summary> /// Adds an AUS credit score object to the collection of credit scores for the borrower. /// </summary> /// <param name="creditScore">An AUS credit score object.</param> /// <returns>The position of the addition in the collection.</returns> public int Add(AUS.CreditScore creditScore) { if (!Object.ReferenceEquals(creditScore._borrower, this._borrower)) { creditScore._borrower = _borrower; } return(this.Add(creditScore as MISMO.Entities.CreditScoreBase)); }
/// <summary> /// Gets the first credit score from the collection by the specified repository source type. /// </summary> /// <param name="sourceType">The repository source type.</param> /// <returns>An AUS credit score object or null if the repository entry does not exist.</returns> public AUS.CreditScore GetByRepository(MISMO.Enums.CreditRepositorySourceType sourceType) { for (int i = 0, j = this.Count; i < j; i++) { AUS.CreditScore curscore = this[i] as AUS.CreditScore; if (curscore.CreditRepositorySourceType == (short)sourceType) { return(curscore); } } return(null); }
/// <summary> /// Gets or sets the credit score for the specified repository type. /// </summary> /// <remarks> /// If they do not exist, a -1 value is returned. Otherwise, the score itself is returned. /// </remarks> public short this[MISMO.Enums.CreditRepositorySourceType sourceType] { get { AUS.CreditScore score = this.GetByRepository(sourceType); return(score == null ? (short)-1 : score.CreditScoreValue); } set { AUS.CreditScore score = this.GetByRepository(sourceType); if (score == null) { this.Add(sourceType, value); } } }
internal override void SetMembers(ref MISMO.Entities.BorrowerBase data) { // first call up to the base base.SetMembers(ref data); // load up the aliases _aliases = this.GetAliases(); // load up the mailto MISMO.BusinessObjects.MailToCollection mailtocol = this.GetMailToCollection(); if (mailtocol != null && mailtocol.Count > 0) { _mailto = mailtocol[0]; } // load up the residences _residences = this.GetResidences(); // load up the current incomes _currentIncomes = this.GetCurrentIncomeCollection(); // load up the assets MISMO.BusinessObjects.Assets assets = this.GetAssets(); if (assets != null && assets.Count > 0) { MISMO.Entities.AssetBase assetbase = null; AUS.Asset asset = null; for (int i = 0, j = assets.Count; i < j; i++) { asset = new AUS.Asset(); asset._borrower = this; assetbase = assets[i]; asset.SetMembers(ref assetbase); _assets.Add(asset); } } // load up the contact points _contactpoints = this.GetContactPointCollection(); // load up the credit scores MISMO.BusinessObjects.CreditScores cscores = this.GetCreditScores(); if (cscores != null && cscores.Count > 0) { MISMO.Entities.CreditScoreBase csbase = null; AUS.CreditScore cscore = null; for (int i = 0, j = cscores.Count; i < j; i++) { csbase = cscores[i]; cscore = new AUS.CreditScore(this); cscore.SetMembers(ref csbase); _creditscores.Add(cscore); } } // load up declaration MISMO.BusinessObjects.Declarations decls = this.GetDeclarations(); if (decls != null && decls.Count > 0) { MISMO.Entities.DeclarationBase declbase = decls[0]; _declaration = new MISMO.BusinessObjects.AUS.Declaration(); _declaration.SetMembers(ref declbase); } // load up the employers _employers = this.GetEmployers(); // load up the government monitoring MISMO.BusinessObjects.GovernmentMonitoringCollection govmons = this.GetGovernmentMonitoringCollection(); if (govmons != null && govmons.Count > 0) { MISMO.Entities.GovernmentMonitoringBase govbase = govmons[0]; _govmon = new AUS.GovernmentMonitoring(); _govmon.SetMembers(ref govbase); } // load up the liabilities MISMO.BusinessObjects.Liabilities liabs = this.GetLiabilities(); if (liabs != null && liabs.Count > 0) { MISMO.Entities.LiabilityBase liabase = null; AUS.Liability liab = null; for (int i = 0, j = liabs.Count; i < j; i++) { liabase = liabs[i]; liab = new AUS.Liability(); liab._borrower = this; liab.SetMembers(ref liabase); _liabilities.Add(liab); } } // load up the present housing expenses _presentHousingExpenses = this.GetPresentHousingExpenses(); // load up the summaries _summaries = this.GetSummaries(); // recalc the checksum RecalculateChecksum(); }