This commit is contained in:
2024-05-06 17:24:32 +08:00
parent b1c21ffc8a
commit 0ede39d15e
5 changed files with 33 additions and 6 deletions
+20 -2
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using NPOI.POIFS.Properties;
using System.Collections.Generic;
using System.Linq;
namespace BLL
@@ -218,7 +219,24 @@ namespace BLL
SupResourcesId = x.SupTrainingId,
IsEndLever = x.IsEndLever,
};
return getDataLists.ToList();
var getAllDataLists = from x in db.Training_TestTraining
select new Model.ResourcesItem
{
ResourcesId = x.TrainingId,
ResourcesCode = x.TrainingCode,
ResourcesName = x.TrainingName,
SupResourcesId = x.SupTrainingId,
IsEndLever = x.IsEndLever,
};
var res = getDataLists.ToList();
foreach (var x in res)
{
x.child = getAllDataLists.Where(xx => xx.SupResourcesId == x.ResourcesId).ToList();
}
return res;
}
}