diff --git a/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs index cebb629bf..1d574c465 100644 --- a/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCQuestionService.cs @@ -104,7 +104,7 @@ namespace IRaCIS.Core.Application.Contracts .ThenBy(t=>t.ShowOrder) .ProjectTo(_mapper.ConfigurationProvider); - return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, queryQCQuestionConfigure.SortField.IsNullOrEmpty()?nameof(queryQCQuestionConfigure.QuestionName): queryQCQuestionConfigure.SortField, queryQCQuestionConfigure.Asc); + return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" }); } public async Task AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure) diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs index dfa6fc058..f903e9ff2 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicineQuestionService.cs @@ -62,7 +62,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType.Value) .ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder); - return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize,inDto.SortField,inDto.Asc); + return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" }); } /// @@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type)) .WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory) .WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType) - .ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder); + .ProjectTo(_mapper.ConfigurationProvider).OrderByDescending(x=>x.LanguageType).ThenBy(x => x.ShowOrder); var isConfirmMedicineQuestion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.IsConfirmMedicineQuestion).FirstOrDefaultAsync();