public bool ExecuteNewCampaign(decimal budget)
        {
            AddressProvider myAddressProvider = new AddressProvider();

            List <CustomerAddress> listOfAddresses = myAddressProvider.GetAddressesNewProspects();

            bool success;

            if (budget < 10000)
            {
                success = myAddressProvider.MySendBallPens();
            }
            else
            {
                success = myAddressProvider.MySendCoffeeCups();
            }

            return(success);
        }
Ejemplo n.º 2
0
        public bool ExecuteNewCampaign(decimal budget)
        {
            AddressProvider myAddressProvider = new AddressProvider();

            List <CustomerAddress> listOfAddresses = myAddressProvider.GetAddressesNewProspects();

            DoAfterGetAddresses doAfterGetAddresses;

            if (budget < 10000)
            {
                BallpenCompany myBallpenCompany = new BallpenCompany();
                doAfterGetAddresses = myBallpenCompany.SendBallPens;
            }
            else
            {
                CoffeeCupCompany myCoffeeCupCompany = new CoffeeCupCompany();
                doAfterGetAddresses = myCoffeeCupCompany.SendCoffeeCups;
            }

            return(myAddressProvider.HandleCompaign(doAfterGetAddresses));
        }