Exemple #1
0
        //button click events
        private void btnFind_Click(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (Validation.validateUPC(txtProductUPC.Text))
                {
                    int tempUPC = Convert.ToInt32(txtProductUPC.Text);

                    bool   ok     = false;
                    string record = "";
                    dbFunctions.SelectProductFromProduct(tempUPC, out ok, out record);
                    //thisProductList.Search(tempUPC).Display(this);
                    display(record);
                    FormController.activateAddButtons(this);
                    //thisProductList.Search(Convert.ToInt32(txtProductUPC.Text)).Display(this);
                }
                else
                {
                    MessageBox.Show("INVALID UPC ENTERED MUST BE AN Int ");
                }
            }
            catch
            {
                MessageBox.Show("DB error UPC does not exist");
            }
        }