Exemplo n.º 1
0
        private static void AddBookingUI()
        {
            Console.WriteLine("Bookings");
            var year      = GetIntFromOutput("Please enter year: ");
            var day       = GetIntFromOutput("Please enter day: ");
            var month     = GetIntFromOutput("Please enter month: ");
            var hourStart = GetIntFromOutput("Please enter start time: ");
            var hourEnd   = GetIntFromOutput("Please enter end time: ");
            var dentists  = fileHandler.GetDentists();

            Console.WriteLine("Please enter your dentist number");
            var dentistID = GetDentistID(dentists);

            var startTime = new DateTime(year, month, day, hourStart, 0, 0);
            var endTime   = new DateTime(year, month, day, hourEnd, 0, 0);
            var timeSlot  = new MOCKTimeSlot(startTime, endTime, dentistID);

            fileHandler.AddNewTimeSlot(timeSlot);
        }