コード例 #1
0
 /// <summary>
 /// Removes a song from the database
 /// </summary>
 /// <param name="song">the song you want to remove</param>
 public static void RemoveSong(Songs song)
 {
     if (song != null && SongExistsInDatabase(song.SongFilePath))
     {
         DLSongs.RemoveSong(song);
     }
 }
コード例 #2
0
 /// <summary>
 /// Removes multiple songs from the database
 /// </summary>
 /// <param name="song">the list of songs you want to remove</param>
 public static void RemoveSongs(List <Songs> songs)
 {
     if (songs != null)
     {
         DLSongs.RemoveSongs(songs);
     }
 }
コード例 #3
0
 /// <summary>
 /// Insert multiple songs into the database
 /// </summary>
 /// <param name="songs">List of songs</param>
 public static void InsertSongs(List <Songs> songs)
 {
     if (songs != null)
     {
         DLSongs.InsertSongs(songs);
     }
 }
コード例 #4
0
ファイル: BLSongs.cs プロジェクト: zozolaw/RemindMe
 /// <summary>
 /// Insert a song into the database
 /// </summary>
 /// <param name="song">The song</param>
 public static void InsertSong(Songs song)
 {
     if (song != null && !DLSongs.SongExistsInDatabase(song.SongFilePath))
     {
         DLSongs.InsertSong(song);
     }
 }
コード例 #5
0
 /// <summary>
 /// Checks if there is a song in the databse with the given path
 /// </summary>
 /// <param name="pathToSong">full path to the song. for example: C:\users\you\music\song.mp3</param>
 /// <returns></returns>
 public static bool SongExistsInDatabase(string pathToSong)
 {
     //no business logic(yet)
     return(DLSongs.SongExistsInDatabase(pathToSong));
 }
コード例 #6
0
 /// <summary>
 /// Gets all songs in the database
 /// </summary>
 /// <returns></returns>
 public static List <Songs> GetSongs()
 {
     return(DLSongs.GetSongs());
 }
コード例 #7
0
 /// <summary>
 /// Gets the song object from the database with the given path
 /// </summary>
 /// <param name="path">the unique path to the song</param>
 /// <returns></returns>
 public static Songs GetSongByFullPath(string path)
 {
     return(DLSongs.GetSongByFullPath(path));
 }
コード例 #8
0
 /// <summary>
 /// Gets the song object from the database with the given id
 /// </summary>
 /// <param name="id">the unique id</param>
 /// <returns></returns>
 public static Songs GetSongById(long id)
 {
     return(DLSongs.GetSongById(id));
 }