Exemple #1
0
        private void tbSellProductID_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F3)
            {
                FormSearchPro frmSearch = new FormSearchPro();
                frmSearch.ShowDialog();

                if (frmSearch.Selected == true)
                {
                    tbSellProductID.Text      = frmSearch.ProductID;
                    tbSellProductName.Enabled = true;
                    tbSellProductName.Text    = frmSearch.ProductName;
                    tbPerUnit.Enabled         = true;
                    tbPerUnit.Text            = Convert.ToString(frmSearch.Price);
                    tbAmount.Enabled          = true;
                    tbAmount.Focus();

                    productSell.ID    = frmSearch.ProductID;
                    productSell.Name  = frmSearch.ProductName;
                    productSell.Price = frmSearch.Price;

                    btnCancelEachOrder.Enabled = true;
                    btnCancelEachOrder.Visible = true;
                }
                else
                {
                    tbSellProductID.Focus();
                }
            }
        }
Exemple #2
0
        private void tbSellProductID_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F3)
            {
                FormSearchPro frmSearch = new FormSearchPro();
                frmSearch.ShowDialog();

                if (frmSearch.Selected == true)
                {
                    tbSellProductID.Text = frmSearch.ProductID;
                    tbSellProductName.Enabled = true;
                    tbSellProductName.Text = frmSearch.ProductName;
                    tbPerUnit.Enabled = true;
                    tbPerUnit.Text = Convert.ToString(frmSearch.Price);
                    tbAmount.Enabled = true;
                    tbAmount.Focus();

                    productSell.ID = frmSearch.ProductID;
                    productSell.Name = frmSearch.ProductName;
                    productSell.Price = frmSearch.Price;

                    btnCancelEachOrder.Enabled = true;
                    btnCancelEachOrder.Visible = true;
                }
                else
                    tbSellProductID.Focus();
            }
        }