大家好,我运行代码时遇到错误,错误是
"指定的演员表无效。"
这是我的代码
var result = dst.Tables["SalesInAccpac"].AsEnumerable()
.GroupBy(row => new
{
Mon = row.Field<int>("Mon"),
Region = row.Field<string>("Region"),
Str = row.Field<string>("Str"),
RcptDate = row.Field<DateTime>("RcptDate")
}).Select(x => new
{
Mon = x.Key.Mon,
Region = x.Key.Region,
Str = x.Key.Str,
RcptDate = x.Key.RcptDate,
TotalCost = x.Sum(z => z.Field<double>("TotalCost")),
TotalRound = x.Sum(z => z.Field<double>("TotalRound"))
});
foreach (var item in result)
{
string sos = item.Mon.ToString();
string TotalCost = item.TotalCost.ToString();
}
请任何人帮助我吗?