public Layots(LayoutEnt layoutEnt) { Id = layoutEnt.Id; foreach (var x in layoutEnt.ProductForDish) { ProductForDish.Add(new Product(x.Key), x.Value); } Dish = layoutEnt.Dish; }
public Dish(DishEnt dish) { Id = dish.Id; Name = dish.Name; Weight = dish.Weight; Price = dish.Price; LayoutDish = new Layots(dish.LayoutDish); RecipeDish = new RecipeDish(dish.RecipeDish); Kitchen = dish.Kitchen; }
/// <summary> /// Creates an item Dish /// </summary> /// <param name="dishEnt">Convertible item DishEnt</param> /// <returns>Dish</returns> public static Dish NewDish(DishEnt dishEnt) { Dish dishs = new Dish(); dishs.Id = dishEnt.Id; dishs.Name = dishEnt.Name; dishs.Weight = dishEnt.Weight; dishs.Price = dishEnt.Price; dishs.LayoutDish = NewLayouts(dishEnt.LayoutDish); dishs.RecipeDish = NewRecipeDish(dishEnt.RecipeDish); dishs.Kitchen = dishEnt.Kitchen; return(dishs); }
void AddDish(string name, decimal weight, decimal price, LayoutEnt layot, RecipeDishEnt recipe, string kitchen) { DishEnt dish = new DishEnt(name, weight, price, layot, recipe, kitchen); Unit.DishesRepository.AddItem(dish); }
/// <summary> /// Creates an item DishEnt /// </summary> /// <param name="dish">Convertible item Dish</param> /// <returns>DishEnt</returns> public static DishEnt NewDishEnt(Dish dish) { DishEnt dishEnt = new DishEnt(dish.Name, dish.Weight, dish.Price, NewLayoutEnt(dish.LayoutDish), NewRecipeDishEnt(dish.RecipeDish), dish.Kitchen); return(dishEnt); }
void AddRecipe(string recipe, DishEnt dish) { RecipeDishEnt recipeForDish = new RecipeDishEnt(recipe, dish); Unit.RecipesRepository.AddItem(recipeForDish); }
public LayoutEnt(Dictionary <ProductEnt, decimal> productForDish, DishEnt dish) { ProductForDish = productForDish; Dish = dish; }
void AddLayots(Dictionary <ProductEnt, decimal> productForDish, DishEnt dish) { LayoutEnt layot = new LayoutEnt(productForDish, dish); Unit.LayotsRepository.AddItem(layot); }