public IngredientsList(OrderDetailDTO od)
     : this()
 {
     OrderDetail = od;
     foreach(var item in od.Ingredients)
     {
         IngredientsCollection.Add(new IngredientsListItem() { OrderIngredient = item, Size = od.Size });
     }
 }
Example #2
0
 public PizzaRow(OrderDetailDTO orderDetail)
     : this()
 {
     this.OrderDetail = orderDetail;
 }
Example #3
0
 internal void AddOrder()
 {
     var ingr = new List<OrderIngredientDTO>();
     foreach (var item in IngredientsCollection)
     {
         if (item.CurrentQuantity > 0)
             ingr.Add(new OrderIngredientDTO()
             {
                 ExtraWeight = item.Ingredient.ExtraWeight,
                 NormalWeight = item.Ingredient.NormalWeight,
                 IngredientID = item.Ingredient.IngredientID,
                 Name = item.Ingredient.Name,
                 Quantity = item.CurrentQuantity
             });
     }
     var orderDetail = new OrderDetailDTO()
     {
         Ingredients = ingr,
         Size = CurrentSizeValue
     };
     OrderedPizzasCollection.Add(new IngredientsList(orderDetail));
 }