/// <summary>
        /// Gets the result of the artist query.
        /// </summary>
        /// <param name="artistName">Name of the artist.</param>
        /// <param name="songName">Name of the song.</param>
        /// <param name="fromYear">From year.</param>
        /// <param name="toYear">To year.</param>
        /// <returns> a string that represent the result of the query </returns>
        public string GetArtist(string artistName, string songName, int fromYear, int toYear)
        {
            dbMutex.WaitOne();
            SimpleArtistExecuter executer = new SimpleArtistExecuter(conn);

            if (!executer.SetQuery(songName.ToLower(), artistName.ToLower(), fromYear, toYear))
            {
                dbMutex.ReleaseMutex();
                return(executer.GetSorryMsg());
            }
            string ret = executer.Execute();

            dbMutex.ReleaseMutex();
            return(ret);
        }
Exemplo n.º 2
0
 public string GetArtistName(int id)
 {
     return(SimpleArtistExecuter.GetArtistNameFromId(id, conn));
 }