public void BookAnotherOption()
        {
            while (true)
            {
                Console.WriteLine("Do you want to book another movie\n1=>yes\n2=>no");
                int input;
                int.TryParse(Console.ReadLine(), out input);
                BookTicket bookTicket = new BookTicket();
                if (((Choice)input) == (Choice.yes))
                {
                    SelectItemToStore();
                    bookTicket.SelectMoviesAndTickets();
                }
                else if (((Choice)input).Equals(Choice.no))
                {
                    SelectItemToStore();
                    pay.DisplayBookedMovieDetails();
                    Console.WriteLine("Total Cost:{0}", Payment.price);

                    Console.WriteLine("Thanks for Booking,Enjoy and Have fun");
                    Console.WriteLine("Thank you !!! ,Have a good day");
                }
                else
                {
                    Console.WriteLine("You entered wrong input,please enter valid one");
                    continue;
                }
                break;
            }
        }
        public void ViewMovieDetails()
        {
            Console.WriteLine("Display all movies running in threates\n");
            foreach (Movies list in listOfMovies)
            {
                Console.WriteLine("MovieId:{0}\nMovieName:{1}\nThreatreName:{2}\nLanguage:{3}\nDuration:{4}\nTotal-Seats Available:{5}\nAddress:{6}\n", list.MovieId, list.MovieName, list.ThreatreName, list.Language, list.Duration, list.TotalSeat, list.Address);
            }
            Console.WriteLine("Do you want to book tickets?\n1=>Yes\n2=No");
            try
            {
                int.TryParse(Console.ReadLine(), out int confirmInput);
                BookTicket book = new BookTicket();

                switch ((Choice)confirmInput)
                {
                case Choice.yes:
                    if (ValidateRoles.userLogedIn > 0 || ValidateRoles.adminLogedIn > 0)
                    {
                        book.SelectMoviesAndTickets();
                    }

                    else
                    {
                        UserLoginDetails.AskUserForSignin();
                    }
                    break;

                case Choice.no:
                    Console.WriteLine("Thanks!! See you again");
                    break;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Ejemplo n.º 3
0
        public void BookMovies()
        {
            BookTicket bookTicket = new BookTicket();

            module.ViewMovieDetails();
        }