public ActionResult Radio()
        {
            hypster.ViewModels.listenViewModel model = new ViewModels.listenViewModel();

            hypster_tv_DAL.memberManagement        memberManager = new hypster_tv_DAL.memberManagement();
            hypster_tv_DAL.MemberMusicGenreManager genreManager  = new hypster_tv_DAL.MemberMusicGenreManager();
            model.genres_list = genreManager.GetMusicGenresList();
            hypster_tv_DAL.songsManagement songManager = new hypster_tv_DAL.songsManagement();
            model.most_popular_songs = songManager.Get_MostPopularSong_Random();


            hypster_tv_DAL.playlistManagement playlistManager = new hypster_tv_DAL.playlistManagement();
            if (User.Identity.IsAuthenticated == true)
            {
                model.most_viewed_playlists = playlistManager.GetUserPlaylists(memberManager.getMemberByUserName(User.Identity.Name).id);
            }
            else
            {
                model.most_viewed_playlists = playlistManager.GetMostViewedPlaylists();
            }

            hypster_tv_DAL.visualSearchManager visualSearchManager = new hypster_tv_DAL.visualSearchManager();
            model.visualSearch_list = visualSearchManager.getVisualSearchArtists_cached();



            //check if search requested
            if (Request.QueryString["ss"] != null)
            {
                ViewBag.searchString = Request.QueryString["ss"];
            }

            return(View(model));
        }
        public ActionResult visualSearchBar()
        {
            hypster_tv_DAL.visualSearchManager visualSearchManager = new hypster_tv_DAL.visualSearchManager();
            List <hypster_tv_DAL.VisualSearch> model = visualSearchManager.getVisualSearchArtists_cached();

            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult station()
        {
            hypster.ViewModels.createStation_ViewModel model = new ViewModels.createStation_ViewModel();

            string action = "";

            if (Request.QueryString["act"] != null)
            {
                action = Request.QueryString["act"];
            }

            switch (action)
            {
            case "err":
                ViewBag.ErrorMessage = "Please enter Station Name and Artist or Genre";
                break;
            }


            hypster_tv_DAL.visualSearchManager visualSearchManager = new hypster_tv_DAL.visualSearchManager();
            model.visualSearchList = visualSearchManager.getVisualSearchArtists_cached();



            return(View(model));
        }