Exemplo n.º 1
0
        // Add contestants to the sweepstakes.
        private void AddContestantsToSweepstakes(Sweepstakes sweepstakes)
        {
            Contestant contestant;

            // Add contestants to sweepstakes
            while (UserInterface.AskUserYesOrNo("Enter contestant into \"" + sweepstakes.Name + "\" sweepstakes"))
            {
                contestant = new Contestant();

                contestant.firstName    = UserInterface.GetUserInputFor("contestant first name");
                contestant.lastName     = UserInterface.GetUserInputFor("contestant last name");
                contestant.emailAddress = UserInterface.GetUserInputFor("contestant email address");

                sweepstakes.RegisterContestant(contestant);
                UserInterface.ConfirmRegistration(sweepstakes.Name, contestant);
            }
        }