コード例 #1
0
ファイル: DashboardAdapter.cs プロジェクト: weedkiller/demo
        public List <DashboardImportProcessDataQueueStatisticsEntity> Adapt(DataTable dt)
        {
            List <DashboardImportProcessDataQueueStatisticsEntity> results = new List <DashboardImportProcessDataQueueStatisticsEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                DashboardImportProcessDataQueueStatisticsEntity matchCode = new DashboardImportProcessDataQueueStatisticsEntity();
                matchCode = AdaptItem(rw);
                results.Add(matchCode);
            }
            return(results);
        }
コード例 #2
0
ファイル: DashboardAdapter.cs プロジェクト: weedkiller/demo
        public DashboardImportProcessDataQueueStatisticsEntity AdaptItem(DataRow rw)
        {
            DashboardImportProcessDataQueueStatisticsEntity result = new DashboardImportProcessDataQueueStatisticsEntity();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(result);
        }