private void RemoveData_Click(object sender, RoutedEventArgs e)
 {
     if (SelectedRow != null && MessageBoxResult.Yes == MessageBox.Show("Na pewno chcesz usunąć dane polowania?", "Pytanie", MessageBoxButton.YesNo, MessageBoxImage.Question))
     {
         _dbAccess.RemoveHuntedAnimal(SelectedRow);
         HuntedAnimals.Remove(SelectedRow);
         SelectedRow = null;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Deletes the object.
        /// </summary>
        /// <returns></returns>
        public async Task DeleteObject()
        {
            var StatusCode = await ApiCall.Delete(path, HuntedAnimal.HuntedAnimalId);

            //Value = StatusCode.ToString();

            if (StatusCode.ToString() == "OK")
            {
                //var temp = Animal;
                //Animal = null;
                HuntedAnimals.Remove(HuntedAnimal);
            }
        }