コード例 #1
0
		private void SaveIndividualsToDB(string fileName)
		{
			string connectionString = string.Format(_excelConStr, fileName);
			using (var adapter = new OleDbDataAdapter("SELECT * FROM [INDIVIDUALS$]", connectionString))
			{
				using (var ds = new DataSet())
				{
					adapter.Fill(ds, "AnyName");
					var data = ds.Tables["AnyName"].AsEnumerable();
					var query = data.Where(x => x.Field<string>("Last Name") != string.Empty).AsQueryable();
					List<Individual> individuals = new List<Individual>();
					foreach (var item in query)
					{
						Individual individual = new Individual();
						individual.AddressLine1 = item["Address Line 1"].ToString();
						individual.AddressLine2 = item["Address Line 2"].ToString();
						individual.AddressLine3 = item["Address Line 3"].ToString();
						individual.Aka = item["aka/dba"].ToString();
						individual.City = item["City"].ToString();
						individual.Comments = item["Comments"].ToString();
						individual.FirstName = item["First Name"].ToString();
						individual.IssuingState = item["Issuing State"].ToString();
						individual.LastName = item["Last Name"].ToString();
						individual.LicenseNumber = item["License Number"].ToString();
						individual.LicenseType = item["License Type"].ToString();
						individual.State = item["State"].ToString();
						individual.Zip = item["Zip"].ToString();
						individuals.Add(individual);
					}
					CCTValidationProvider validationProvider = new CCTValidationProvider();
					validationProvider.SaveExcludedIndividuals(individuals);
				}
			}
		}
コード例 #2
0
		private void SaveCompaniesToDB(string fileName)
		{
			string connectionString = string.Format(_excelConStr, fileName);
			using (var adapter = new OleDbDataAdapter("SELECT * FROM [COMPANIES$]", connectionString))
			{
				using (var ds = new DataSet())
				{
					adapter.Fill(ds, "AnyName");
					var data = ds.Tables["AnyName"].AsEnumerable();
					var query = data.Where(x => x.Field<string>("Company Name") != string.Empty).AsQueryable();
					List<Company> companies = new List<Company>();
					foreach (var item in query)
					{
						Company company = new Company();
						company.AddressLine1 = item["Address Line 1"].ToString();
						company.AddressLine2 = item["Address Line 2"].ToString();
						company.AddressLine3 = item["Address Line 3"].ToString();
						company.Aka = item["aka/dba"].ToString();
						company.City = item["City"].ToString();
						company.Comments = item["Comments"].ToString();
						company.CompanyName = item["Company Name"].ToString();
						company.IssuingState = item["Issuing State"].ToString();
						company.LicenseNumber = item["License Number"].ToString();
						company.State = item["State"].ToString();
						company.Zip = item["Zip"].ToString();
						companies.Add(company);
					}
					CCTValidationProvider validationProvider = new CCTValidationProvider();
					validationProvider.SaveExcludedCompanies(companies);
				}
			}
		}
コード例 #3
0
		public UpdateOFACValidationSourcesTask(ScheduledTaskInfo taskInfo)
			: base(taskInfo)
		{
			_provider = new CCTValidationProvider();
		}
コード例 #4
0
		static LeadValidationManager()
		{
			_provider = new CCTValidationProvider();
		}