Exemplo n.º 1
0
        void ShowStats()
        {
            //pull the stats information from the db
            WwfdData.GetStatsRow stats = new WwfdDataTableAdapters.GetStatsTableAdapter().GetData().First();

            Console.WriteLine("\n");
            Console.WriteLine("Quotes: " + stats.QuoteCount);
            Console.WriteLine("Founders: " + stats.FounderCount);
            Console.WriteLine("Subscribers: " + stats.SubscriberCount);
            Console.WriteLine("Last QOTD: " + stats.LastQOTD.ToShortDateString());

            Pause();

            ShowPrompt();
        }
Exemplo n.º 2
0
        void AssignQuotes(DateTime finalDate)
        {
            _log.AppendEvent(ApplicationEventTypes.Information, "Creating QOTD list until " + finalDate.ToShortDateString());

            //pull the stats information from the db
            WwfdData.GetStatsRow stats         = new WwfdDataTableAdapters.GetStatsTableAdapter().GetData().First();
            DateTime             lastQuoteDate = stats.LastQOTD;

            TimeSpan span = finalDate - lastQuoteDate;

            WwfdDataTableAdapters.QOTDTableAdapter qotdAdapter = new WwfdDataTableAdapters.QOTDTableAdapter();
            for (int i = 1; i <= span.Days; i++)
            {
                Console.WriteLine("Selecting quote for: " + lastQuoteDate.AddDays(i).ToShortDateString());
                qotdAdapter.CreateRandomQOTD();
            }

            _log.AppendEvent(ApplicationEventTypes.Information, "finished.");

            Pause();
            ShowPrompt();
        }