private void partsAddButton_Click(object sender, EventArgs e) { //PartForm addPart = new PartForm(); //this.Hide(); //addPart.Show(); this.Hide(); PartForm addPart = new PartForm(); addPart.ShowDialog(); addPart = null; this.Show(); }
private void partsModifyButton_Click(object sender, EventArgs e) { if (partsGridView.DefaultCellStyle.SelectionBackColor == System.Drawing.Color.Yellow) { partsGridView.ClearSelection(); partsGridView.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.White; this.Hide(); PartForm modifyPart = new PartForm(Inventory.SelectedPartPartID); modifyPart.ShowDialog(); modifyPart = null; this.Show(); } else { MessageBox.Show("No part is selected."); } }