Пример #1
0
        public void SeedData()
        {
            _seededParty.PartyID  = 1;
            _seededParty.Location = "Cool Creek Park";
            _seededParty.Purpose  = "Friends and Family Day";

            Burger burger       = new Burger(BurgerType.Hamburger, 1.50m, .50m);
            Burger hotdog       = new Burger(BurgerType.HotDog, 1.50m, .50m);
            Burger veggieBurger = new Burger(BurgerType.VeggieBurger, 1.50m, .50m);

            Treat icecream = new Treat(TreatType.IceCream, .75m, .25m);
            Treat popcorn  = new Treat(TreatType.Popcorn, .25m, .10m);

            for (int i = 0; i <= 5; i++)
            {
                _seededParty.AddBurger(burger);
                _seededParty.AddBurger(hotdog);
                _seededParty.AddBurger(veggieBurger);
                _seededParty.AddTreat(icecream);
                _seededParty.AddTreat(popcorn);
            }
            _partyRepo.AddParty(_seededParty);
        }
Пример #2
0
        public void LogPartyInfo()
        {
            Console.Clear();
            Console.WriteLine("Enter the party ID number");
            int partyID = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Please enter the party location");
            string partyLocation = Console.ReadLine();

            Console.WriteLine("Please enter the party purpose");
            string partyPurpose = Console.ReadLine();

            Party newParty = new Party(partyID, partyLocation, partyPurpose);

            Console.WriteLine("How many hot dogs were sold?");
            int dogNum = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("What is the cost of the hot dog, bun included? Ex: 1.20");
            decimal dogMainPrice = Convert.ToDecimal(Console.ReadLine());

            Console.WriteLine("What is the misc. cost of the hot dog?");
            decimal dogMiscPrice = Convert.ToDecimal(Console.ReadLine());
            Burger  hotdog       = new Burger(BurgerType.HotDog, dogMainPrice, dogMiscPrice);

            AddBurgersToParty(newParty, hotdog, dogNum);

            Console.WriteLine("How many hamburgers were sold?");
            int hamNum = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("What is the cost of the hamburger, bun included? Ex: 1.20");
            decimal hamMainPrice = Convert.ToDecimal(Console.ReadLine());

            Console.WriteLine("What is the misc. cost of the hamburger?");
            decimal hamMiscPrice = Convert.ToDecimal(Console.ReadLine());
            Burger  hamburger    = new Burger(BurgerType.Hamburger, hamMainPrice, hamMiscPrice);

            AddBurgersToParty(newParty, hamburger, hamNum);

            Console.WriteLine("How many veggie burgers were sold?");
            int vegNum = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("What is the cost of the veggie burger, bun included? Ex: 1.20");
            decimal vegMainPrice = Convert.ToDecimal(Console.ReadLine());

            Console.WriteLine("What is the misc. cost of the veggie burger?");
            decimal vegMiscPrice = Convert.ToDecimal(Console.ReadLine());
            Burger  veggieburger = new Burger(BurgerType.VeggieBurger, vegMainPrice, vegMiscPrice);

            AddBurgersToParty(newParty, veggieburger, hamNum);

            Console.WriteLine("How many gallons of ice cream were sold?");
            int iceNum = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("What is the cost of the ice cream? Ex: 1.20");
            decimal iceMainPrice = Convert.ToDecimal(Console.ReadLine());

            Console.WriteLine("What is the misc. cost of the ice cream?");
            decimal iceMiscPrice = Convert.ToDecimal(Console.ReadLine());
            Treat   icecream     = new Treat(TreatType.IceCream, iceMainPrice, iceMiscPrice);

            AddTreatsToParty(newParty, icecream, iceNum);

            Console.WriteLine("How many bags of popcorn were sold?");
            int popNum = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("What is the cost of the popcorn itself per bag? Ex: 1.20");
            decimal popMainPrice = Convert.ToDecimal(Console.ReadLine());

            Console.WriteLine("What is the misc. cost of the popcorn?");
            decimal popMiscPrice = Convert.ToDecimal(Console.ReadLine());
            Treat   popcorn      = new Treat(TreatType.Popcorn, popMainPrice, popMiscPrice);

            AddTreatsToParty(newParty, popcorn, popNum);

            _partyRepo.AddParty(newParty);
            Console.WriteLine("Party Added -- Burgers and Treats recorded.");
        }
Пример #3
0
 /// add burger
 public void AddBurger(Burger burger)
 {
     _burgerList.Add(burger);
 }