var tmp1 = db.GetList<T_RECORD>(o => o.VALID_FLAG == true && o.ASSEMBLY_CODE.Equals(selectedSn)).OrderBy(p => p.WS_ID).
Select(f => new WsRepaired() { WS_ID = f.WS_ID, WORKPIECE_STATUS = f.WORKPIECE_STATUS.GetValueOrDefault(), ID = f.ID }).ToList();
var tmp2 = db.GetList<T_RECORD_VISION>(o => o.VALID_FLAG == true && o.ASSEMBLY_CODE.Equals(selectedSn)).OrderBy(p => p.WS_ID).
Select(f => new WsRepaired() { WS_ID = f.WS_ID, WORKPIECE_STATUS = f.WORKPIECE_STATUS.GetValueOrDefault(), ID = f.ID }).ToList();
foreach (var item in tmp2)
{
tmp1.Add(item);
}
var test = tmp1.ToList();
var tmp=test.OrderBy(o=>o.WS_ID).ToList();
我把两个集合合并,再对集合进行排序得到新的集合,可是排序之后在界面上展示的只是两个集合合并的结果,没有排序成功,这是为什么?