From f0e176ee6a2570845390b172907890471bdd15a1 Mon Sep 17 00:00:00 2001 From: jasonchenwork Date: Fri, 11 Apr 2025 17:16:59 +0800 Subject: [PATCH] static search for sql --- PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs | 2 +- PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs index b885018..e94ca9c 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSong.cs @@ -93,7 +93,7 @@ namespace DualScreenDemo int songLimit = ReadHotSongLimit(); string query = $"SELECT * FROM SongLibrary WHERE `語別` = '{category}' ORDER BY `點播次數` DESC LIMIT {songLimit}"; - var selectedSongs = PrimaryForm.Instance.SearchSongs_Mysql(query); + var selectedSongs = SearchSongs_Mysql(query); /*var selectedSongs = allSongs.Where(song => song.Category == category) .OrderByDescending(song => song.Plays) .Take(songLimit) diff --git a/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs b/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs index bc0d6af..0cde60f 100644 --- a/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs +++ b/PrimaryFormParts/HotSong/PrimaryForm.HotSongTaiwaneseNew.cs @@ -10,7 +10,7 @@ namespace DualScreenDemo int songLimit = ReadHotSongLimit(); string query = $"SELECT * FROM SongLibrary WHERE `語別` = '台語' ORDER BY `新增日期` DESC LIMIT {songLimit}"; - var selectedSongs = PrimaryForm.Instance.SearchSongs_Mysql(query); + var selectedSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = selectedSongs;