private void btnSparaNyProduktKategori_Click(object sender, EventArgs e) { string ProduktKategoriNamn = tbNyProduktKategori.Text; businessManager.AddProduktKategori(ProduktKategoriNamn); if (System.Windows.Forms.Application.OpenForms["frmRegistreraNyProdukt"] != null) { (System.Windows.Forms.Application.OpenForms["frmRegistreraNyProdukt"] as frmRegistreraNyProdukt).RefreshProduktKategori(); } MessageBox.Show(ProduktKategoriNamn + " sparad!", "Sparad", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); }