private void UpdateRecipeExecute()
        {
            try
            {
                UpdadeRecipeByUser updateRecipe = new UpdadeRecipeByUser(RecipesData.Recipe);
                updateRecipe.ShowDialog();

                // updating the lists view
                if ((updateRecipe.DataContext as UpdadeRecipeByUserModel).IsUpdateRecipe == true)
                {
                    RecipesData.Recipes = db.LoadRecipes();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Exception" + ex.Message.ToString());
            }
        }
コード例 #2
0
 public UpdadeRecipeByUserModel(UpdadeRecipeByUser updateRecipeOpen, tblRecipe recipeToPass)
 {
     updateRecipe = updateRecipeOpen;
     recipe       = recipeToPass;
 }