Example #1
0
        private void ButtonDeleteAmbulance_Click(object sender, RoutedEventArgs e)
        {
            var item = (Ambulance)dataGridAmbulances.SelectedItem;

            if (item == null)
            {
                return;
            }

            if (MessageBox.Show("Do you want to delete this Amb?", "Delete", MessageBoxButton.YesNo,
                                MessageBoxImage.Warning) == MessageBoxResult.Yes)
            {
                ambulance.Delete(item.Id);
                GetAmbulances();
            }
        }