예제 #1
0
        private void BindWantedList()
        {
            var wantedListService = new WantedListService(Ioc.GetInstance<IWantedListRepository>());

            var wantedList = wantedListService.GetByUserId(userId);

            var songService = new SongService(Ioc.GetInstance<ISongRepository>());

            var songsWantedList = (from w in wantedList
                                   from s in songService.GetAllSongs()
                                   where s.SongId.Equals(w.SongId)
                                   select new { Song = s, Wanted = w });

            rptWantedList.DataSource = songsWantedList;
            rptWantedList.DataBind();
        }
예제 #2
0
        private void BindArchiveList()
        {
            var wantedListService = new WantedListService(Ioc.GetInstance<IWantedListRepository>());

            var wantedList = wantedListService.GetByUserId(userId);

            var archivedList = wantedListService.GetArchivedByUserId(userId);

            rptArchive.DataSource = archivedList;
            rptArchive.DataBind();
        }