Exemplo n.º 1
0
        private CheckedList <Artist> GetArtistCheckBoxes()
        {
            var artists   = artistRepository.GetAllArtists();
            var checkList = new CheckedList <Artist>();

            foreach (var artist in artists)
            {
                checkList.Add(artist, false);
            }
            return(checkList);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Band Id
        /// </summary>
        /// <param name="id">Band Id</param>
        /// <returns></returns>
        private CheckedList <Artist> GetArtistCheckBoxes(int id)
        {
            var artists   = artistRepository.GetAllArtists();
            var checkList = new CheckedList <Artist>();

            foreach (var artist in artists)
            {
                bool isChecked = artist.Bands == null ? false : artist.Bands.Any(x => x.Id == id);
                checkList.Add(artist, isChecked);
            }
            return(checkList);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Band Id
 /// </summary>
 /// <param name="id">Band Id</param>
 /// <returns></returns>
 private CheckedList<Artist> GetArtistCheckBoxes(int id)
 {
     var artists = artistRepository.GetAllArtists();
     var checkList = new CheckedList<Artist>();
     foreach (var artist in artists)
     {
         bool isChecked = artist.Bands == null ? false : artist.Bands.Any(x => x.Id == id);
         checkList.Add(artist, isChecked);
     }
     return checkList;
 }
Exemplo n.º 4
0
 private CheckedList<Artist> GetArtistCheckBoxes()
 {
     var artists = artistRepository.GetAllArtists();
     var checkList = new CheckedList<Artist>();
     foreach (var artist in artists)
     {
         checkList.Add(artist, false);
     }
     return checkList;
 }