Esempio n. 1
0
 public void addProduct(CanonicalProduct canonicalProduct, decimal price)
 {
     Product product = new Product(canonicalProduct, price);
     this.Products.Add(canonicalProduct.Uid, product);
 }
Esempio n. 2
0
 public OrderItem(SerializationInfo info, StreamingContext ctxt)
 {
     this.Product = (Product)info.GetValue("Product", typeof(Product));
     this.Quantity = (int)info.GetValue("Quantity", typeof(int));
 }
Esempio n. 3
0
 public void AddItem(Product product, int quantity)
 {
     OrderItem item = new OrderItem(product, quantity);
     this.Items.Add(item);
     this.TotalPrice += product.Price * quantity;
 }
Esempio n. 4
0
 public OrderItem(Product product, int quantity)
 {
     this.Product = product;
     this.Quantity = quantity;
 }