// Supplier's Modify Button private void btnModifySupplier_Click(object sender, EventArgs e) { SelectedRowSupplier(); // gets info for user selected row //creates new form object frmSupplierAddModify modifySupplierForm = new frmSupplierAddModify(); modifySupplierForm.addSupplier = false; //tells form the modift button was pressed modifySupplierForm.supplier = supplier; //passes values over to the supplier object in the form DialogResult result = modifySupplierForm.ShowDialog(); this.DisplaySupplier(); this.DisplayPackages(); this.DisplayPackageProdSup(); }
// Supplier's Add Button in supplier tab private void btnAddSupplier_Click(object sender, EventArgs e) { // call for new form frmSupplierAddModify addSupplierForm = new frmSupplierAddModify(); addSupplierForm.addSupplier = true; //tells form the add button was pressed DialogResult result = addSupplierForm.ShowDialog(); // show form if (result == DialogResult.OK) //if user selects ok from add form { supplier = addSupplierForm.supplier; this.DisplaySupplier(); this.DisplayPackages(); this.DisplayPackageProdSup(); } }