private void btnAdd_Click(object sender, EventArgs e) { frmNewProduct AddProduct = new frmNewProduct(); AddProduct.Buttonadd = true; AddProduct.ShowDialog(); Display(); }
private void modifyBtn_Click(object sender, EventArgs e) { frmNewProduct modifyProduct = new frmNewProduct(); modifyProduct.currentProduct = currentProduct; modifyProduct.ShowDialog(); context.SaveChanges(); Display(); }