コード例 #1
0
        /// <summary>
        /// calls the ConsoleView.DisplayGetNumberOfUnitsToSell method and the SubtractProduct method if a valid integer is returned
        /// </summary>
        private void Sell()
        {
            int numberOfUnits = _consoleView.DisplayGetNumberOfUnitsToSell(_salesperson.CurrentStock);

            _salesperson.CurrentStock.SubtractProducts(numberOfUnits);

            if (_salesperson.CurrentStock.OnBackorder)
            {
                _consoleView.DisplayBackOrderNotification(_salesperson.CurrentStock, numberOfUnits);
            }
        }