예제 #1
0
        public static void performConcert()
        {
            showMusicianList();
            MusicianDTO musician = getMusicianById(GeneralUtilities.askForInt("Choose an id: ") ?? 0);

            if (musician != null)
            {
                showMusicianAvailableConcerts(musician);
                ConcertDTO concert = ConcertUtilities.getConcertById(GeneralUtilities.askForInt("Choose an id: ") ?? 0);
                if (concert != null)
                {
                    UserServiceDTO.PerformJob(musician, concert);
                    Console.WriteLine($"{musician.FirstName} {musician.LastName} has performed the concert  in {concert.Venue} and has earned {concert.Salary}");
                }
                else
                {
                    Console.WriteLine("The id introduced is not correct");
                }
            }
            else
            {
                Console.WriteLine("The id introduced is not correct");
            }
        }
예제 #2
0
        public static void quitConcert()
        {
            showMusicianList();
            MusicianDTO musician = getMusicianById(GeneralUtilities.askForInt("Choose an id: ") ?? 0);

            if (musician != null)
            {
                showMusicianAvailableConcerts(musician);
                ConcertDTO concert = ConcertUtilities.getConcertById(GeneralUtilities.askForInt("Choose an id: ") ?? 0);
                if (concert != null)
                {
                    UserServiceDTO.QuitConcert(musician, concert);
                    Console.WriteLine($"{musician.FirstName} {musician.LastName} has quit the job in {concert.Venue}. {concert.City}");
                }
                else
                {
                    Console.WriteLine("The id introduced is not correct");
                }
            }
            else
            {
                Console.WriteLine("The id introduced is not correct");
            }
        }