public ExperianConsumerData LoadExperianConsumer(int userId, int customerId, int?directorId, long?nServiceLogId) { var stra = new LoadExperianConsumerData(customerId, directorId, nServiceLogId); stra.Execute(); return(stra.Result); }
} // LoadData protected virtual ExperianConsumerData LoadConsumerData() { var lcd = new LoadExperianConsumerData(Args.CustomerID, null, null); lcd.Execute(); return(lcd.Result); } // LoadConsumerData
} // AreLoadedValid private bool IsThinFile() { var experianConsumer = new LoadExperianConsumerData(CustomerID, null, null); experianConsumer.Execute(); if ((experianConsumer.Result.ServiceLogId == null) || (experianConsumer.Result.Cais.Count < 1)) { Log.Debug("No Consumer Data or CAIS details data not found: this is a thin file."); return(true); } // if return(false); } // IsThinFile
public void TestLoadExperianConsumer() { var s = new LoadExperianConsumerData(20323, null, 110285); s.Execute(); Console.WriteLine(s.Result.ToString()); Assert.IsNotNull(s.Result); s = new LoadExperianConsumerData(17254, null, null); s.Execute(); Console.WriteLine(s.Result.ToString()); Assert.IsNotNull(s.Result); s = new LoadExperianConsumerData(110285, 1014, null); s.Execute(); Console.WriteLine(s.Result.ToString()); Assert.IsNotNull(s.Result); }
} // constructor public Approval Init() { using (this.trail.AddCheckpoint(ProcessCheckpoints.Initializtion)) { var stra = new LoadExperianConsumerData(this.trail.CustomerID, null, null); stra.Execute(); this.experianConsumerData = stra.Result; if (this.customer == null) { this.isBrokerCustomer = false; } else { this.isBrokerCustomer = this.customer.Broker != null; } bool hasLtd = (this.customer != null) && (this.customer.Company != null) && (this.customer.Company.TypeOfBusiness.Reduce() == TypeOfBusinessReduced.Limited) && (this.customer.Company.ExperianRefNum != "NotFound"); if (hasLtd) { var limited = new LoadExperianLtd(this.customer.Company.ExperianRefNum, 0); limited.Execute(); this.companyDissolutionDate = limited.Result.DissolutionDate; this.directors = new List <Name>(); foreach (ExperianLtdDL72 dataRow in limited.Result.GetChildren <ExperianLtdDL72>()) { this.directors.Add(new Name(dataRow.FirstName, dataRow.LastName)); } foreach (ExperianLtdDLB5 dataRow in limited.Result.GetChildren <ExperianLtdDLB5>()) { this.directors.Add(new Name(dataRow.FirstName, dataRow.LastName)); } } // if this.hmrcNames = new List <NameForComparison>(); this.db.ForEachRowSafe( names => { if (!names["BelongsToCustomer"]) { return; } var name = new NameForComparison(names["BusinessName"]); if (name.AdjustedName != string.Empty) { this.hmrcNames.Add(name); } }, "GetHmrcBusinessNames", CommandSpecies.StoredProcedure, new QueryParameter("CustomerId", this.trail.CustomerID) ); SafeReader sr = this.db.GetFirst( "GetExperianMinMaxConsumerDirectorsScore", CommandSpecies.StoredProcedure, new QueryParameter("CustomerId", this.trail.CustomerID), new QueryParameter("Now", Now) ); if (!sr.IsEmpty) { this.minExperianScore = sr["MinExperianScore"]; } var oScore = new QueryParameter("CompanyScore") { Type = DbType.Int32, Direction = ParameterDirection.Output, }; var oDate = new QueryParameter("IncorporationDate") { Type = DbType.DateTime2, Direction = ParameterDirection.Output, }; this.db.ExecuteNonQuery( "GetCompanyScoreAndIncorporationDate", CommandSpecies.StoredProcedure, new QueryParameter("CustomerId", this.trail.CustomerID), new QueryParameter("TakeMinScore", true), oScore, oDate ); int nScore; if (int.TryParse(oScore.SafeReturnedValue, out nScore)) { this.minCompanyScore = nScore; } this.m_oSecondaryImplementation.Init(); } // using timer step return(this); } // Init