private void DeleteButton_Click(object sender, RoutedEventArgs e) { bool deleteSuccesFull; var result = MessageBox.Show($"Are you sure you want to delete tool: {toolID}?", "Delete Tool", MessageBoxButton.YesNo, MessageBoxImage.Question); // If the no button was pressed ... if (result == MessageBoxResult.Yes) { deleteSuccesFull = SqliteDataAcces.DeleteToolData(toolID); if (deleteSuccesFull) { MessageBox.Show($"Tool {toolID} succesfully deleted.", "Succesfull", MessageBoxButton.OK, MessageBoxImage.Information); SetDataGrid(); } else { MessageBox.Show($"Failed to delete Tool {toolID}!", "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation); } } }