Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
        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);
        }