Exemplo n.º 1
0
        public void RunProgram()
        {
            while ()
            {
                int num = UI.Menu();
                switch (num)
                {
                case 1:
                    MakeNewSweepstakes();
                    break;

                case 2:
                    RegisterNewContestant();
                    break;

                case 3:
                    UI.PickWinner();
                    PickWinner();
                    break;

                case 4:
                    UI.PreviousSweepstakes();
                    break;

                default:
                    Console.WriteLine("Please enter a valid response.(1,2,3,4)");
                    UI.Menu();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        public void MakeNewSweepstakes()
        {
            UI.NameNewSweepstakes();
            string      sweepstakesName = Console.ReadLine();
            Sweepstakes NewSweepstakes  = new Sweepstakes(sweepstakesName);

            InsertSweepstakes(NewSweepstakes);
            Console.WriteLine("Your new Sweepstake " + sweepstakesName + "has just been made.");
            UI.Menu();
        }
Exemplo n.º 3
0
        public static void RegisterNewContestant(Sweepstakes sweepstake)
        {
            UI.RegisterNewContestant();
            string     name       = Console.ReadLine();
            Contestant contestant = new Contestant();

            UI.GetInfo(contestant);
            sweepstake.Registercontestant(contestant);
            Console.WriteLine("Awesome! Your registered! You will be notified if you have won!");
            UI.Menu();
        }
Exemplo n.º 4
0
 static void Main(string[] args)
 {
     SelectDataType.ChooseDataType();
     UI.Menu();
 }