Пример #1
0
        private void _timer_Elapsed(object sender)
        {
            string time = ConfigurationManager.AppSettings["ClearHistoryTime"];
            int    hour = Convert.ToInt32(time);
            int    now  = DateTime.Now.Hour;

            if (now >= hour)
            {
                TIcketDAOMSSQL t = new TIcketDAOMSSQL();
                FlightDAOMSSQL f = new FlightDAOMSSQL();
                t.MoveToTicketHistory();
                f.MoveToFlightsHistory();
            }
        }