Esempio n. 1
0
        public List <MatchOutputStatsEntity> Adapt(DataTable dt)
        {
            List <MatchOutputStatsEntity> results = new List <MatchOutputStatsEntity>();

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

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

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

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

            return(result);
        }