public void DeleteAccount(ReportEvent evt, ConnectionManager cm, int sleepTime)
        {
            TuDbConnection dbConnection = null;

            try
            {
                dbConnection = cm.GetConnection();
            }
            catch (Exception ex)
            {
                Logger.Debug(String.Format("Error connecting to database: {0}", ex.Message));
                return;
            }

            EventLogDataAdapter eventLogDataAdapter = new EventLogDataAdapter(dbConnection);

            try
            {
                String msg = String.Format("Delete Account Event has been processed for event id {0}  event data [{1}]  event date [{2}]", evt.EventId, evt.EventData, evt.EventDate);

                eventLogDataAdapter.Insert(evt.EventId, msg);

                Logger.Debug("Connection " + dbConnection.ConnectionId + " - " + msg);

                Thread.Sleep(sleepTime * 1000);

                cm.Release(dbConnection);
            }
            catch (Exception ex)
            {
                Logger.Debug(String.Format("Error starting threads: {0}", ex.Message));
            }
        }
        private void ReleaseDbConnection(ConnectionManager connectionManager, TuDbConnection dbConnection, bool wantException = true)
        {
            if (wantException)
            {
                connectionManager.Release(dbConnection);
            }
            else
            {
                try
                {
                    connectionManager.Release(dbConnection);
                }
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
                catch
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
                {
                }
            }
        }
 public SupportedEventProcessorDataAdapter(TuDbConnection conn)
 {
     this._dataAdapter = new MySqlDataAdapter();
     this._connection  = conn;
 }
 public EventLogDataAdapter(TuDbConnection conn)
 {
     this._dataAdapter = new MySqlDataAdapter();
     this._connection  = conn;
 }
 public ReportEventsDataAdapter(TuDbConnection conn)
 {
     this._dataAdapter = new MySqlDataAdapter();
     this._connection  = conn;
 }