Esempio n. 1
0
 public ActionResult SearchAlbumsSongsTest()
 {
     ViewBag.Message = "Search Albums/ Songs";
     AlbumsSongsDAL albumSongsDAL = new AlbumsSongsDAL();
     try
     {
         //List<string> testLanguageLi= st = albumSongsDAL.GetLanguageList();
         //List<string> testMDList = GetLanguageList();
         ViewBag.LanguageList = albumSongsDAL.GetLanguageList();
         ViewBag.MusicDirectorList = albumSongsDAL.GetMusicDirectorList();
         ViewBag.TopFiveAlbums = albumSongsDAL.GetTopFiveAlbums();
         ViewBag.TopFiveSongs = albumSongsDAL.GetTopFiveSongs();
         ViewBag.SearchAlbums = albumSongsDAL.SearchAlbumsAndUpdateHits("Hindi","A.R. Rahman");
         ViewBag.SearchSongs = albumSongsDAL.SearchSongsAndUpdateHits("Tamil","Illeya Raja");
     }
     catch (Exception)
     {
     }
     return View();
 }
        public string SearchTopFiveSongs()
        {
            var albumsSongsDAL= new AlbumsSongsDAL();
            var topFiveSongs = new List<Song>();
            try
            {
                topFiveSongs = albumsSongsDAL.GetTopFiveSongs();
            }
            catch(Exception)
            {

            }
            JavaScriptSerializer jsonObj = new JavaScriptSerializer();
            return jsonObj.Serialize(topFiveSongs);
        }