Exemplo n.º 1
0
 private void UpvoteBtn_Click(object sender, EventArgs e)
 {
     _usersRatingForASong.voteType += 1;
     _service.AddRating(_usersRatingForASong);
     this._service.NotifyServer(
         new WCFService.EventDataType()
     {
         ClientId     = _dataStorage.UserId,
         EventMessage = null
     });
     UpdatePlaylistForParty(sender, e);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Upvoting a song on the current playlist
        /// </summary>
        /// <param name="rowIndex"></param>
        private void Upvote(int rowIndex)
        {
            var upVoteForASong = new SongRatingFromPartyTable
            {
                partyID  = _dataStorage.CurrentSelectedPartyId,
                songURL  = _currentPlaylist[rowIndex],
                voteType = 1,
                userID   = _dataStorage.UserId
            };

            _service.AddRating(upVoteForASong);
            GetPlaylist();

            this._service.NotifyServer(
                new WCFService.EventDataType()
            {
                ClientId     = _dataStorage.UserId,
                EventMessage = playlist.ToArray()
            });
        }