Ejemplo n.º 1
0
 public OrderItem(Watch watch, int quanity)
 {
     Watch      = watch;
     Quanity    = quanity;
     TotalPrice = watch.Price * quanity;
 }
Ejemplo n.º 2
0
 public void AddOrderItem(Watch watch, int quantity)
 {
     this.OrderItems.Add(new OrderItem(watch, quantity));
     this.totalPrice += this.OrderItems.Last().TotalPrice;
 }