superstar_v2/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs

28 lines
1.4 KiB
C#

namespace DualScreenDemo
{
public partial class PrimaryForm
{
private void GroupHanYuButton_Click(object sender, EventArgs e)
{
groupGuoYuButton.BackgroundImage = groupGuoYuNormalBackground;
groupTaiYuButton.BackgroundImage = groupTaiYuNormalBackground;
groupYueYuButton.BackgroundImage = groupYueYuNormalBackground;
groupYingWenButton.BackgroundImage = groupYingWenNormalBackground;
groupRiYuButton.BackgroundImage = groupRiYuNormalBackground;
groupHanYuButton.BackgroundImage = groupHanYuActiveBackground;
/*hanYuSongs = allSongs.Where(song => song.Category == "韓語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團"))
.OrderByDescending(song => song.Plays)
.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);
multiPagePanel.currentPageIndex = 0;
multiPagePanel.LoadSongs(currentSongList);
}
}
}