protected override void Delete() { if (ListViewBasic.SelectedItems.Count != 0) { // Get RefSubFamily from the ListView int RefSubFamily = int.Parse(ListViewBasic.SelectedItems[0].Text); if (ControllerManagement.DeleteSubFamily(RefSubFamily)) { ControllerManagement.RefreshListViewSubFamily(); MessageBox.Show("Succesfully deleted the SubFamily !"); } else { MessageBox.Show("Error : Fail to delete the SubFamily ! "); } } else { MessageBox.Show("Error : Choose a SubFamily before trying to delete it !"); } }