protected override void DoExecute(ExecutionEvent executionEvent) { try { ICollection <Guid> idsToRemove = TreeNavigationItem.CollectIds(executionEvent.GetSelectedTreeNavigationItems()); string questionMessage = GetQuestionMessage(idsToRemove.Count, executionEvent.GetFirstSelectedTreeNavigationItem().Name); if (MessageBoxResult.No.Equals(MessageDialogUtils.Question(questionMessage, executionEvent.GetFirstSelectedTreeNavigationItem().Name))) { return; } foreach (Guid idToRemove in idsToRemove) { Delete(executionEvent, idToRemove); OnSuccessful(executionEvent, idToRemove); } } catch (ValidationException ex) { WindowsManager.GetInstance().ShowDialog <MessageWindow>(new MessageWindowModelView(ex.GetValidationResult())); } }
protected override void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId) { }
protected override void OnFailure(ExecutionEvent executionEvent) { Log.Error("Error during the copying"); }
protected override void DoExecute(ExecutionEvent executionEvent) { Clipboard.SetData("copy", executionEvent.GetSelectedTreeNavigationItems()); }
protected abstract void OnFailure(ExecutionEvent executionEvent);
protected abstract void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId);
protected abstract void DoExecute(ExecutionEvent executionEvent);
protected override void OnFailure(ExecutionEvent executionEvent) { throw new NotImplementedException(); }
protected override void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId) { throw new NotImplementedException(); }
protected override void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId) { Log.Info(string.Format("Entity '{0}' was deleted", affectedObjectId)); Publisher.GetInstance().Publish(PublishEvent.CreateDeletionEvent(affectedObjectId, null)); }
public static void Execute <T>(ExecutionEvent executionEvent) where T : BaseHandler { T handler = Activator.CreateInstance <T>(); handler.Execute(executionEvent); }
protected override void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId) { Log.Info(string.Format("Entity '{0}' was craeted", affectedObjectId)); Publisher.GetInstance().Publish(PublishEvent.CreateCreationEvent(affectedObjectId, executionEvent.GetFirstSelectedTreeNavigationItem().Id)); }
protected override void OnFailure(ExecutionEvent executionEvent) { Log.Error("Error during the insertion of the entity"); }
protected virtual T CreateNewDto(ExecutionEvent executionEvent) { return(Activator.CreateInstance <T>()); }
protected virtual WizardModelView <T> CreateWizardModelView(ExecutionEvent executionEvent) { return(new WizardModelView <T>(CreateNewDto(executionEvent))); }