コード例 #1
0
        private DateTime GetFutureDate(IUserIO io)
        {
            //TODO: move to UI
            DateTime target;
            bool     firstTry = true;

            do
            {
                if (!firstTry)
                {
                    io.WriteLine("Order date must be in the future.");
                }
                target   = io.GetDate("Please enter a date for the order:");
                firstTry = false;
            } while (target < DateTime.Now);
            return(target);
        }