public void Delete(IObjectIdentifier <ulong> id) { var command = new InvoiceItemDeleteCommand(_dataSource, id.Value); if (!command.Execute()) { throw new ResourceNotFoundException(typeof(AddressEntity), id); } }
private void InitializeComponents() { // ComboBox Window.cmbType.Items.Add("Incoming"); Window.cmbType.Items.Add("Outgoing"); // Commands NewInvoiceItem = new InvoiceItemNewCommand(Window, this); DeleteInvoiceItem = new InvoiceItemDeleteCommand(Window, this); Cancel = new InvoiceCancelCommand(Window, this); Save = new InvoiceSaveCommand(Window, this); Print = new InvoicePrintCommand(Window, this); }