日期:2014-05-17 浏览次数:20714 次
var list = dt.AsEnumerable().GroupBy(t => t.Field<string>("Name")).Select(t => new
{
Name=t.Key,
Sum=t.Count(),
Sum_WeiGui = t.Count(tt => tt.Field<string>("status") == "违规"),
Sum_ZhengChang = t.Count(tt => tt.Field<string>("status") == "正常")
}).ToList();
var stateinfo = from t in table.AsEnumerable()
group t by t.Field<string>("Name") into r
&nb