如何为特定Employee的SUM值。 [英] How to SUM values for a specific Employee.

查看:92
本文介绍了如何为特定Employee的SUM值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经搜索了一段时间了,我似乎无法想象它...

I´ve been searching for this for a while now and I can´t seem to figure it out..

我可能会说是一个销售项目

i might say is a sales project

我有一个DataGridView连接并显示来自Access数据库的数据。

I have a DataGridView that is connected and showing data from my Access Database.

我在DataGridview上有一个基于datetimepicker和employeeid字段显示的过滤器,它显示了日期范围内每个员工的所有记录。

I have a filter on that DataGridview to show based on datetimepicker and also by employeeid field, it shows all records for each employee within the date range.

有没有办法让每位员工显示1条记录,并且值列?

Is there a way to show 1 record per employee and have the SUM of the value column?

推荐答案

如果您使用数据表作为数据源,则可以使用Linq的Sum()聚合来汇总值。您应该转到数据源来执行Sum()。
If you are using a datatable as the datasource, then you can use Linq's Sum() aggregate to sum up the values. You should go to the datasource to do the Sum().


这篇关于如何为特定Employee的SUM值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆