示例#1
0
        private void btAdd_Click(object sender, EventArgs e)
        {
            UpdateProductForm addForm = new UpdateProductForm(productcontroller, departmentcontroller);

            addForm.Show();
            addForm.FormClosing += new FormClosingEventHandler(ChildFormClosing);
            UpdateProductsList();
        }
示例#2
0
        private void btUpdate_Click(object sender, EventArgs e)
        {
            Product selectedProduct = (Product)lsbProducts.SelectedItem;

            UpdateProductForm addForm = new UpdateProductForm(productcontroller, departmentcontroller, selectedProduct);

            addForm.Show();
            addForm.FormClosing += new FormClosingEventHandler(ChildFormClosing);
        }