Ejemplo n.º 1
0
        public override void AddOrder(Enquiry enquiry)
        {
            if (enquiry.CustomerId != CustomerId)
            {
                throw new Exception("Cannot pick up other customer's order");
            }

            enquiry.ProcessDelivering(this);
        }
Ejemplo n.º 2
0
        public override void AddOrder(Enquiry enquiry)
        {
            if (!enquiry.IsShippingRequired)
            {
                throw new Exception("Order cannot be shipped! Pick up only");
            }

            enquiry.ProcessDelivering(this);
        }