主要是利用sql语句实现分阶段统计,留用备查。
select sum( case when 校名次<=10 then 1 else 0 end) from xx
等效语句
select count( case when 校名次<=10 then 1 end) from xx
一、效果图

二、主要实现
-
Xaml
<!--用于显示 百名阶段比较-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<c:FButton FIcon="" Command="{Binding DatagridToExcelCommand}" HorizontalAlignment="Right"
CommandParameter="{Binding ElementName=mainGrid, Path=ItemsSource}">导出至Excel</c:FButton>
<DataGrid x:Name="mainGrid"

这篇博客介绍了如何使用WPF开发学生成绩管理工具,并聚焦于百名阶段统计功能的实现。通过SQL语句进行条件计数,展示了统计校内排名前100名学生的技巧。内容包括功能效果图和主要的Xaml及ViewModel实现。
最低0.47元/天 解锁文章
6万+

被折叠的 条评论
为什么被折叠?



