コード例 #1
0
        public ReferanceDataEntity AdaptItem(DataRow rw)
        {
            ReferanceDataEntity result = new ReferanceDataEntity();

            result.Code  = SafeHelper.GetSafestring(rw["Code"]);
            result.Value = SafeHelper.GetSafestring(rw["Value"]);
            return(result);
        }
コード例 #2
0
        public List <ReferanceDataEntity> Adapt(DataTable dt)
        {
            List <ReferanceDataEntity> results = new List <ReferanceDataEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                ReferanceDataEntity referanceDataEntity = new ReferanceDataEntity();
                referanceDataEntity = AdaptItem(rw);
                results.Add(referanceDataEntity);
            }
            return(results);
        }