Ein Recipe ordnet einem SalesItem eine Rezeptur zu. Eine Rezeptur besteht hierbei aus einer Liste von RecipeItems.
Inheritance: DomainEntity
Example #1
0
 void OnRecipeChanged(Recipe recipe)
 {
     var viewmodel = (from vm in AllRecipes where vm.Id == recipe.Id select vm).FirstOrDefault();
     if (viewmodel == null)
     {
         viewmodel = new SingleRecipeViewModel(recipe);
         AllRecipes.Add(viewmodel);
     }
     else
     {
         viewmodel.ExchangeData(recipe);
     }
     OnPropertyChanged("ItemSelected");
     OnPropertyChanged("ItemsSelected");
 }
 public SingleRecipeViewModel(Recipe recipe)
 {
     _recipe = recipe;
     base.DisplayName = _recipe.Plu.ToString();
 }
Example #3
0
 public EditRecipe(Recipe recipe)
 {
     Recipe = recipe;
 }
 public void ExchangeData(Recipe recipe)
 {
     _recipe = recipe;
 }