示例#1
0
 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);
         }
     }
 }
示例#2
0
        private OraSession OpenConnection(string name)
        {
            var oraSession = new OraSession();
            var conString  = oraSession.Load(name);

            oraSession.OpenConnection(conString);
            return(oraSession);
        }
示例#3
0
 public string StartSession(string conString)
 {
     OraSession = new OraSession();
     try {
         OraSession.OpenConnection(conString);
         return("");
     } catch (Exception ex) {
         return(ex.Message);
     }
 }
示例#4
0
        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);
            }
        }
示例#5
0
        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);
        }