private async void editEntry(object sender, RoutedEventArgs e) { RecipeJournalEntry editingEntry = (RecipeJournalEntry)((MenuFlyoutItem)e.OriginalSource).DataContext; JournalDialog journalDialog = new JournalDialog(editingEntry); await journalDialog.ShowAsync(); recipe.updateJournalEntry(journalDialog.NewEntry); }
private async void showJournalDialog(object sender, RoutedEventArgs e) { JournalDialog journalDialog = new JournalDialog(); await journalDialog.ShowAsync(); if (journalDialog.NewEntry != null) { journalDialog.NewEntry.RecipeID = recipe.ID; recipe.addJournalEntry(journalDialog.NewEntry); } }