diff --git a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs index 93d560664..222bc563b 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs @@ -60,7 +60,7 @@ namespace IRaCIS.Application.Contracts [NotDefault] public Guid TrialId { get; set; } - public string Code { get; set; } + public string ParentCode { get; set; } } public class AddTrialConfigDictionaryListInDto diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs index a8363ccd4..f8797025f 100644 --- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs +++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs @@ -159,7 +159,7 @@ namespace IRaCIS.Application.Services [HttpPost] public async Task> GetTrialConfigDictionarySelect(GetTrialConfigDictionarySelectInDto inDto) { - var parentId = await _dicRepository.Where(x => x.Code == inDto.Code).Select(x => x.Id).FirstNotNullAsync(); + var parentId = await _dicRepository.Where(x => x.Code == inDto.ParentCode).Select(x => x.Id).FirstNotNullAsync(); List result= await _dicRepository.Where(t => t.ParentId == parentId) .OrderBy(t => t.ShowOrder).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();