Various changes
This commit is contained in:
@@ -51,18 +51,17 @@ namespace PartSource.Automation.Jobs
|
||||
try
|
||||
{
|
||||
string filename = Decompress(fileInfo);
|
||||
DataTable dataTable = GetDataTable(filename);
|
||||
|
||||
string tableName = fileInfo.Name.Substring(0, fileInfo.Name.IndexOf('.'));
|
||||
|
||||
_whiSeoService.BulkCopy(_seoDataType, dataTable, tableName);
|
||||
DataTable dataTable = GetDataTable(filename);
|
||||
|
||||
_whiSeoService.BulkCopy(_seoDataType, dataTable, tableName);
|
||||
_logger.LogInformation($"Copied {fileInfo.Name} to the database.");
|
||||
|
||||
File.Delete(filename);
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"Failed to write {fileInfo.Name} to the database - {ex.Message}", ex);
|
||||
}
|
||||
@@ -73,7 +72,7 @@ namespace PartSource.Automation.Jobs
|
||||
|
||||
_logger.LogInformation($"Created fitment table for part group {fitmentTable}.");
|
||||
}
|
||||
|
||||
|
||||
_whiSeoService.CreateFitmentView();
|
||||
}
|
||||
|
||||
@@ -96,8 +95,8 @@ namespace PartSource.Automation.Jobs
|
||||
dataTable.Columns.Add("PartNumber", typeof(string));
|
||||
dataTable.Columns.Add("BaseVehicleId", typeof(int));
|
||||
dataTable.Columns.Add("EngineConfigId", typeof(int));
|
||||
//dataTable.Columns.Add("Position", typeof(string));
|
||||
//dataTable.Columns.Add("NoteText", typeof(string));
|
||||
dataTable.Columns.Add("Position", typeof(string));
|
||||
dataTable.Columns.Add("NoteText", typeof(string));
|
||||
|
||||
using StreamReader reader = new StreamReader(filename);
|
||||
string line = reader.ReadLine(); // Burn the header row
|
||||
@@ -122,7 +121,7 @@ namespace PartSource.Automation.Jobs
|
||||
&& int.TryParse(columns[5], out int baseVehicleId)
|
||||
&& int.TryParse(columns[6], out int engineConfigId))
|
||||
{
|
||||
dataTable.Rows.Add(new object[] { lineCode, partNumber, baseVehicleId, engineConfigId }); //, position, noteText });
|
||||
dataTable.Rows.Add(new object[] { lineCode, partNumber, baseVehicleId, engineConfigId, position, noteText });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user