private void InitMyStuff() { try { books = BLPlayer.GetBooks(true); lstBooks.DataContext = books; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnWrite_Click(object sender, RoutedEventArgs e) { try { Book current = (Book)spBook.DataContext; BLPlayer.UpdateBook(current); MessageBox.Show(string.Format("Kirja {0} päivitetty kantaan onnistuneesti", current.ToString())); } catch (Exception ex) { MessageBox.Show(ex.Message); } }