private void btnAddEdit_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         bool result = DatabaseAccess.SaveEditedEntryToSQLite(headacheObj);
         // lisätään tiedot tietokantaan
         if (result)
         {
             MessageBox.Show("Edit added to database", "Edit added", MessageBoxButton.OK);
         }
         else
         {
             MessageBox.Show("Edit could not be added to database", "Edit error", MessageBoxButton.OK);
         }
         // sulkee tämän
         this.Close();
     }
     catch (InvalidOperationException ex) // Näyttää virheviestin
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK);
     }
 }