示例#1
0
        public static void FilterCompaniesRecords()
        {
            var    dataSet        = ExcelUtilities.GetDataSetFromExcelFile(filePath, companiesRecordSheet);
            var    companiesTable = dataSet.Tables[companiesRecordSheet];
            var    filteredTable  = FilterDataTable(companiesTable);
            string outputFileName = "FilteredCompanyRecords.xlsx";

            ExcelUtilities.ExportToExcelOleDb(filteredTable, companiesRecordSheet, OutputFilePath, outputFileName, true);

            LoggerUtility.Write("Success", "Company Records Sorted " + OutputFilePath + outputFileName);
            APIManager.ParseCompaniesData(filteredTable);
        }
示例#2
0
        public static void SortSalesRecords()
        {
            try
            {
                var    dataSet        = ExcelUtilities.GetDataSetFromExcelFile(filePath, saleRecordSheet);
                var    salesTable     = dataSet.Tables[saleRecordSheet];
                var    sortKey        = "Transfer Date";
                var    sortedTable    = SortDataTable(salesTable, sortKey);
                string outputFileName = "SortedSalesRecords.xlsx";
                ExcelUtilities.ExportToExcelOleDb(sortedTable, saleRecordSheet, OutputFilePath, outputFileName, true);

                LoggerUtility.Write("Success", "Sales Record Sorted " + OutputFilePath + outputFileName);
            }
            catch (Exception ex)
            {
                LoggerUtility.Write("Exception in SortSaleRecords : ", ex.Message);
            }
        }