private CheckedList <Artist> GetArtistCheckBoxes() { var artists = artistRepository.GetAllArtists(); var checkList = new CheckedList <Artist>(); foreach (var artist in artists) { checkList.Add(artist, false); } return(checkList); }
/// <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); }
/// <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; }
private CheckedList<Artist> GetArtistCheckBoxes() { var artists = artistRepository.GetAllArtists(); var checkList = new CheckedList<Artist>(); foreach (var artist in artists) { checkList.Add(artist, false); } return checkList; }