コード例 #1
0
 public ProductDto(Product product) : base(product)
 {
     if (product != null)
     {
         Number       = product.Number;
         SellingPrice = product.SellingPrice;
         Supplier     = new SupplierDto(product.Supplier);
     }
 }
コード例 #2
0
ファイル: OrderDto.cs プロジェクト: puro-unverpackt/wearhouse
 public OrderDto(Order order)
 {
     if (order != null)
     {
         Id         = order.Id;
         Date       = order.Date;
         OrderState = order.State;
         Supplier   = new SupplierDto(order.Supplier);
         Products   = new List <ProductSupplierDto>();
         foreach (ProductSupplier product in order.Products)
         {
             Products.Add(new ProductSupplierDto(product));
         }
     }
 }