Example #1
0
        public void ConvertUserChoiceToAction(int action)
        {
            switch (action)
            {
            case 1:
                Console.Clear();
                Contestant newContestant = new Contestant();
                RegisterContestant(newContestant);
                Console.Clear();
                break;

            case 2:
                Console.Clear();
                Contestant contestant = SearchForContestant();
                if (contestant != null)
                {
                    PrintContestantInfo(contestant);
                    Console.Clear();
                    break;
                }
                Console.Clear();
                break;

            case 3:
                Console.Clear();
                GetDetails();
                Console.Clear();
                break;

            case 4:
                Console.Clear();
                string winner = PickWinner();
                if (winner != null)
                {
                    UserInterface.DisplayWinner(winner);
                    Console.WriteLine("Press Enter to continue.");
                    Console.ReadLine();
                }
                Console.Clear();
                break;

            case 5:
                Console.Clear();
                DisplayAllContestants();
                break;

            default:
                isStillEditing = false;
                Console.Clear();
                break;
            }
        }
 public void PrintContestantInfo(Sweepstakes sweepstakesIn, Contestant contestantIn)
 {
     UserInterface.DisplayWinner(sweepstakesIn, contestantIn);
 }