Esempio n. 1
0
 public IActionResult UpdateSpecialTask(SpecialTask specialTask)
 {
     try
     {
         specialTaskService.Update(specialTask);
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
     return(Ok());
 }
Esempio n. 2
0
 public IActionResult SpecialTaskUpload(SpecialTask specialTask)
 {
     try
     {
         specialTaskService.Create(specialTask);
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
     return(Ok());
 }
Esempio n. 3
0
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            if (Selected == null)
            {
                MessageBox.Show("Select line", "Not selected", MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }

            MessageBoxResult result = MessageBox.Show("Do you want to delete this line?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                var selected = Selected;
                Selected = null;
                Items.Remove(selected);
            }
        }