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);
        }
        public InscriptionProofWindow(AthleteDto athlete, CompetitionDto competition, TypesStatus status)
        {
            _athlete     = athlete;
            _competition = competition;

            InitializeComponent();

            _competitionService = new CompetitionService();
            _enrollService      = new EnrollService(_competition);

            var category = _enrollService.GetCategory(_athlete, _competition);

            _enrollService.InsertAthleteInCompetition(_athlete, _competition, status);

            TxJustificante.Text =
                $"Atleta: {_athlete.Name} {_athlete.Surname}\nCompetición: {_competition.Name}\nCategoría: {category}\nFecha de inscripción: {DateTime.Now.ToShortDateString()}\nPrecio de la inscripción: {_competition.Price} €";
        }