操作Datatable group by 查询 //获取统计图形数据 var dicleft = new Dictionary<string, DataTable>(); ].AsEnumerable() group t by new { mname = t.Field<string>("COL_MATERIAL_NAME") } into m select new { MaterialName = m.Key.mname, value = m.ToList…
DataTable Linq查询 1.查询DataRow IEnumerable<DataRow> q1 = from r in dt.AsEnumerable() == select r; 2.查询某个字段 var query2 = from pl in dt.AsEnumerable( ) select pl.Field<string>("Name"); 3.group by var query = from r in dt.AsEnumerable() g…