void Bind() { //String strsql = "SELECT batchcode,sum(t.taskquantity) as qty,COUNT(*)as cuscount,t.synseq,count(distinct regioncode) as regioncodecount from t_produce_task t where t.state=15 group BY t.batchcode,t.synseq order by synseq "; //scre.Content.Select(x => new { synseq = x.SYNSEQ, regioncode = x.REGIONCODE, count = x.Count, qty = x.QTY }).ToList(); var rm = sc.GetTaskInfoByBatchcode(); list = rm.Content; if (rm.IsSuccess) { orderdata.DataSource = list.Select(x => new { synseq = x.SYNSEQ, linenum = x.LINENUM, batchcode = x.BATCHODE, qty = x.QTY, count = x.Count }).ToList(); //OrderBy(x => new { x.synseq,x.linenum}).ToList(); } else { MessageBox.Show(rm.MessageText); orderdata.DataSource = null; } }