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 string StartSession(string conString) { OraSession = new OraSession(); try { OraSession.OpenConnection(conString); return(""); } catch (Exception ex) { return(ex.Message); } }
public string StartSession(string host, string port, string user, string password, string dbName, string sid) { DbConnection dbConnection = new DbConnection(Name, host, port, user, password, dbName, sid); OraSession = new OraSession(); try { OraSession.OpenConnection(dbConnection.CreateConnectionString()); return(""); }catch (Exception ex) { return(ex.Message); } }
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); }