/// <summary> /// Used to instantiate a new transaction /// </summary> /// <param name="invoiceID">The invoice the transaction belongs to</param> /// <param name="item">The item being sold</param> /// <param name="quantity">How many of the item is being sold</param> public DBTransaction(int invoiceID, DBItem item, int quantity) { this.invoiceID = invoiceID; this.ItemID = item.GetItemID(); this.Desc = item.GetDescription(); this.ItemType = item.GetItemType(); this.Edition = item.GetEdition(); this.Condition = item.GetConditionType(); this.conditionID = item.GetConditionID(); this.Price = item.GetPrice(); this.Quantity = quantity; this.itemStock = item.GetQuantity(); }