Esempio n. 1
0
        private void FreeSaleForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string           productName  = nameBox.Text;
                double           productPrice = Convert.ToDouble(priceBox.Text);
                int              count        = Convert.ToInt16(productCount.Value);
                entities.Product product      = new entities.Product(0, "0", productName, productPrice);

                cashierForm.PutToCart(product, count);
                productCount.Value = 1;
                nameBox.Text       = "Товар X";
                priceBox.Text      = "";


                cashierForm.BarCodeFocus();

                this.Close();
            }
        }
Esempio n. 2
0
 private void PutToCart()
 {
     cashierForm.PutToCart(selectedProduct, Convert.ToInt32(productCount.Value));
     productCount.Value = 1;
 }