Exemple #1
0
        public ArtistEdit()
        {
            Groups = new List<GroupForArtistContract>();
            Names = new NameManagerEditContract();
            Pictures = new List<EntryPictureFileContract>();
            WebLinks = new List<WebLinkDisplay>();

            AllArtistTypes = EnumVal<ArtistType>.Values.ToDictionary(a => a, Translate.ArtistTypeName);
        }
        public SongForEditContract(Song song, ContentLanguagePreference languagePreference)
            : base(song, languagePreference)
        {
            ParamIs.NotNull(() => song);

            Lyrics = song.Lyrics.Select(l => new LyricsForSongContract(l)).ToArray();
            Names = new NameManagerEditContract(song.Names);
            ValidationResult = SongValidator.Validate(song);
            UpdateNotes = string.Empty;
        }
Exemple #3
0
        public SongForEditContract(Song song, ContentLanguagePreference languagePreference)
            : base(song, languagePreference)
        {
            ParamIs.NotNull(() => song);

            Lyrics           = song.Lyrics.Select(l => new LyricsForSongContract(l)).ToArray();
            Names            = new NameManagerEditContract(song.Names);
            ValidationResult = SongValidator.Validate(song);
            UpdateNotes      = string.Empty;
        }
 public AlbumForEditContract(Album album, ContentLanguagePreference languagePreference)
     : base(album, languagePreference)
 {
     ArtistLinks = album.Artists.Select(a => new ArtistForAlbumContract(a, languagePreference)).OrderBy(a => a.Name).ToArray();
     Deleted = album.Deleted;
     Description = album.Description;
     Names = new NameManagerEditContract(album.Names);
     OriginalRelease = (album.OriginalRelease != null ? new AlbumReleaseContract(album.OriginalRelease) : null);
     Pictures = album.Pictures.Select(p => new EntryPictureFileContract(p)).ToArray();
     PVs = album.PVs.Select(p => new PVContract(p)).ToArray();
     Songs = album.Songs
         .OrderBy(s => s.TrackNumber).OrderBy(s => s.DiscNumber)
         .Select(s => new SongInAlbumEditContract(s, languagePreference)).ToArray();
     TranslatedName = new TranslatedStringContract(album.TranslatedName);
     UpdateNotes = string.Empty;
     ValidationResult = AlbumValidator.Validate(album);
     WebLinks = album.WebLinks.Select(w => new WebLinkContract(w)).OrderBy(w => w.DescriptionOrUrl).ToArray();
 }
 public AlbumForEditContract(Album album, ContentLanguagePreference languagePreference)
     : base(album, languagePreference)
 {
     ArtistLinks     = album.Artists.Select(a => new ArtistForAlbumContract(a, languagePreference)).OrderBy(a => a.Name).ToArray();
     Deleted         = album.Deleted;
     Description     = album.Description;
     Names           = new NameManagerEditContract(album.Names);
     OriginalRelease = (album.OriginalRelease != null ? new AlbumReleaseContract(album.OriginalRelease) : null);
     Pictures        = album.Pictures.Select(p => new EntryPictureFileContract(p)).ToArray();
     PVs             = album.PVs.Select(p => new PVContract(p)).ToArray();
     Songs           = album.Songs
                       .OrderBy(s => s.TrackNumber).OrderBy(s => s.DiscNumber)
                       .Select(s => new SongInAlbumEditContract(s, languagePreference)).ToArray();
     TranslatedName   = new TranslatedStringContract(album.TranslatedName);
     UpdateNotes      = string.Empty;
     ValidationResult = AlbumValidator.Validate(album);
     WebLinks         = album.WebLinks.Select(w => new WebLinkContract(w)).OrderBy(w => w.DescriptionOrUrl).ToArray();
 }
        public ArtistForEditContract(Artist artist, ContentLanguagePreference languagePreference)
            : base(artist, languagePreference)
        {
            /*if (artist.Albums.Count() <= MaxAlbums)
                AlbumLinks = artist.Albums.Select(a => new AlbumForArtistEditContract(a, languagePreference)).OrderBy(a => a.AlbumName).ToArray();
            else {
                TooManyAlbums = true;
            }*/

            AllNames = string.Join(", ", artist.AllNames.Where(n => n != Name));
            Description = artist.Description;
            Groups = artist.Groups.Select(g => new GroupForArtistContract(g, languagePreference)).OrderBy(g => g.Group.Name).ToArray();
            TranslatedName = new TranslatedStringContract(artist.TranslatedName);
            Members = artist.Members.Select(m => new GroupForArtistContract(m, languagePreference)).OrderBy(a => a.Member.Name).ToArray();
            Names = new NameManagerEditContract(artist.Names);
            Pictures = artist.Pictures.Select(p => new EntryPictureFileContract(p)).ToArray();
            UpdateNotes = string.Empty;
            ValidationResult = ArtistValidator.Validate(artist);
            WebLinks = artist.WebLinks.Select(w => new WebLinkContract(w)).OrderBy(w => w.DescriptionOrUrl).ToArray();
        }
Exemple #7
0
        public ArtistForEditContract(Artist artist, ContentLanguagePreference languagePreference)
            : base(artist, languagePreference)
        {
            /*if (artist.Albums.Count() <= MaxAlbums)
             *      AlbumLinks = artist.Albums.Select(a => new AlbumForArtistEditContract(a, languagePreference)).OrderBy(a => a.AlbumName).ToArray();
             * else {
             *      TooManyAlbums = true;
             * }*/

            AllNames         = string.Join(", ", artist.AllNames.Where(n => n != Name));
            Description      = artist.Description;
            Groups           = artist.Groups.Select(g => new GroupForArtistContract(g, languagePreference)).OrderBy(g => g.Group.Name).ToArray();
            TranslatedName   = new TranslatedStringContract(artist.TranslatedName);
            Members          = artist.Members.Select(m => new GroupForArtistContract(m, languagePreference)).OrderBy(a => a.Member.Name).ToArray();
            Names            = new NameManagerEditContract(artist.Names);
            Pictures         = artist.Pictures.Select(p => new EntryPictureFileContract(p)).ToArray();
            UpdateNotes      = string.Empty;
            ValidationResult = ArtistValidator.Validate(artist);
            WebLinks         = artist.WebLinks.Select(w => new WebLinkContract(w)).OrderBy(w => w.DescriptionOrUrl).ToArray();
        }
Exemple #8
0
        public AlbumEdit()
        {
            Names = new NameManagerEditContract();
            Pictures = new List<EntryPictureFileContract>();
            PVs = new List<PVContract>();
            Tracks = new List<SongInAlbumEditContract>();
            WebLinks = new List<WebLinkDisplay>();

            AllDiscTypes = EnumVal<DiscType>.Values;
        }
Exemple #9
0
        public SongEdit()
        {
            ArtistLinks = new List<ArtistForSongContract>();
            Lyrics = new List<LyricsForSongModel>();
            Names = new NameManagerEditContract();
            OriginalVersion = new SongContract();
            PVs = new List<PVContract>();
            WebLinks = new List<WebLinkDisplay>();

            AllPVTypes = EnumVal<PVType>.Values;
            AllVideoServices = EnumVal<PVService>.Values;
        }