public IList <IViewUserBattlResult> GetBattlsWonByProfileId(int profileId, int page = 0, int rowCount = 0)
        {
            IDataQuery query = new DataQuery();

            query.Page     = page;
            query.RowCount = rowCount;
            query.Where    = string.Format(" profileIdFirst ={0} AND totalFirst > totalSecond OR profileIdSecond = {0} AND totalFirst < totalSecond ", profileId);

            var result = _battlRepository.Find(query);

            query.From = "ViewUserBattlWonLostResult";
            _total     = _battlRepository.Count(query);

            _collection = result;

            return(_collection);
        }
Exemplo n.º 2
0
        public IList <IViewUserTotalVotes> GetTopMostVotesByUser(int page = 0, int rowCount = 0)
        {
            IDataQuery query = new DataQuery();

            query.Page     = page;
            query.RowCount = rowCount;

            IList <IViewUserTotalVotes> retorno = new List <IViewUserTotalVotes>();

            retorno = _repository.Find(query);

            query.From = "ViewUserTotalVotes";

            this.Total = _repository.Count(query);

            _collection = retorno;

            return(retorno);
        }
        public IList <IViewAlbumArtistSongTotalVotes> GetTopMostVotedSong(int page = 0, int rowCount = 0)
        {
            IDataQuery query = new DataQuery();

            query.OrderBy = " total DESC ";
            if (!String.IsNullOrEmpty(_orderBy))
            {
                query.OrderBy = _orderBy;
            }

            query.Page     = page;
            query.RowCount = rowCount;

            IList <IViewAlbumArtistSongTotalVotes> result = _repository.Find(query);

            query.From = "ViewAlbumArtistSongTotalVotes";
            this.Total = _repository.Count(query);

            return(result);
        }
Exemplo n.º 4
0
        private IList <IViewTopSongs> GetTopSongs(IDataQuery query)
        {
            query.OrderBy = " ArtistName ";
            var results = _repository.Find(query);

            query.From = "ViewTopSongsPercentage";
            this.Total = _repository.Count(query);

            _collection = results;

            return(results);
        }
Exemplo n.º 5
0
        private IList <IViewTopUsers> GetTopUsers(IDataQuery query)
        {
            var getTopUsers = _repository.Find(query);
            IList <IViewTopUsers> filteredResult = getTopUsers;

            query.From = "viewTopUsersPercentage";
            this.Total = _repository.Count(query);

            _collection = filteredResult;

            return(filteredResult);
        }
Exemplo n.º 6
0
        public IList <IViewAlbumArtistSongTotalVotesByArtist> GetTopMostVotedArtist(int page = 0, int rowCount = 0)
        {
            IDataQuery query = new DataQuery();

            query.OrderBy  = " Total DESC ";
            query.Page     = page;
            query.RowCount = rowCount;
            _repository.Find(query);

            query.From = "ViewAlbumArtistSongTotalVotesByArtist";
            this.Total = _repository.Count(query);

            _collection = _repository.Collection;

            return(_collection);
        }
Exemplo n.º 7
0
        public IList <IViewArtists> GetArtists(int page = 0, int rowCount = 0)
        {
            IDataQuery query = new DataQuery();

            query.Page     = page;
            query.RowCount = rowCount;

            IList <IViewArtists> retorno = _repository.Find(query);

            query.From = "viewArtists";
            this.Total = _repository.Count(query);

            _collection = retorno;

            return(retorno);
        }
Exemplo n.º 8
0
        public IList <IViewPastBattls> GetPastBattls(int page = 0, int rowCount = 0)
        {
            IDataQuery query = new DataQuery();

            query.OrderBy  = " battlId DESC ";
            query.Page     = page;
            query.RowCount = rowCount;
            _repository.Find(query);

            query.From = "viewPastBattls";
            this.Total = _repository.Count(query);

            _collection = _repository.Collection;

            return(_collection);
        }
Exemplo n.º 9
0
        private IList <IViewTopAlbums> GetData(string procedureName, IDataQuery query)
        {
            IList <IViewTopAlbums> retorno = new List <IViewTopAlbums>();

            query.OrderBy = " ArtistName ";

            if (!String.IsNullOrEmpty(_orderBy))
            {
                query.OrderBy = _orderBy;
            }

            retorno = ((ViewTopAlbumsRepositoryBLL)_repository).ExecuteProcedure(procedureName, query, query.RowCount);

            query.From = "ViewTopAlbums";
            this.Total = _repository.Count(query);

            _collection = retorno;

            return(retorno);
        }
        public IList <IViewUserFavoritesSongs> GetFavoriteSongsByProfileId(int profileId, int page = 0, int rowCount = 0)
        {
            IList <IViewUserFavoritesSongs> retorno = new List <IViewUserFavoritesSongs>();

            IDataQuery query = new DataQuery();

            query.Page     = page;
            query.RowCount = rowCount;
            query.Where    = string.Format(" (profileId={0}) ", profileId);

            var getFavorires = _repository.Find(query).ToList <IViewUserFavoritesSongs>();
            IList <IViewUserFavoritesSongs> filteredResult = getFavorires;

            query.From = "ViewUserFavoritesSongs";
            _total     = _repository.Count(query);

            _collection = filteredResult;

            return(filteredResult);
        }