public IActionResult UpdateSpecialTask(SpecialTask specialTask) { try { specialTaskService.Update(specialTask); } catch (Exception ex) { return(BadRequest(ex)); } return(Ok()); }
public IActionResult SpecialTaskUpload(SpecialTask specialTask) { try { specialTaskService.Create(specialTask); } catch (Exception ex) { return(BadRequest(ex)); } return(Ok()); }
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); } }