Amounts() public method

public Amounts ( ) : ItemList
return ItemList
Esempio n. 1
0
 private String formatOrderItem(Food item)
 {
     String amount = item.Amounts().ReturnSingle().Name();
     String name = item.Name();
     if (item.Amounts().ReturnSingle().Price() > 1) {
         name += "s"; //plural
     }
     String option = item.Options().ReturnSingle().Name();
     String size = item.SizeName();
     String price = "$" + item.Price().ToString("N2");
     if (option.ToLower().Equals("none"))
     {
         return amount + " " + size + " " + name + " " + ": " + price;
     }
     else {
         return amount + " " + size + " " + name + " " + "with " + option + ": " + price;
     }
 }