private void AddRecipeExecute()
        {
            try
            {
                AddNewRecipe recipe = new AddNewRecipe(user);
                recipe.ShowDialog();

                // updating the lists view
                if ((recipe.DataContext as AddNewRecipeModel).IsUpdateRecipe == true)
                {
                    RecipesData.Recipes = db.LoadRecipes();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Exception" + ex.Message.ToString());
            }
        }
예제 #2
0
 public AddNewRecipeModel(AddNewRecipe addRecipeOpen, tblUserData userToPass)
 {
     addRecipe = addRecipeOpen;
     user      = userToPass;
     recipe    = new tblRecipe();
 }