public void initdata() { ScheduleClass sc = new ScheduleClass(); var result = sc.GetSortingProcess(); if (result.IsSuccess) { task_data.DataSource = result.Content.Select(x => new { synseq = x.SYNSEQ, regioncode = x.REGIONCODE, finishcountstr = x.FinishCountStr, finishqtystr = x.FinishQtyStr, rate = x.Rate }).ToList();; } else { MessageBox.Show(result.MessageText); task_data.DataSource = ""; } }