Ejemplo n.º 1
0
        public void AuthorsUpdate()
        {
            Logger.Info("AwardVM.AuthorsUpdate", "Початок оновлення авторів альбома.");

            if (EntertainmentType != Entertainment.Type.Album)
            {
                return;
            }
            Performer[] authors = Performer.GetAlbumAuthorsByAlbum(_entertainment);
            if (authors != null)
            {
                StringBuilder authorsStringBuilder = new StringBuilder("");
                foreach (var author in authors)
                {
                    authorsStringBuilder.Append(author.Name);
                    if (author.Surname != null && author.Surname != String.Empty)
                    {
                        authorsStringBuilder.Append(" ");
                        authorsStringBuilder.Append(author.Surname);
                    }
                    authorsStringBuilder.Append(", ");
                }
                authorsStringBuilder.Length -= 2;
                authorsStringBuilder.Append(" -");
                AlbumAuthors = authorsStringBuilder.ToString();
            }
            else
            {
                AlbumAuthors = String.Empty;
            }

            Logger.Info("AwardVM.AuthorsUpdate", "Завершено оновлення авторів альбома.");
        }
Ejemplo n.º 2
0
 public void AuthorsUpdate()
 {
     if (EntertainmentType != Entertainment.Type.Album)
     {
         return;
     }
     Performer[] authors = Performer.GetAlbumAuthorsByAlbum(_entertainment);
     if (authors != null)
     {
         StringBuilder authorsStringBuilder = new StringBuilder("");
         foreach (var author in authors)
         {
             authorsStringBuilder.Append(author.Name);
             if (author.Surname != null && author.Surname != String.Empty)
             {
                 authorsStringBuilder.Append(" ");
                 authorsStringBuilder.Append(author.Surname);
             }
             authorsStringBuilder.Append(", ");
         }
         authorsStringBuilder.Length -= 2;
         authorsStringBuilder.Append(" -");
         AlbumAuthors = authorsStringBuilder.ToString();
     }
     else
     {
         AlbumAuthors = String.Empty;
     }
 }