コード例 #1
0
        // GET: Home
        public ActionResult Index()
        {
            //Danh Sach Tat Ca Bai Hat
            BaiHatDAO     bh = new BaiHatDAO();
            List <BaiHat> ls = bh.ListOf();

            ViewBag.NgheGanDay = ls;
            //Top 15 bai hat hay nhat
            var top15 = bh.Top15();

            ViewBag.Top15 = top15;
            //Nghệ Sĩ Nổi Bật
            NgheSiDAO ns        = new NgheSiDAO();
            var       NgheSiHot = ns.ListNgheSiHot();

            ViewBag.NgheSiNoiBat = NgheSiHot;
            //BaiHatMoiPhatHanh
            var mph = bh.MoiPhatHanh();

            ViewBag.MoiPhatHanh = mph;
            //Album Hot
            AlbumDAO al    = new AlbumDAO();
            var      album = al.AlbumHot();

            ViewBag.AlbumHot = album;
            //Thể Loại
            TheLoaiDAO tl      = new TheLoaiDAO();
            var        theloai = tl.TheLoaiListIEnnumable();

            ViewBag.TheLoai = theloai;
            return(View());
        }
コード例 #2
0
        // GET: Album
        public ActionResult Index()
        {
            AlbumDAO al = new AlbumDAO();
            //Tất cả album
            var allAlbum = al.Listof();

            ViewBag.TatCaAlbum = allAlbum;
            //Album Hot
            var albumHot = al.AlbumHot();

            ViewBag.AlbumHot = albumHot;
            //Bai hát Theo Album
            var listBh = al.BaiHatByAlbum();

            ViewBag.BaiHatTheoAlbum = listBh;
            return(View());
        }