private void DeleteItem_Click(object sender, EventArgs e) { if (selectedItem.itemID > 0) { if (MessageBox.Show("Are you sure you want to delete this item?", "Deleting...", MessageBoxButtons.YesNo) == DialogResult.Yes) { itemLogic.DeleteItem(selectedItem); selectedItem = new Item(); MessageBox.Show("Item was succesfully deleted"); ShowPanel("PNL_ManageStock"); } } else { MessageBox.Show("Selecteer eerst een product"); } }