Uat_Study
parent
5be770e2bb
commit
c4a7e8f632
|
@ -353,26 +353,13 @@ namespace IRaCIS.Application.Services
|
||||||
IsPage = true,
|
IsPage = true,
|
||||||
IsPublicPage = firstData.IsPublicPage,
|
IsPublicPage = firstData.IsPublicPage,
|
||||||
};
|
};
|
||||||
var pageGroupList = newPageQusetionList.Where(x => x.Type == "group").ToList();
|
|
||||||
if (pageGroupList.Count()!=0)
|
var pageGroupList = newPageQusetionList.Where(x => x.ParentId == null).ToList();
|
||||||
{
|
|
||||||
pageGroupList.ForEach(x =>
|
|
||||||
{
|
|
||||||
x.Childrens = newPageQusetionList.Where(y => y.GroupName == x.GroupName && y.ParentId == null && y.Type != "group").ToList();
|
|
||||||
x.Childrens.ForEach(z =>
|
|
||||||
{
|
|
||||||
this.FindChildQuestion(z, newPageQusetionList);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pageGroupList = newPageQusetionList.Where(x => x.ParentId == null).ToList();
|
|
||||||
pageGroupList.ForEach(x =>
|
pageGroupList.ForEach(x =>
|
||||||
{
|
{
|
||||||
this.FindChildQuestion(x, newPageQusetionList);
|
this.FindChildQuestion(x, newPageQusetionList);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
page.Childrens = pageGroupList;
|
page.Childrens = pageGroupList;
|
||||||
groupList.Add(page);
|
groupList.Add(page);
|
||||||
}
|
}
|
||||||
|
@ -383,31 +370,14 @@ namespace IRaCIS.Application.Services
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
|
qusetionList = qusetionList.Where(x => x.ReadingCriterionPageId == null).ToList();
|
||||||
groupList = qusetionList.Where(x => x.Type == "group").ToList();
|
|
||||||
|
|
||||||
|
|
||||||
if (groupList.Count() != 0)
|
|
||||||
{
|
|
||||||
groupList.ForEach(x =>
|
|
||||||
{
|
|
||||||
x.Childrens = qusetionList.Where(y => y.GroupName == x.GroupName && y.ParentId == null && y.Type != "group").ToList();
|
|
||||||
|
|
||||||
x.Childrens.ForEach(z =>
|
|
||||||
{
|
|
||||||
this.FindChildQuestion(z, qusetionList);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
groupList = qusetionList.Where(x => x.ParentId == null).ToList();
|
groupList = qusetionList.Where(x => x.ParentId == null).ToList();
|
||||||
groupList.ForEach(x =>
|
groupList.ForEach(x =>
|
||||||
{
|
{
|
||||||
this.FindChildQuestion(x, qusetionList);
|
this.FindChildQuestion(x, qusetionList);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
result.SinglePage = groupList;
|
result.SinglePage = groupList;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue