Example #1
0
        private void PlaceOrder()
        {
            var customer = new Customer();
            // Get the Customer data from the windows form controls.
            // Populate the customer instance

            var order = new Order();
            // order.text = OrderWin.UI.Form.Order.text
            // Populate the order instance

            // Get value for OrderWin.UI.Form.Order.AllowSplit.Checkbox
            // var allowSplitOrders = true;
            // Get value for OrderWind.UI.Form.Order.EmailReceipt.Checkbox
            // var emailReceipt = true;

            var payment = new Payment();
            // Populate the payment info from OrderWin.UI.Form.BillingInfo

            var orderController = new OrderController();

            try
            {
                var op = orderController.PlaceOrder(customer, order, payment, allowSplitOrders: false, emailReceipt: true);
            }
            catch (ArgumentNullException ane)
            {
                // Log the issue ane.Message()
                // Display a message to the user that the order was not successful
            }
        }
Example #2
0
        }  // End button1_click

        private void PlaceOrder()
        {
            var customer = new Customer();
            // Populate the customer instance

            var order = new Order();
            //Populate the order instance

            // Populate the payment info from UI
            var payment = new Payment();

            // Does the customer want a receipt

            var orderContoller = new OrderController();

            try
            {
                // using named parameters for flags
                var op = orderContoller.PlaceOrder(customer, order, payment,
                                                   allowSplitOrders: false, emailReceipt: true);
            }
            catch (ArgumentNullException ex)
            {
                // log the issue
                // display message to the user that the order was not successful
            }
        }
Example #3
0
        private void PlaceOrder()
        {
            // Populate the customer instance
            Customer customer = new Customer();

            // Populate the order instance
            Order order = new Order();

            // Populate the payment info from the UI
            Payment payment = new Payment();

            try
            {
                OrderController orderController = new OrderController();
                orderController.PlaceOrder(customer, order, payment,
                                           allowSplitOrders: false,
                                           emailReceipt: true);
            }
            catch (ArgumentNullException ex)
            {
                // log the issue
                // display a message to the user
                // that the order was not successful
            }
        }
Example #4
0
        private void PlaceOrder()
        {
            var customer = new Customer();
            // populate the customer instance

            var order = new Order();
            // populate the order instance

            var payment = new Payment();
            // populate the payment instance

            var orderController = new OrderController();

            try
            {
                orderController.PlaceOrder(customer, order, payment,
                                           allowSplitOrders: false,
                                           emailReceipt: true);
            }
            catch (ArgumentException ex)
            {
                // log the issue
                // display a message to user that the order was nos successful
            }
        }
Example #5
0
        private void PlaceOrder()
        {
            var customer = new Customer()
            {
                // populate customer instance
                LastName = "Anon"
            };


            var order = new Order();
            // populate order instance

            var payment = new Payment();
            // populate payment instance

            var allowSplitOrders = true; // if not enough inventory, do a partial order?
            var getEmailReceipt  = true;

            var orderCtrl = new OrderController();

            try
            {
                var op = orderCtrl.PlaceOrder(customer, order, payment, allowSplitOrders, getEmailReceipt);
            }
            catch (ArgumentNullException ex)
            {
                // TODO log
                // TODO display message that something went wrong
            }
        }
Example #6
0
        private void PlaceOrder()
        {
            var customer = new Customer();
            var order    = new Order();
            var payment  = new Payment();

            var orderController = new OrderController();

            orderController.PlaceOrder(customer, order, payment, allowSplitOrders: true, emailReceipt: true);
        }
        private void PlaceOrder()
        {
            Customer customer = new Customer();
            Order    order    = new Order();
            Payment  payment  = new Payment();

            bool allowSplitOrders = true;
            bool emailReceipt     = true;

            OrderController orderController = new OrderController();

            orderController.PlaceOrder(customer, order, payment, allowSplitOrders, emailReceipt);
        }
Example #8
0
        private void PlaceOrder()
        {
            var order = new Order();
            //Populate the order instance
            var customer = new Customer();
            //Populate the customer instance
            var payment = new Payment();
            //Populate the payment instance
            var orderController = new OrderController();

            orderController.PlaceOrder(order, customer, payment,
                                       allowSplitOrders: true, emailReceipt: true);
        }
Example #9
0
        private void PlaceOrder()
        {
            var allowSplitOrders = true;
            var emailReceipt     = true;

            var customer = new Customer();
            // Populate the customer instance

            var order = new Order();
            // Populate the order instance

            var payment = new Payment();
            // Populate the payment info from the UI

            var orderController = new OrderController();

            orderController.PlaceOrder(customer, order, payment,
                                       allowSplitOrders: false, emailReceipt: true); // allowSplitOrders: false, emailReceipt: true
        }
        private void PlaceOrder()
        {
            var customer = new Customer();
            //populate the customer instance

            var order = new Order();
            //populate the order instance

            var allowSplitOrders = true;
            var emailReceipt     = true;


            var payment = new Payment();
            //populate the payment information from UI

            var orderController = new OrderController();

            orderController.PlaceOrder(customer, order, payment, allowSplitOrders, emailReceipt);
        }
        private void PlaceOrder()
        {
            var customer = new Customer();
            // Populate the customer instance

            var order = new Order();
            // Populate the order instance

            var payment = new Payment();

            // Populate the payment info from the UI

            try
            {
                var orderController = new OrderController();
                var op = orderController.PlaceOrder(customer, order, payment, allowSplitOrders: false, emailReceipt: true);
            }
            catch (ArgumentNullException)
            {
                // dispaly a message to the user that the order was not successful
            }
        }
        private void PlaceOrder()
        {
            var customer = new Customer();
            //populate the customer instance

            var order = new Order();
            // populate the order instance

            var allowSplitOrders = true;

            var emailReciepts = true;


            try
            {
                var payment         = new Payment();
                var orderController = new OrderController();
                orderController.PlaceOrder(customer, order, payment, allowSplitOrders, emailReciepts);
            }
            catch (ArgumentNullException ex)
            {
                // Log
            }
        }