public ViewIngredients(RecipesModel db) { InitializeComponent(); Ingredients = new Ingredients(db); Clear(); Refresh(); }
/// <summary> /// Find a reference of RecipesModel and use it as Db on this window /// </summary> /// <returns>True if it found and set the Db reference. False otherwise</returns> private bool FindAndMaybeSetDb() { bool set = false; ViewRecipes viewRecipes = FindViewRecipes(); if (viewRecipes != null) { Db = viewRecipes.Db; set = true; } return(set); }
public Ingredients(RecipesModel recipesModel) { Db = recipesModel; RefreshList(); }
public Recipes(RecipesModel recipesModel) { Db = recipesModel; RefreshList(); }