/// <summary>
/// Function copy partial MenuPart (dishes which Ids in CopyList)
/// </summary>
/// <param name="copyList"></param>
/// <param name="copyFrom"></param>
public void CopyPartialMenuPart(CopyList copyList, MenuPart copyFrom)
{
int tempDishId;
//count of dishes to copy
int copyCount = copyList.MenuPartsCopyList[0].DishesIdsList.Count;
for (int i = 0; i < copyCount; i++)
{
tempDishId = copyList.MenuPartsCopyList[0].DishesIdsList[i];
Dish tempDish = new Dish();
tempDish.CopyFrom(copyFrom.Dishes.FirstOrDefault(c => c.Id == tempDishId));
tempDish.Id = this.MaxDishId() + 1;
tempDish.OrderBy = tempDish.Id;
this.Dishes.Add(tempDish);
}
}