12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace StoreServer
- {
- partial class Order
- {
- public string ProductInOrderString
- {
- get
- {
- string Product = "";
- foreach (var item in ProductInOrder)
- {
- Product += $"{item.ProductInStore.Product.NameProduct} {item.AmountProduct.ToString("F2")} руб. * {item.AmountProduct}\n";
- }
- return Product;
- }
- }
- public decimal CostOfOrder
- {
- get
- {
- decimal Cost = 0;
- foreach (var item in ProductInOrder)
- {
- Cost += item.ProductInStore.Product.PriceOfOne * item.AmountProduct;
- }
- return Cost;
- }
- }
- }
- }
|