Example #1
0
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     //Mistä tiedetään mitä muokata? ----> Book-olio ID:stä!
     try
     {
         Book current = (Book)spBooks.DataContext;
         if (Bookshop.UpadeBook(current) > 0)
         {
             MessageBox.Show(string.Format("kirjat päivitetty onnistuneesti"));
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }