string newshopname = "淘宝" + itemname.Text; string str_f = "account_name='" + newshopname + "'"; DataTable dt2 = dt.Select(str_f).CopyToDataTable(); dt2.Columns.Remove("account_name"); DevExpress.XtraCharts.Web.WebChartControl WCC = new DevExpress.XtraCharts.Web.WebChartControl(); var query = from q in dt2.AsEnumerable() group q by q.Field ("IsReturns") into r select new { _isreturn = r.Key, _count = r.Count() };改成string newshopname = "淘宝" + itemname.Text; string str_f = "account_name='" + newshopname + "'"; DataTable dt2 = dt.Select(str_f).CopyToDataTable(); dt2.Columns.Remove("account_name"); DevExpress.XtraCharts.Web.WebChartControl WCC = new DevExpress.XtraCharts.Web.WebChartControl(); var query = from q in dt2.AsEnumerable() group q by q["IsReturns"] into r select new { _isreturn = r.Key, _count = r.Count() };