public void ExecuteCommand(ICommand command) { if (command.Execute()) { _history.Push(command); } }
public void Execute() { _previousProductsInInvoice = _invoiceService.Products.ToList(); _previousProductsInInventory = _inventoryService.Products.ToList(); _invoiceService.AddProductToInvoice(_product); _inventoryService.AddProductToDelivery(_product); _commandHistory.Push(this); }