public void DeleteButton_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Click OK to confirm deletion.", "Remove Row", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                Inventory.CurrentProduct.RemoveAssociatedPart(Inventory.CurrentAssociatedPart);

                ModifyProductForm myModifyProductForm = new ModifyProductForm();
                this.Hide();
                myModifyProductForm.Show();
            }
        }
 private void ProductsModifyButton_Click(object sender, EventArgs e)
 {
     try
     {
         ModifyProductForm myModifyProductForm = new ModifyProductForm();
         this.Hide();
         myModifyProductForm.Show();
     }
     catch
     {
         MessageBox.Show("Please select a product from the list to modify.", "Main Screen Form");
     }
 }
        private void AddButton_Click(object sender, EventArgs e)
        {
            if (Inventory.CurrentPart != null)
            {
                Inventory.CurrentProduct.AddAssociatedPart(Inventory.CurrentPart);

                ModifyProductForm myModifyProductForm = new ModifyProductForm();
                this.Hide();
                myModifyProductForm.Show();
            }
            else
            {
                MessageBox.Show("Please select a part from the list to modify.", "Main Screen Form", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }