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

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

            result.MDPCode  = SafeHelper.GetSafestring(rw["MDPCode"]);
            result.MDPValue = SafeHelper.GetSafestring(rw["MDPValue"]);
            if (dt.Columns.Contains("MDPType"))
            {
                result.MDPType = SafeHelper.GetSafestring(rw["MDPType"]);
            }

            return(result);
        }