public ReceiptItem AddItemByPrice(double price) { var tax_amount = price * DefaultTaxAmount; var item = new ReceiptItem { ItemID = Guid.NewGuid(), ItemName = "", Price = price, Tax = tax_amount, }; Items.Add(item); PropertyChanged? .Invoke(this, new PropertyChangedEventArgs("SubTotal")); PropertyChanged? .Invoke(this, new PropertyChangedEventArgs("TotalTax")); PropertyChanged? .Invoke(this, new PropertyChangedEventArgs("Total")); return(item); }
public void RemoveItem(ReceiptItem item) { Items.Remove(item); }