private void ButtonDelete_Click(object sender, RoutedEventArgs e) { try { control.Delete(((Button)sender).DataContext); LoadAccounts(); } catch (DataHasChildrenException) { var messageQueue = SnackbarThree.MessageQueue; Task.Factory.StartNew(() => messageQueue.Enqueue("Il y a des entrées, des sorties ou des transferts liés à ce compte !")); } }
private void ButtonDelete_Click(object sender, RoutedEventArgs e) { try { control.Delete(((Button)sender).DataContext); LoadAccounts(); } catch (DataHasChildrenException) { var messageQueue = SnackbarThree.MessageQueue; Task.Factory.StartNew(() => messageQueue.Enqueue("Existem entradas, saídas ou transferências vinculadas a esta conta!!")); } }