Example #1
0
 /// <summary>
 /// Queries the Ticket table, for any 'Expired' tickets trys to delete the Ticket. Then checks to 
 /// see if any of the ticket coupons are no longer needed and removes them.
 /// </summary>
 public void ProcessTickets()
 {
     try
     {
         //Need to move all processing into ProcessAgentDB
         ProcessAgentDB agentDB = new ProcessAgentDB();
         int expiredCount = agentDB.ProcessExpiredTickets();
     }
     catch (Exception e)
     {
         Utilities.WriteLog("TicketRemover: " + e.Message + ": " + Utilities.DumpException(e));
     }
 }
Example #2
0
        /// <summary>
        /// Wait the timeout period before checking for Expired issued Tickets,
        /// pause and process External tickets
        /// </summary>
        public void Run()
        {
            while (go)
            {
                // Wait the delay amount
                Thread.Sleep(waitTime);
                ProcessIssuedTickets();
                // sleep 2 minutes then process the external tickets
                Thread.Sleep(120000);
                //Thread.Sleep(3000); // wait 3 seconds - For Debugging
                ProcessAgentDB paDB = new ProcessAgentDB();
                paDB.ProcessExpiredTickets();

            }
        }
        /// <summary>
        /// Wait the timeout period before checking for Expired issued Tickets,
        /// pause and process External tickets
        /// </summary>
        public void Run()
        {
            Logger.WriteLine("SBTicketRemover Starting Run");
            while (go)
            {
                // Wait the delay amount
                Thread.Sleep(waitTime);
                ProcessIssuedTickets();
                // sleep 2 minutes then process the external tickets
                Thread.Sleep(120000);
                //Thread.Sleep(3000); // wait 3 seconds - For Debugging
                ProcessAgentDB paDB = new ProcessAgentDB();
                paDB.ProcessExpiredTickets();

            }
            Logger.WriteLine("SBTicketRemover Exiting Run");
        }