public void GetFomDatabase() { if (BatchJobGroups.Count > 0) { OraSession oraSession = new OraSession(); var masterConString = oraSession.Load("Master"); var testConString = oraSession.Load("Test"); string errorMessage = ""; errorMessage = oraSession.OpenConnection(masterConString); if (errorMessage != "") { ErrorConnection?.Invoke(null, null); return; } errorMessage = oraSession.OpenConnection(testConString); if (errorMessage != "") { ErrorConnection?.Invoke(null, null); return; } else { foreach (var bjg in BatchJobGroups) { ExtractLogs(bjg); bjg.CompareLogs(); } LogsExtracted?.Invoke(BatchJobGroups.Where(item => item.Name != "").ToList(), null); } } }
protected virtual void OnErrorConnection(ErrorEventArgs args) { ErrorConnection?.Invoke(this, args); }