Beispiel #1
0
        public void PrintReservationConfirmation(int venueNum, string spaceIDChosen, string reservedFor, DateTime startDate, int numOfDays, int peopleAttending)
        {
            Space         bookedSpace    = spaceDAO.GetBookedSpaceDetails(spaceIDChosen);
            IList <Venue> venues         = venueDAO.GetVenues();
            string        confirmationID = reservationDAO.AddReservationToSql(spaceIDChosen, reservedFor, startDate, numOfDays, peopleAttending);
            string        numattend      = Convert.ToString(peopleAttending);

            string   startDateString = Convert.ToString(startDate);
            DateTime endDate         = startDate.AddDays(numOfDays);
            string   endDateString   = Convert.ToString(endDate);

            string totalCost = Convert.ToString(numOfDays * bookedSpace.DailyRate);

            totalCost.Substring(totalCost.Length - 2);


            Console.WriteLine("");
            Console.WriteLine("Thanks for submitting your reservation!");
            Console.WriteLine("Your details and confirmation ID are listed below");
            Console.WriteLine("");
            Console.WriteLine("Confirmation #: " + confirmationID);
            Console.WriteLine("Venue: " + venues[venueNum].Name);
            Console.WriteLine("Space: " + bookedSpace.Name);
            Console.WriteLine("Reserved For: " + reservedFor);
            Console.WriteLine("Attendees: " + numattend);
            Console.WriteLine("Arrival Date: " + startDateString);
            Console.WriteLine("Depart Date: " + endDateString);
            Console.WriteLine("Total Cost: $" + totalCost);
            Console.WriteLine("");
            Console.WriteLine("Press any key and/or ENTER to leave the confirmation print scren and view a list of venues");
            string end = Console.ReadLine();

            GetVenues();
        }