Beispiel #1
0
        /// <summary>
        /// Hàm tiến hành gọi mua một sản phẩm
        /// </summary>
        private void buyChoosedProduct()
        {
            int count = Convert.ToInt32(pageDetailsProducts.TabChooseToBuy.CountProduct);

            if (billManager.existBill(sanPhamCurrent))
            {
                sanPhamCurrent.Count += count;
                updateBill(true);
            }
            else if (count > 0)
            {
                sanPhamCurrent.Count = count;
                billManager.addBill(sanPhamCurrent);
                lbCountProduct.Text    = billManager.countBill().ToString();
                lbCountProduct.Visible = true;
                createProductsPurchased();
            }
        }