Exemplo n.º 1
0
 public Order(Employee employee, ProductCopy productCopy, double price = 0, int count = 0, int id = -1)
 {
     this.id          = (id != -1 ? id : index++);
     this.employee    = employee;
     this.productCopy = productCopy;
     this.price       = (price > 0 ? price : 1);
     this.count       = (count >= 0 ? count : 0);
     orderDate        = DateTimeOffset.Now;
 }
Exemplo n.º 2
0
 public void RemoveProductCopy(ProductCopy productCopy)
 {
     try {
         bool deleted = productCopies.Remove(productCopy);
         if (!deleted)
         {
             throw new Exception();
         }
     } catch (Exception) {
         throw new NotImplementedException();
     }
 }
Exemplo n.º 3
0
 public void AddProductCopy(ProductCopy productCopy)
 {
     productCopies.Add(productCopy);
 }