コード例 #1
0
 public void addFoodToOrder(Model.Food food)
 {
     this.Order.addFoodToOrder(food);
     OnPropertyChanged("Order");
     OnPropertyChanged("Order.Amount");
     OnPropertyChanged("Order.ID");
 }
コード例 #2
0
ファイル: ModelView.cs プロジェクト: Nichtgian/giancheeez
        public string showSelectedFoodDetails(Model.Food food)
        {
            string ingredients = "";

            if (food.Ingredients != null && food.Ingredients.Count > 0)
            {
                foreach (Model.Ingredient ingredient in food.Ingredients)
                {
                    ingredients += "\nName: " + ingredient.Name + " Amount: " + ingredient.Amount + " Calorie: " + ingredient.Calorie;
                }
            }
            return("ID: " + food.ID + "\nName: " + food.Name + "\nPiece Price: " + food.Price + "\n\n Ingredients:" + ingredients);
        }