Exemplo n.º 1
0
        public List <DataEnrichmentStatsEntity> Adapt(DataTable dt)
        {
            List <DataEnrichmentStatsEntity> results = new List <DataEnrichmentStatsEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                DataEnrichmentStatsEntity matchCode = new DataEnrichmentStatsEntity();
                matchCode = AdaptItem(rw);
                results.Add(matchCode);
            }
            return(results);
        }
Exemplo n.º 2
0
        public DataEnrichmentStatsEntity AdaptItem(DataRow rw)
        {
            DataEnrichmentStatsEntity result = new DataEnrichmentStatsEntity();

            if (rw.Table.Columns["DnBAPIName"] != null)
            {
                result.DnBAPIName = SafeHelper.GetSafestring(rw["DnBAPIName"]);
            }

            if (rw.Table.Columns["NbrDUNS"] != null)
            {
                result.NbrDUNS = SafeHelper.GetSafeint(rw["NbrDUNS"]);
            }

            return(result);
        }