示例#1
0
        private string GetEventPlayer(int?playerID)
        {
            string fullName = string.Empty;

            if (playerID != null && playerID > 0)
            {
                PlayerOfMatch player = PlayersOfMatch?.FirstOrDefault(x => x.PlayerOfMatchID == playerID);
                fullName = player?.FirstName + " " + player?.LastName;
            }
            return(fullName.Trim());
        }
示例#2
0
 private void SetPlayerInRowByPlayingStatus(PlayersInRow playersInRow, PlayerOfMatch playerOfMatch)
 {
     if (playerOfMatch.TeamName?.Trim() == Match?.HomeTeam?.Trim())
     {
         playersInRow.FirstPlayer = playerOfMatch;
     }
     if (playerOfMatch.TeamName?.Trim() == Match?.AwayTeam?.Trim())
     {
         playersInRow.SecondPlayer = playerOfMatch;
     }
     ;
 }
示例#3
0
        private PlayersInRow CreatePlayerInRow(ObservableCollection <PlayerOfMatch> biggerList, ObservableCollection <PlayerOfMatch> smallerList, int index)
        {
            PlayerOfMatch playerOfMatch = biggerList[index];
            PlayersInRow  playersInRow  = new PlayersInRow();

            playersInRow.PlayingStatus = playerOfMatch.PlayingStatus;
            SetPlayerInRowByPlayingStatus(playersInRow, playerOfMatch);
            if (index < smallerList.Count)
            {
                playerOfMatch = smallerList[index];
                SetPlayerInRowByPlayingStatus(playersInRow, playerOfMatch);
            }
            return(playersInRow);
        }