0

我必须根据状态对数据表中的所有项目进行分组,我只有包含所有数据量的数据表。

DataTable results;
using (var sqlDataAccess = new MSQLDataAccess(Util.GetIntegraConnectionString))
{
    results = sqlDataAccess.GetDataTable(query, parameters);
}

结果变量具有以下数据:

DBSMP.DTINICIOPREV
DBSMP.DTFIMPREV
DBSMP.CIDADE_DES 
DBSMP.CIDADE_ORI
DBSMP.REF2
WORK.DESCRIPTION <<-- Group here
TRA.FANTASIA

我必须按 WORK.DESCRIPTION 分组,并像这样呈现这些数据:



房屋 = 3

DTINICIOPREV | DTFIMPREV |CIDADE_DES | CIDADE_ORI | REF2 | FANTASIA 
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE  
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE  
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE  

平面 = 5

DTINICIOPREV | DTFIMPREV |CIDADE_DES | CIDADE_ORI | REF2 | FANTASIA 
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE  
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE  
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE 
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE  
DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE DATA HERE 

那么哪个是转换results成多个分组数据列表的最佳方法?

4

0 回答 0