//modify button pressed in package tab private void btnModifyPackage_Click(object sender, EventArgs e) { SelectedRowPackage(); AddModifyPackages modifyPackages = new AddModifyPackages(); modifyPackages.addPackage = false; modifyPackages.package = package; DialogResult result = modifyPackages.ShowDialog(); //shows add modify package form this.DisplayPackages(); this.DisplayPackageProdSup(); }
//add button pressed in package tab private void btnAddPackage_Click(object sender, EventArgs e) { AddModifyPackages addModifyPackage = new AddModifyPackages(); addModifyPackage.addPackage = true; DialogResult result = addModifyPackage.ShowDialog(); //showing the add modify package form if (result == DialogResult.OK) //if user clicks accept in other form { package = addModifyPackage.package; this.DisplayPackages(); this.DisplayPackageProdSup(); } }