Example #1
0
        public List <OIMatchMetaData> MatchMetaDataDetailAdapt(DataTable dt)
        {
            List <OIMatchMetaData> results = new List <OIMatchMetaData>();

            foreach (DataRow rw in dt.Rows)
            {
                OIMatchMetaData cust = new OIMatchMetaData();
                cust = MatchMetaDataDetailAdaptItem(rw);
                results.Add(cust);
            }
            return(results);
        }
Example #2
0
        public OIMatchMetaData MatchMetaDataDetailAdaptItem(DataRow rw)
        {
            OIMatchMetaData result = new OIMatchMetaData();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(result);
        }