Exemplo n.º 1
0
 private void btnDeleteAll_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to delete all this information?", "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         foreach (Metar u in MetarGrid.SelectedItems)
         {
             u.Delete(u.Id.ToString());
         }
         RefreshUserList();
     }
     else
     {
         return;
     }
 }
Exemplo n.º 2
0
        private void deleteClick(object sender, RoutedEventArgs e)
        {
            Button button = sender as System.Windows.Controls.Button;
            Metar  metar  = button.DataContext as Metar;

            if (MessageBox.Show("Are you sure you want to delete this metar ?", "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
            {
                metar.Delete(metar.Id.ToString());
                RefreshUserList();
            }
            else
            {
                return;
            }
        }