diff --git a/.vscode/launch.json b/.vscode/launch.json index ae2b2c2..bf8a777 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,26 +1,26 @@ { - "version": "0.2.0", - "configurations": [ - { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "name": ".NET Core Launch (console)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/bin/Debug/net6.0/importer.dll", - "args": [], - "cwd": "${workspaceFolder}", - // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach" - } - ] -} \ No newline at end of file + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/bin/Debug/net6.0/importer.dll", + "args": ["foley", "michielcarman"], + "cwd": "${workspaceFolder}", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} diff --git a/Global.cs b/Global.cs index 8f45860..7abc58b 100644 --- a/Global.cs +++ b/Global.cs @@ -17,6 +17,8 @@ namespace importer { if (Program.Args[0] == "brandt") return JDISImport.ServiceUrl; + else if (Program.Args[0] == "foley") + return PDAImport.ServiceUrl; else return string.Empty; } } diff --git a/PDAImport.cs b/PDAImport.cs new file mode 100644 index 0000000..9462be4 --- /dev/null +++ b/PDAImport.cs @@ -0,0 +1,104 @@ +using System; +using System.Text; +using System.Linq; +using System.Collections.Generic; +using importer.RestObjects; +using importer.ImportObjects; +using System.IO; +using ExcelDataReader; +using System.Data; + +namespace importer +{ + public class PDAImport + { + private static string _serviceUrl; + private static RESTService _rservice; + private static List _customers; + private static List _makes; + private static List _products; + private static List _models; + private static List _inspectionTypes; + private static List