private void ExecuteRemoveFromAssignedParticipationCommand(ShooterParticipationListItem shooterParticipation) { try { ShooterParticipation participation = _shooterParticipationDataStore.FindById(shooterParticipation.ShooterParticipationId); _shooterParticipationDataStore.Delete(participation); } catch (Exception e) { _shooterParticipationDataStore.Revert(); ReportException(e); } finally { LoadData(); } }
private void ExecuteRemoveFromAssignedParticipationCommand(ShooterParticipationListItem shooterParticipation) { try { ShooterParticipation participation = _shooterParticipationDataStore.FindById(shooterParticipation.ShooterParticipationId); _shooterParticipationDataStore.Delete(participation); } catch (Exception e) { ReportException(e); } finally { LoadAssignedParticipationList(); LoadAvailableParticipationList(); } }
private void OnSelectedShooterParticipationItemChanged(ShooterParticipationListItem selectedUiShooterParticipation) { //if (selectedUiShooterParticipation != null) //{ // ShooterParticipation shooterParticipation = _shooterParticipationDataStore.FindById(selectedUiShooterParticipation.ShooterParticipationId); // IEnumerable<ShooterParticipation> shooterParticipations = _shooterParticipationDataStore.FindByParticipationId(shooterParticipation.ParticipationId).ToList(); // StringBuilder detailsStringBuilder = new StringBuilder(); // detailsStringBuilder.AppendFormat("{0}\r\n", selectedUiShooterParticipation.ParticipationName); // foreach (ShooterParticipation participation in shooterParticipations) // { // Shooter shooter = _shooterDataStore.FindById(participation.ShooterId); // ShooterParticipation innerShooterParticipation = _shooterParticipationDataStore.FindByShooterId(shooter.ShooterId).First(); // Person person = shooter.PersonId == null // ? new Person() {FirstName = "unknown", LastName = "unknown"} // : _personDataStore.FindById((int) shooter.PersonId); // detailsStringBuilder.AppendFormat("\t{0}, {1} [{2}]\r\n", person.LastName, person.FirstName, innerShooterParticipation.ShooterParticipationId); // } // DetailsView = detailsStringBuilder.ToString(); //} }
private bool CanExecuteRemoveFromAssignedParticipationCommand(ShooterParticipationListItem shooterParticipation) { return(shooterParticipation != null); }
private bool CanExecuteRemoveFromAssignedParticipationCommand(ShooterParticipationListItem shooterParticipation) { return shooterParticipation != null; }