private void ExecuteAddCommand(string obj) { ShooterCollection sc = new ShooterCollection { CollectionName = obj }; _shooterCollectionDataStore.Create(sc); UiEventsDelegate<UiParticipation> handler = _uiEvents.FetchSelectedParticipation; if (handler != null) { UiParticipation p = handler(); if (p != null) { ShooterCollectionParticipation scp = new ShooterCollectionParticipation { ParticipationId = p.ParticipationId, ShooterCollectionId = sc.ShooterCollectionId }; _shooterCollectionParticipationDataStore.Create(scp); } } _windowService.CloseTextBoxInputDialog(); }
private void ExecuteCreateParticipationCommand(ParticipationDraft participationDraft) { ShooterCollection shooterCollection = new ShooterCollection { CollectionName = participationDraft.ParticipationName }; _shooterCollectionDataStore.Create(shooterCollection); ShooterCollectionParticipation collectionParticipation = new ShooterCollectionParticipation { ParticipationId = participationDraft.ParticipationType.ParticipationTypeId, ShooterCollectionId = shooterCollection.ShooterCollectionId }; _shooterCollectionParticipationDataStore.Create(collectionParticipation); _windowService.CloseCreateParticipationWindow(); }