Esempio n. 1
0
        private void InitializeBusinessTypes()
        {
            cbBusinessType.Items.Clear();

            var businessTypeCollection = WCFWebServiceJson.GetAllBusinessTypes();

            object[] businessTypes = new ListItem[businessTypeCollection.Count()];
            var i = 0;

            foreach (var businessType in businessTypeCollection)
            {
                businessTypes[i] = new ListItem(businessType.BusinessTypeName, businessType.BusinessTypeId);
                i++;
            }

            cbBusinessType.Items.AddRange(businessTypes);
        }
Esempio n. 2
0
        private void InitializeGenres()
        {
            lbGenres.Items.Clear();
            lbAlbumGenres.Items.Clear();

            var genreCollection = WCFWebServiceJson.GetAllGenres();
            object[] genres = new ListItem[genreCollection.Count()];
            var i = 0;

            foreach (var genre in genreCollection)
            {
                genres[i] = new ListItem(genre.GenreName, genre.GenreId);
                i++;
            }

            lbGenres.Items.AddRange(genres);
            lbAlbumGenres.Items.AddRange(genres);
            lbSongGenres.Items.AddRange(genres);
        }
Esempio n. 3
0
        private void InitializeAlbums(int wordpressId)
        {
            lbArtistAlbums.Items.Clear();

            var albumCollection = GetArtistAlbumCollection(wordpressId);
            object[] albums = new ListItem[albumCollection.Count];
            var i = 0;

            foreach (var album in albumCollection)
            {
                albums[i] = new ListItem(album.AlbumTitle, album.AlbumId);
                i++;
            }

            lbArtistAlbums.Items.AddRange(albums);
            lbSongAlbums.Items.AddRange(albums);
        }