Esempio n. 1
0
        private void InitMyStuff()
        {
            try
            {
                books = BLPlayer.GetBooks(true);

                lstBooks.DataContext = books;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
        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);
            }
        }