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; }
public void RemoveProductCopy(ProductCopy productCopy) { try { bool deleted = productCopies.Remove(productCopy); if (!deleted) { throw new Exception(); } } catch (Exception) { throw new NotImplementedException(); } }
public void AddProductCopy(ProductCopy productCopy) { productCopies.Add(productCopy); }