public override int Add(MISMO.Entities.AssetBase assetBase) { Asset a = assetBase as Asset; if (a != null) { a._borrower = _borrower; } return(base.Add(assetBase)); }
public override void Remove(MISMO.Entities.AssetBase assetBase) { Asset a = assetBase as Asset; if (a != null) { a._borrower = null; } base.Remove(assetBase); }
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(); }