Raw data
我在数据表中的数据按第一个图像,而是想将我的数据表或创建新的输出是在第二图象一个新的DataTable多列到行
var reportData = (from C in Table1
join LC in Table2 on C.Id equals LC.Id
select new { C.Id, C.User, LC.Phy, LC.Che, LC.Bio, LC.Math }).ToList();
foreach (var item in reportData)
{
lstLc.Add(new Launch() { Username= item.User, Phy = item.Phy, Che = item.Che, Bio = item.Bio, Math = item.Math });
}
原始数据:Output needed
User Phy Che Bio Math
A 12 20 16 10
B 15 19 18 20
C 13 17 11 18
输出需要..
User Type value
A Phy 12
A Che 20
A Bio 16
A Math 10
B Phy 15
B Che 19
B Bio 18
B Math 20
C Phy 13
C Che 17
C Bio 11
C Math 18
是什么问题? – Aristos
我有数据在数据表按照第一个图像,但想要转换我的数据表或创建一个新的数据表与第二个图像中的新输出。 – Aditya
你是否明白这是一个请求,而不是一个问题?不仅如此,你甚至不会提供一些代码来处理。数据在哪里生活? – Aristos