/// <summary>
        /// Creates a new <see cref="PlayerListItem"/> to be added to the list view.
        /// </summary>
        /// <returns>The created <see cref="PlayerListItem"/>.</returns>
        private PlayerListItem CreatePlayerItem()
        {
            PlayerListItem newPlayerItem = new PlayerListItem();
            newPlayerItem.FirstName = txtFirstName.Text;
            newPlayerItem.LastName = txtLastName.Text;
            newPlayerItem.Birthday = datePicker.Value;
            newPlayerItem.Country = ((ApplicationConfig.CountryCodeItem)cbxCountries.SelectedItem).Code;
            newPlayerItem.Remark = rtxtRemark.Text;
            newPlayerItem.Height = (!string.IsNullOrEmpty(txtHeight.Text)) ? (int?)int.Parse(txtHeight.Text) : null;
            newPlayerItem.Weight = (!string.IsNullOrEmpty(txtWeight.Text)) ? (double?)double.Parse(txtWeight.Text) : null;

            return newPlayerItem;
        }
        /// <summary>
        /// Handles the Load event of the EditPlayersForm control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void EditPlayersForm_Load(object sender, EventArgs e)
        {
            // Load available player definitons from database

            team = database.LoadCurrentTeam(teamDescriptor);

            // Load all values from the players

            List<Player> playerList = database.LoadAllPlayersOfTeam(team);
            database.LoadCurrentHistory(playerList);

            lvwPlayers.BeginUpdate();

            // Add existing players to list view

            foreach (Player player in playerList)
            {
                PlayerListItem playerItem = new PlayerListItem(player);
                ListViewItem listItem = lvwPlayers.Items.Add(new ListViewItem(playerItem.ToArray()));
                listItem.Name = playerItem.Id.ToString();
                listItem.Tag = playerItem;
            }

            // Auto size columns to best fit

            Gui.AutoAdjustListViewColumns(lvwPlayers);

            lvwPlayers.EndUpdate();
        }
        /// <summary>
        /// Creates the <see cref="Player"/> instance of associated <paramref name="item"/>.
        /// </summary>
        /// <param name="item">The <see cref="PlayerListItem"/> to convert to a <see cref="Player"/>.</param>
        /// <returns>The corresponding <see cref="Player"/></returns>
        private Player CreatePlayer(PlayerListItem item)
        {
            PlayerDao playerDao = (PlayerDao) DaoFactory.CreateDao<Player>();
            PlayerDataHistoryDao historyDao = (PlayerDataHistoryDao) DaoFactory.CreateDao<PlayerDataHistory>();
            PlayerReferenceDao referenceDao = (PlayerReferenceDao) DaoFactory.CreateDao<PlayerReference>();

            // Set the history infos

            historyDao.Height = item.Height;
            historyDao.Weight = item.Weight;
            historyDao.Remark = item.Remark;

            // Set the player reference infos

            referenceDao.PlayerDao = playerDao;
            referenceDao.TeamDao = team.Dao;

            // Set the player infos

            playerDao.FirstName = item.FirstName;
            playerDao.LastName = item.LastName;
            playerDao.Birthday = item.Birthday;
            playerDao.Country = item.Country;
            playerDao.DataHistoryDao = historyDao;
            playerDao.ReferenceDao = referenceDao;

            // Create the corresponding domain object

            return (Player) playerDao.CreateDomainObject();
        }