예제 #1
0
        private void buttonProductAdd_Click(object sender, EventArgs e)
        {
            Product        theProduct    = new Product();
            FormProductNew theProductNew = new FormProductNew(theProduct);

            theProductNew.ShowDialog();
            LoadProduct();
        }
예제 #2
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            Product theProduct = listBoxProducts.SelectedItem as Product;

            if (theProduct == null)
            {
                return;
            }
            FormProductNew theProductNew = new FormProductNew(theProduct);

            theProductNew.ShowDialog();
            LoadProduct();
        }