diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs index 00fa6c47..e0ab5ae3 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs @@ -15,6 +15,8 @@ *└──────────────────────────────────┘ */ +using Tiobon.Core.Model.ViewModels.Extend; + namespace Tiobon.Core.Model.Models; /// @@ -34,4 +36,7 @@ public class Ghre_SurveyQuestionPoolDto : Ghre_SurveyQuestionPool public string BuiltInLabel { get; set; } + + public List Options { get; set; } = new List(); + } diff --git a/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs b/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs index 12034437..b3c9612c 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs @@ -1,6 +1,4 @@ -using Mysqlx.Crud; -using System.Net; -using Tiobon.Core.IServices; +using Org.BouncyCastle.Crypto; namespace Tiobon.Core.Services; @@ -26,6 +24,10 @@ public class Ghre_SurveyQuestionPoolServices : BaseServices x.Id).ToList(); + var answers = await _ghre_SurveyQuestionPoolOptionServicesServices.Query(x => x.SurveyQuestionPoolId != null && ids.Contains(x.SurveyQuestionPoolId.Value), "TaxisNo ASC"); + //data.ForEach(async x => //{ // x.DifficultyLevelLabel = await GetParaLabel("DifficultyLevel", x.DifficultyLevel); @@ -45,6 +47,18 @@ public class Ghre_SurveyQuestionPoolServices : BaseServices o.SurveyQuestionPoolId == x.Id) + .Select(x => new InsertGhre_SurveyOptionExtend() + { + OptionNo = x.OptionNo, + OptionContent = x.OptionContent, + IsOther = x.IsOther, + ImageUrl = x.ImageUrl, + ImageWidthPc = x.ImageWidthPc, + ImageWidthApp = x.ImageWidthApp, + Score = x.Score, + }).ToList(); });