private void BtFinish_Click(object sender, RoutedEventArgs e) { if (CompetitionsToSelect.SelectedItem == null) { MessageBox.Show(Properties.Resources.NothingSelected); return; } _competition = _competitionService.ListCompetitionsToPreinscribeObject(_athlete) .ElementAt(CompetitionsToSelect.SelectedIndex); if (_enrollService.IsAthleteInComp(_competition, _athlete)) { MessageBox.Show(Properties.Resources.PreviouslyEnrolled); return; } new DialogPreinscripted(_athlete, _competition).ShowDialog(); var competitionService = new CompetitionService(); var enrollService = new EnrollService(_competition); var category = _enrollService.GetCategory(_athlete, _competition); _enrollService.InsertAthleteInCompetition(_athlete, _competition, TypesStatus.PreRegistered); LoadData(TxDni.Text); }