예제 #1
0
    private void OnAddProductButtonClicked()
    {
        Product newProduct = new Product(curBill);

        curBill.AddProduct(newProduct);
        OpenEditProductPopup(newProduct);
    }
예제 #2
0
        /**
         *  <summary>
         *  Scans a product in order to calculate the total price.
         *  </summary>
         *  <param name="productCode">string: product code</param>
         **/
        public void ScanProduct(string productCode)
        {
            var productItem = GetProductByCode(productCode);

            if (_bill == null)
            {
                _bill = new Bill();
            }

            _bill.AddProduct(productItem);
        }