private void addBtn_Click(object sender, EventArgs e) { AddModify addNew = new AddModify(); //opens new form to add a record addNew.AddButtonSet = true; addNew.ShowDialog(); Display(); }
private void modifyBtn_Click(object sender, EventArgs e) { AddModify modifyProduct = new AddModify(); // opens a new form to modify selected record modifyProduct.currentProduct = currentProduct; modifyProduct.AddButtonSet = false; modifyProduct.ShowDialog(); Display(); }