private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     if (entry == null)
     {
         long newId = RecipeList.journalEntryIdGenerator.getId();
         entry = new RecipeJournalEntry(newId);
     }
     entry.setEntryDate(entryDatePicker.Date.Value);
     entry.setEntryNotes(entryNotesControl.Text);
     entry.setRating(entryRatingControl.Value);
 }
示例#2
0
        private void madeToday(object sender, RoutedEventArgs e)
        {
            long newId = RecipeList.journalEntryIdGenerator.getId();
            RecipeJournalEntry madeTodayEntry = new RecipeJournalEntry(newId);

            madeTodayEntry.setEntryDate(DateTime.Now);
            madeTodayEntry.setEntryNotes("Added as quick entry");
            madeTodayEntry.setRecipeId(recipe.ID);
            recipe.addJournalEntry(madeTodayEntry);

            FlyoutBase.ShowAttachedFlyout(this.mainContent);
        }