private void InvoiceSelected(InvoiceListItemView obj) { ActionPanels.Clear(); var invoiceActions = new InvoiceActionPanelViewFactory(obj); ActionPanels.Add(invoiceActions.CreateActionPanelView()); _invoiceListItemView = obj; PreviewInvoiceCommand.RaiseCanExecuteChanged(); PreviewSpecificationCommand.RaiseCanExecuteChanged(); CreditNoteCommand.RaiseCanExecuteChanged(); Recalculateinvoice.RaiseCanExecuteChanged(); EmailInvoice.RaiseCanExecuteChanged(); RegenerateFiles.RaiseCanExecuteChanged(); }
private void ApplyActionPanel(ListItemModelBase obj) { if (obj == null) { RemoveActionPanels(); return; } _canExportToExcel = true; ExportToExcel.RaiseCanExecuteChanged(); var actionPanelViewFactory = obj.ActionPanelViewFactory; if (actionPanelViewFactory != null) { RemoveActionPanels(); ActionPanels.Add(actionPanelViewFactory.CreateActionPanelView()); //OnPropertyChanged("ActionPanels"); } }