public static Process RunTask(ATTTask task, int taskId) { var exeFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ATT.Robot.exe"); ProcessStartInfo psInfo = new ProcessStartInfo(); psInfo.FileName = exeFile; psInfo.Arguments = $"{task} {taskId}"; return(Process.Start(psInfo)); }
static void RunScript(ATTTask script, int TaskId) { try { switch (script) { case ATTTask.GetMessageId: GetMessageId(); break; case ATTTask.DownloadAndTransform: TransformPayloads(); break; case ATTTask.DownloadPayloads: DownloadPayloads(TaskId); break; case ATTTask.UpdatePayloads: UpdatePayloads(TaskId); break; case ATTTask.UploadPayloads: UploadPayloads(TaskId); break; case ATTTask.PIITrack: GetMessageReport(); break; case ATTTask.LHTrack: TrackLH(); break; case ATTTask.GetMessageAll: GetMessageAll(); break; //case ATTTask.AIFMassUpload: // AIFMassUpload(TaskId); // break; } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } }