Beispiel #1
0
        private void buttonSave_Click(object sender, RoutedEventArgs e)
        {
            Meal meal = new Meal();

            meal.Name      = textName.Text;
            meal.Favourite = Favourite;
            meal.Notes     = Notes;

            int id = MealRepository.AddMeal(meal);

            NavigationService.Navigate(new System.Uri(String.Format("/MealPage.xaml?selectedItem={0}", id), UriKind.Relative));
        }