From 457c8b132918d84d285ba7d3c5de48253934b289 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 18 Jun 2024 09:47:52 +0800 Subject: [PATCH] 1 --- Tiobon.Core.Model/ViewModels/Menu.cs | 1 + .../Ghre/Ghre_ExamServices.cs | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Model/ViewModels/Menu.cs b/Tiobon.Core.Model/ViewModels/Menu.cs index 650ebce6..4b867bff 100644 --- a/Tiobon.Core.Model/ViewModels/Menu.cs +++ b/Tiobon.Core.Model/ViewModels/Menu.cs @@ -138,6 +138,7 @@ public class TableColumn1 public string searchable { get; set; } public string searchRequired { get; set; } public int? searchColumnSeq { get; set; } + public string searchColumnSeq1 { get; set; } public string multipleSearchValue { get; set; } public string maxTagCount { get; set; } public string selfDefine { get; set; } diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs index 9b0dc404..f412ad80 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs @@ -311,7 +311,7 @@ public class Ghre_ExamServices : BaseServices(sql); - var SearchFormFields = Mapper.Map(TableColumn).ToANew>(); + var TableColumns = Db.Ado.SqlQuery(sql); + + TableColumns.ForEach(x => + { + try + { + if (!string.IsNullOrWhiteSpace(x.searchColumnSeq1)) + x.searchColumnSeq = Convert.ToInt32(x.searchColumnSeq1); + + } + catch (Exception) + { + } + }); + var SearchFormFields = Mapper.Map(TableColumns).ToANew>(); SearchFormFields.ForEach(x => { if (!string.IsNullOrWhiteSpace(x.searchOperator1))