private void readProductIdButton_Click(object sender, EventArgs e)
        {
            ReadProductIdForm f1 = new ReadProductIdForm();

            f1.ShowDialog();

            int ID = 0;
            if (f1.OK)
            {
                ID = f1.getID();
            }
            else return;

            f1.Dispose();
            f1 = null;

            Product product = null;
            if (os.findObject(ref product, ID))
            {
                displayRichTextBox.Text = product.ToString();
            }
            else
            {
                MessageBox.Show("Product ID = " + ID + " not found!", "Product Not Founded", MessageBoxButtons.OK, MessageBoxIcon.Information);
                displayRichTextBox.Text = "Product ID = " + ID + " not found!";
            }
        }
Beispiel #2
0
        private void readProductIdButton_Click(object sender, EventArgs e)
        {
            ReadProductIdForm f1 = new ReadProductIdForm();

            f1.ShowDialog();

            int ID = 0;

            if (f1.OK)
            {
                ID = f1.getID();
            }
            else
            {
                return;
            }

            f1.Dispose();
            f1 = null;

            Product product = null;

            if (os.findObject(ref product, ID))
            {
                displayRichTextBox.Text = product.ToString();
            }
            else
            {
                MessageBox.Show("Product ID = " + ID + " not found!", "Product Not Founded", MessageBoxButtons.OK, MessageBoxIcon.Information);
                displayRichTextBox.Text = "Product ID = " + ID + " not found!";
            }
        }