private static void DispatcherTimer_Tick(object sender, EventArgs e) { try { string query = "select count(*) from Q_REPORT t where t.done = 1"; OracleDataReader reader = ManagerDB.GetReader(query); while (reader.Read()) { if (Convert.ToInt32(reader[0]) > 0) { _dispatcherTimer.Stop(); ProcDoneHandler?.Invoke(); } } } catch (Exception ex) { ExceptionHandler("DispatcherTimer_Tick()", ex.Message); } }
public static string GetResultFromDb() { string res = ""; try { string query = "select t.comments from Q_REPORT t where t.done = 1"; using (OracleDataReader reader = ManagerDB.GetReader(query)) { while (reader.Read()) { res = reader[0].ToString(); } } } catch (Exception ex) { ExceptionHandler("GetResultFromDb()", ex.Message); } return(res); }