Пример #1
0
        public List <EnrichmentProcessingQueueStatsEntity> Adapt(DataTable dt)
        {
            List <EnrichmentProcessingQueueStatsEntity> results = new List <EnrichmentProcessingQueueStatsEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                EnrichmentProcessingQueueStatsEntity matchCode = new EnrichmentProcessingQueueStatsEntity();
                matchCode = AdaptItem(rw);
                results.Add(matchCode);
            }
            return(results);
        }
Пример #2
0
        public EnrichmentProcessingQueueStatsEntity AdaptItem(DataRow rw)
        {
            EnrichmentProcessingQueueStatsEntity result = new EnrichmentProcessingQueueStatsEntity();

            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);
        }