public void SetPlayerDetails(Player player) { lblAge.Content = player.GetAge(); lblContact.Content = player.GetContact(); lblFirstName.Content = player.GetFName(); lblGuardian.Content = player.GetGuardian(); lblLastName.Content = player.GetLName(); txtBlMedical.Text = player.GetMedical(); }
public void SetPlayerDetails(Player editingPlayer) { tbAge.Text = editingPlayer.GetAge().ToString(); tbContact.Text = editingPlayer.GetContact(); tbFirstName.Text = editingPlayer.GetFName(); tbGuardian.Text = editingPlayer.GetGuardian(); tbLastName.Text = editingPlayer.GetLName(); tbMedical.Text = editingPlayer.GetMedical(); }
public void UpdatePlayer(Player editPlayer) { players[editPlayer.GetP_ID()] = editPlayer; var updatePlayer = SqlQueries.UpdatePlayer(editPlayer.GetP_ID(), editPlayer.GetFName(), editPlayer.GetLName(), editPlayer.GetAge(), editPlayer.GetGuardian(), editPlayer.GetContact(), editPlayer.GetMedical()); var updatePlayerCommand = new SQLiteCommand(updatePlayer, dbConnection); updatePlayerCommand.ExecuteNonQuery(); }
public void InsertPlayer(Player newPlayer) { newPlayer.SetP_ID(playerCounter); players.Add(playerCounter++, newPlayer); var insertPlayer = SqlQueries.InsertPlayer(newPlayer.GetP_ID(), newPlayer.GetFName(), newPlayer.GetLName(), newPlayer.GetAge(), newPlayer.GetGuardian(), newPlayer.GetContact(), newPlayer.GetMedical()); var insertPlayerCommand = new SQLiteCommand(insertPlayer, dbConnection); insertPlayerCommand.ExecuteNonQuery(); }