private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            string error = Validate();

            if (!string.IsNullOrWhiteSpace(error))
            {
                MessageBox.Show(error);
            }
            else
            {
                PokemonStats statWindow = new PokemonStats
                {
                    StatPass = this
                };
                statWindow.ShowDialog();

                //Initialize statPool
                StatPool statPool = new StatPool
                {
                    Id = DatabaseOperations.CurrentStatpools() + 1
                };


                //Initialize stat collections
                StatCollection BaseStats     = new StatCollection();
                StatCollection EVStats       = new StatCollection();
                StatCollection IVStats       = new StatCollection();
                StatCollection EVRewardStats = new StatCollection();

                //Assign Values
                BaseStats.Id             = DatabaseOperations.CurrentStatCollections() + 1;
                BaseStats.HP             = baseHP;
                BaseStats.Attack         = baseAtt;
                BaseStats.Defense        = baseDef;
                BaseStats.SpecialAttack  = baseSpAtt;
                BaseStats.SpecialDefence = baseSpDef;
                BaseStats.Speed          = baseSpeed;

                EVStats.Id             = DatabaseOperations.CurrentStatCollections() + 2;
                EVStats.HP             = 0;
                EVStats.Attack         = 0;
                EVStats.Defense        = 0;
                EVStats.SpecialAttack  = 0;
                EVStats.SpecialDefence = 0;
                EVStats.Speed          = 0;

                Random rnd = new Random();
                IVStats.Id             = DatabaseOperations.CurrentStatCollections() + 3;
                IVStats.HP             = rnd.Next(1, 32);
                IVStats.Attack         = rnd.Next(1, 32);
                IVStats.Defense        = rnd.Next(1, 32);
                IVStats.SpecialAttack  = rnd.Next(1, 32);
                IVStats.SpecialDefence = rnd.Next(1, 32);
                IVStats.Speed          = rnd.Next(1, 32);

                EVRewardStats.Id             = DatabaseOperations.CurrentStatCollections() + 4;
                EVRewardStats.HP             = EVHP;
                EVRewardStats.Attack         = EVAtt;
                EVRewardStats.Defense        = EVDef;
                EVRewardStats.SpecialAttack  = EVSpAtt;
                EVRewardStats.SpecialDefence = EVSpDef;
                EVRewardStats.Speed          = EVSpeed;


                //Bind with statpool
                if (DatabaseOperations.AddStatCollection(BaseStats) != 0 &&
                    DatabaseOperations.AddStatCollection(EVStats) != 0 &&
                    DatabaseOperations.AddStatCollection(IVStats) != 0 &&
                    DatabaseOperations.AddStatCollection(EVRewardStats) != 0)
                {
                    statPool.BaseStatId       = BaseStats.Id;
                    statPool.EVStatId         = EVStats.Id;
                    statPool.IVStatId         = IVStats.Id;
                    statPool.EffortValueYield = EVRewardStats.Id;

                    statPool.Nature = "Timid";

                    if (DatabaseOperations.AddStatPool(statPool) != 0)
                    {
                        Pokemon PokemonToAdd = new Pokemon
                        {
                            Id           = DatabaseOperations.CurrentPokemons() + 1,
                            PokedexID    = cmbPokemon.SelectedIndex + 1,
                            PokemonLevel = int.Parse(txtLvl.Text)
                        };
                        PokemonToAdd.PokemonExp = PokemonToAdd.PokemonLevel * PokemonToAdd.PokemonLevel * PokemonToAdd.PokemonLevel;
                        PokemonToAdd.TrainerID  = currentTrainer.Id;
                        PokemonToAdd.AbilityID  = abilityList[cmbAbility.SelectedIndex].Id;
                        PokemonToAdd.StatPoolID = statPool.Id;
                        if (cmbGender.SelectedIndex == 0)
                        {
                            PokemonToAdd.Gender = false;
                        }
                        else
                        {
                            PokemonToAdd.Gender = true;
                        }
                        PokemonToAdd.Nickname = txtName.Text;
                        PokemonToAdd.Shiny    = false;
                        PokemonToAdd.PokeRus  = false;

                        if (DatabaseOperations.AddPokemon(PokemonToAdd) != 0)
                        {
                            LoadDefaultMoves(PokemonToAdd.Id);

                            if (DatabaseOperations.LearnNewMove(DefaultMoves1) != 0 &&
                                DatabaseOperations.LearnNewMove(DefaultMoves2) != 0)
                            {
                                PokemonGroup GroupToAddTo = new PokemonGroup
                                {
                                    Id        = DatabaseOperations.CurrentPokemonGroups() + 1,
                                    PlayerId  = currentTrainer.Id,
                                    PokemonId = PokemonToAdd.Id,
                                    Position  = int.Parse(cmbPosition.Text)
                                };
                                //Enkel als alle stats correct er in zijn geplaatst, word de pokemon in de groep geplaatsts
                                //Bij falen word het een onbereikbaar database element binnen de context van dit programma
                                if (DatabaseOperations.AddToGroup(GroupToAddTo) != 0)
                                {
                                    MessageBox.Show($"{PokemonToAdd.Nickname} is succesvol toegevoegd aan de party van {currentTrainer.TrainerName}");
                                    Close();
                                }
                                else
                                {
                                    MessageBox.Show("Fout in groep creatie; toevoeging niet afgerond");
                                }
                            }
                            else
                            {
                                MessageBox.Show("Geen moves meegegeven; Toevoeging niet afgerond");
                            }
                        }
                        else
                        {
                            MessageBox.Show("Geen valide pokemon; Toevoeging niet afgerond");
                        }
                    }
                    else
                    {
                        MessageBox.Show("Fout in de statpool; toevoeging niet afgerond");
                    }
                }
                else
                {
                    MessageBox.Show("één of meerder van de statcollections zijn niet valide; toevoeging niet afgerond");
                }
            }
        }