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

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

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

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

            return(result);
        }