Ejemplo n.º 1
0
        public string DeleteSong(int songId, int albumId)
        {
            var result = "There was a problem deleting this song. Please try again. If the problem persists, please contact [email protected]";

            try
            {
                var trmservice = new WebService.WCFWebServiceJson();
                var album = trmservice.GetArtistAlbumDetails(albumId);
                var song = trmservice.GetArtistSongDetails(songId);

                trmservice.DeleteSong(song, album);
                result = "The song " + song.SongTitle + "has been successfully removed from the album " + album.AlbumTitle + ".";
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }

            return result;
        }