Exemplo n.º 1
0
 public ProductDto(Product product) : base(product)
 {
     if (product != null)
     {
         Number       = product.Number;
         SellingPrice = product.SellingPrice;
         Supplier     = new SupplierDto(product.Supplier);
     }
 }
Exemplo n.º 2
0
 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));
         }
     }
 }