public iResearchEntityTargetedEntity AdaptItemResearchSubTypes(DataRow rw)
        {
            iResearchEntityTargetedEntity result = new iResearchEntityTargetedEntity();

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

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

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

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

            return(result);
        }
        public List <iResearchEntityTargetedEntity> AdaptItems(DataTable dt)
        {
            List <iResearchEntityTargetedEntity> results = new List <iResearchEntityTargetedEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                iResearchEntityTargetedEntity cust = new iResearchEntityTargetedEntity();
                cust = AdaptItemResearchSubTypes(rw);
                results.Add(cust);
            }
            return(results);
        }