Exemplo n.º 1
0
        public static DIData CreateInstance(DIImportFileType importFileType, List<string> sourceFileNamesWPath,
                  string tempFolderPath, DIConnection dbConnection, string datasetPrefix, string languageCode)
        {
            DIData RetVal = null;
            switch (importFileType)
            {
                case DIImportFileType.DataEntrySpreasheet:
                    break;
                case DIImportFileType.Database:
                    break;
                case DIImportFileType.Template:
                    break;
                case DIImportFileType.SDMXXml:
                    RetVal = new SDMX.SDMXXml(sourceFileNamesWPath, tempFolderPath, dbConnection, datasetPrefix, languageCode);
                    break;
                default:
                    break;
            }

            if (RetVal != null)
            {
                RetVal.ImportFileType = importFileType;
            }
            return RetVal;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the instance of DIData based on the importFile type
        /// </summary>
        /// <param name="importFileType"></param>
        /// <param name="sourceFileNamesWPath">List of source files with path</param>
        /// <param name="targetFileNamesWPath">Target file name with path</param>
        /// <param name="tempFolderPath">Temproray folder path</param>
        /// <param name="htmlLogOutputPath">Spreadsheet folder path</param>
        /// <returns></returns>
        public static DIData CreateInstance(DIImportFileType importFileType, List<string> sourceFileNamesWPath, string targetFileNamesWPath, string tempFolderPath, string htmlLogOutputPath)
        {
            DIData RetVal = null;
            switch (importFileType)
            {
                case DIImportFileType.DataEntrySpreasheet:
                    RetVal = new DataEntrySpreadsheets(sourceFileNamesWPath, targetFileNamesWPath, tempFolderPath, htmlLogOutputPath);
                    break;
                case DIImportFileType.Database:
                    RetVal = new Database.Database(sourceFileNamesWPath, targetFileNamesWPath, tempFolderPath, htmlLogOutputPath);
                    break;
                case DIImportFileType.Template:
                    break;
                case DIImportFileType.SDMXXml:
                    RetVal = new SDMX.SDMXXml(sourceFileNamesWPath, targetFileNamesWPath, tempFolderPath, htmlLogOutputPath);
                    break;
                case DIImportFileType.CSV:
                    RetVal = new CSV.CSVImporter(sourceFileNamesWPath, targetFileNamesWPath, tempFolderPath, htmlLogOutputPath);
                    break;
                default:
                    break;
            }

            if (RetVal != null)
            {
                RetVal.ImportFileType = importFileType;
            }
            return RetVal;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sets basic values which are required to generate Html log file
        /// </summary>
        /// <param name="totalTimperiod"></param>
        /// <param name="totalSource"></param>
        /// <param name="totalData"></param>
        /// <param name="indicatorLogInfoTable"></param>
        /// <param name="unitLogInfoTable"></param>
        /// <param name="subgroupLogInfoTable"></param>
        /// <param name="areaLogInfoTable"></param>
        /// <param name="duplicateRecordsInfoTable"></param>
        /// <param name="skippedIUSInfoTable"></param>
        internal void SetBasicValues(Import.DAImport.Common.DIImportFileType importType, int totalTimperiod, int totalSource, int totalData,
    DataTable indicatorLogInfoTable, DataTable unitLogInfoTable, DataTable subgroupLogInfoTable,
    DataTable areaLogInfoTable, DataTable duplicateRecordsInfoTable, DataTable skippedIUSInfoTable, DataTable skippedFiles)
        {
            this.TotalTimeperiod = totalTimperiod;
            this.TotalSource = totalSource;
            this.TotalData = totalData;

            this.IndicatorLogInfoTable = indicatorLogInfoTable;
            this.UnitLogInfoTable = unitLogInfoTable;
            this.SubgroupLogInfoTable = subgroupLogInfoTable;
            this.AreaLogInfoTable = areaLogInfoTable;
            this.DuplicateRecordsInfoTable = duplicateRecordsInfoTable;
            this.SkippedIUSInfoTable = skippedIUSInfoTable;

            this.SkippedFiles = skippedFiles;
            this._ImportType = importType;
            this.SetHTMLLogVariables(importType);
        }
Exemplo n.º 4
0
        public static DIData CreateInstance(DIImportFileType importFileType,UserSelection userSelections, DIConnection sourceDBConnection, DIQueries sourceDBQueries, DIConnection targetDBConnection, DIQueries targetDBQueries)
        {
            DIData RetVal = null;
            switch (importFileType)
            {
                case DIImportFileType.DataEntrySpreasheet:
                    break;
                case DIImportFileType.Database:
                    RetVal = new DAImport.Database.Database(userSelections, sourceDBConnection, sourceDBQueries, targetDBConnection, targetDBQueries);
                    break;
                case DIImportFileType.Template:
                    break;
                case DIImportFileType.SDMXXml:
                    break;
                default:
                    break;
            }

            if (RetVal != null)
            {
                RetVal.ImportFileType = importFileType;
            }
            return RetVal;
        }
Exemplo n.º 5
0
        public static DIData CreateInstance(DIImportFileType importFileType, string sourceFileNamesWPath,
                  string tempFolderPath, DIConnection dbConnection, DIQueries dbQueries)
        {
            DIData RetVal = null;
            switch (importFileType)
            {
                case DIImportFileType.DataEntrySpreasheet:
                    RetVal = new DataEntrySpreadsheets(sourceFileNamesWPath, tempFolderPath, dbConnection, dbQueries);
                    break;
                case DIImportFileType.Database:
                    break;
                case DIImportFileType.Template:
                    break;
                case DIImportFileType.SDMXXml:
                    break;
                default:
                    break;
            }

            if (RetVal != null)
            {
                RetVal.ImportFileType = importFileType;
            }
            return RetVal;
        }