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); } } }
private OraSession OpenConnection(string name) { var oraSession = new OraSession(); var conString = oraSession.Load(name); oraSession.OpenConnection(conString); return(oraSession); }
public DateTime GetProjectStartDate() { string query = "select max(laststartts) from BATCHSTATS"; var masterSession = new OraSession(); var conString = masterSession.Load("Master"); masterSession.OpenConnection(conString); OracleCommand masterCmd = new OracleCommand(query, masterSession.OracleConnection); var result = masterSession.AsyncGetLastExecuted(masterCmd); masterSession.CloseConnection(); return(result); }