Пример #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);
        }
Пример #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);
        }