團體(全)SQL查詢

This commit is contained in:
jasonchenwork 2025-04-14 14:17:06 +08:00
parent 01286c688f
commit 9fc07f5a15
11 changed files with 30 additions and 29 deletions

View File

@ -87,14 +87,6 @@ namespace DBObj
}
}
private void PrintAllArtists()
{
Console.WriteLine("All Artists:");
foreach (var artist in AllArtists)
{
Console.WriteLine(artist.ToString());
}
}
public List<Artist> GetArtistsByCategoryAndStrokeCountRange(string category, int minStrokes, int maxStrokes)
{

View File

@ -745,7 +745,7 @@ private static void SongDisplayTimer_Elapsed(object sender, EventArgs e)
public void DisplaySticker(string stickerId)
{
Console.WriteLine("Attempting to display sticker.");
//Console.WriteLine("Attempting to display sticker.");
this.Invoke((MethodInvoker)delegate {
Console.WriteLine("Form Width: " + this.Width);

View File

@ -11,9 +11,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '國語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var guoYuSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = guoYuSongs;
totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage);

View File

@ -11,9 +11,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuActiveBackground;
hanYuSongs = allSongs.Where(song => song.Category == "韓語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*hanYuSongs = allSongs.Where(song => song.Category == "韓語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '韓語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var hanYuSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = hanYuSongs;
totalPages = (int)Math.Ceiling((double)hanYuSongs.Count / itemsPerPage);

View File

@ -11,9 +11,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuActiveBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
riYuSongs = allSongs.Where(song => song.Category == "日語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*riYuSongs = allSongs.Where(song => song.Category == "日語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '日語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var riYuSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = riYuSongs;
totalPages = (int)Math.Ceiling((double)riYuSongs.Count / itemsPerPage);

View File

@ -11,9 +11,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
taiYuSongs = allSongs.Where(song => song.Category == "台語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*taiYuSongs = allSongs.Where(song => song.Category == "台語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '台語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var taiYuSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = taiYuSongs;
totalPages = (int)Math.Ceiling((double)taiYuSongs.Count / itemsPerPage);

View File

@ -11,9 +11,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
yingWenSongs = allSongs.Where(song => song.Category == "英文" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*yingWenSongs = allSongs.Where(song => song.Category == "英文" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '英文' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var yingWenSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = yingWenSongs;
totalPages = (int)Math.Ceiling((double)yingWenSongs.Count / itemsPerPage);

View File

@ -11,9 +11,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
yueYuSongs = allSongs.Where(song => song.Category == "粵語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*yueYuSongs = allSongs.Where(song => song.Category == "粵語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '粵語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var yueYuSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = yueYuSongs;
totalPages = (int)Math.Ceiling((double)yueYuSongs.Count / itemsPerPage);

View File

@ -128,9 +128,11 @@ namespace DualScreenDemo
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuNormalBackground;
guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
/*guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.ToList();
.ToList();*/
String query = "SELECT * FROM SongLibrary WHERE `語別` = '國語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC";
var guoYuSongs = SearchSongs_Mysql(query);
currentPage = 0;
currentSongList = guoYuSongs;
totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage);

View File

@ -183,11 +183,6 @@ namespace DualScreenDemo
public List<Artist> currentArtistList;
public List<SongData> publicSongList;
private List<SongData> guoYuSongs;
private List<SongData> taiYuSongs;
private List<SongData> yueYuSongs;
private List<SongData> yingWenSongs;
private List<SongData> riYuSongs;
private List<SongData> hanYuSongs;
private List<SongData> guoYuSongs2;
private List<SongData> taiYuSongs2;
private List<SongData> yueYuSongs2;

View File

@ -361,7 +361,7 @@ namespace DualScreenDemo
{
// 获取 CLSID 对应的类型
Type filterType = Type.GetTypeFromCLSID(clsid);
Console.WriteLine($"Attempting to create filter of type: {filterType.FullName}");
//Console.WriteLine($"Attempting to create filter of type: {filterType.FullName}");
// 创建实例
object filterObject = Activator.CreateInstance(filterType);