private void addPartButton_Click(object sender, EventArgs e) { this.Hide(); Inventory.CurrentPartIndex = -1; PartForm partForm = new PartForm(); partForm.Show(); }
private void modifyPartButton_Click(object sender, EventArgs e) { if (Inventory.CurrentPartIndex >= 0) { this.Hide(); PartForm partForm = new PartForm(); partForm.Show(); } else { MessageBox.Show("Please select a part to modify."); } }