public MatchPlayerViewModel(MatchPlayer matchPlayer)
 {
     
     Id = matchPlayer.Id;
     LocalFirstName = matchPlayer.LocalFirstName;
     LocalLastName = matchPlayer.LocalLastName;
     EnglishFirstName = matchPlayer.EnglishFirstName;
     EnglishLastName = matchPlayer.EnglishLastName;
 }
 private static void RenderPlayer(HtmlTextWriter htmlWriter, MatchHeaderInfo match, MatchPlayer player)
 {
     htmlWriter.AddAttribute(HtmlTextWriterAttribute.Class, "player");
     htmlWriter.RenderBeginTag(HtmlTextWriterTag.Div);
     if (player != null)
     {
         htmlWriter.Write(player.LocalFirstName);
         if (player.LocalLastName.NotNullOrEmpty())
         {
             htmlWriter.Write(" , ");
             htmlWriter.Write(player.LocalLastName);
         }
     }
     else
     {
         htmlWriter.Write(match.Status == MatchStatus.Completed ? "BYE" : " ");
     }
     htmlWriter.RenderEndTag();
 }
 private MatchPlayerViewModel GetPlayer(MatchPlayer player, CompetitionDetails competition)
 {
     var result = default(MatchPlayerViewModel);
     if (player.IsNotNull())
     {
         var cp = competition.Players.FirstOrDefault(p => p.Id == player.Id);
         if (cp.IsNotNull())
         {
             result = new MatchPlayerViewModel(player);
             result.Rank = cp.CompetitionRank;
         }
     }
     return result;
 }