private void OnExecuteAutomationCommand(CommandContainerButton obj) { obj.NextValue(); if (!string.IsNullOrEmpty(obj.CommandContainer.AutomationCommand.Values) && !obj.CommandContainer.AutomationCommand.ToggleValues) { obj.CommandContainer.AutomationCommand.PublishEvent(EventTopicNames.SelectAutomationCommandValue); } else { if (SelectedOrders.Any()) { foreach (var selectedOrder in SelectedOrders) { _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, Order = selectedOrder, AutomationCommandName = obj.Name, Value = obj.SelectedValue }); } } else { _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, AutomationCommandName = obj.Name, Value = obj.SelectedValue }); } _ticketOrdersViewModel.SelectedTicket = SelectedTicket; ClearSelectedItems(); ClearSelection = true; RefreshVisuals(); if (SelectedTicket != Ticket.Empty) { EventServiceFactory.EventService.PublishEvent(EventTopicNames.RefreshSelectedTicket); } } }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { obj.NextValue(); _automationService.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, AutomationCommandName = obj.Name, Value = obj.SelectedValue }); }
private bool CanExecuteAutomationCommand(CommandContainerButton arg) { return(arg.IsEnabled && arg.CommandContainer.CanExecute(SelectedTicket) && _expressionService.EvalCommand(FunctionNames.CanExecuteAutomationCommand, arg.CommandContainer.AutomationCommand, new { Ticket = SelectedTicket }, true)); }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { obj.NextValue(); if (!string.IsNullOrEmpty(obj.CommandContainer.AutomationCommand.Values) && !obj.CommandContainer.AutomationCommand.ToggleValues) obj.CommandContainer.AutomationCommand.PublishEvent(EventTopicNames.SelectAutomationCommandValue); else { if (SelectedOrders.Any()) { foreach (var selectedOrder in SelectedOrders) { _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, Order = selectedOrder, AutomationCommandName = obj.Name, Value = obj.SelectedValue }); } } else { _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, AutomationCommandName = obj.Name, Value = obj.SelectedValue }); } _ticketOrdersViewModel.SelectedTicket = SelectedTicket; ClearSelectedItems(); ClearSelection = true; RefreshVisuals(); if (SelectedTicket != Ticket.Empty) { EventServiceFactory.EventService.PublishEvent(EventTopicNames.RefreshSelectedTicket); } } }
private bool CanExecuteAutomationCommand(CommandContainerButton arg) { return arg.IsEnabled; }
private bool CanExecuteAutomationCommand(CommandContainerButton arg) { return arg.IsEnabled && arg.CommandContainer.CanExecute(SelectedTicket) && _expressionService.EvalCommand(FunctionNames.CanExecuteAutomationCommand, arg.CommandContainer.AutomationCommand, new { Ticket = SelectedTicket }, true); }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { ExecuteAutomationCommand(obj.CommandContainer.AutomationCommand, obj.SelectedValue, obj.GetNextValue()); obj.NextValue(); }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { obj.NextValue(); ExecuteAutomationCommand(obj.CommandContainer.AutomationCommand, obj.SelectedValue); }
private bool CanExecuteAutomationCommand(CommandContainerButton arg) { return(arg.IsEnabled); }