From c4da2415163726fb3fda885f4e6bf9c77e6db844 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 7 Apr 2025 10:48:40 -0400 Subject: [PATCH] B2022-031-Add-filtering-for-Proc-and-Section-name-from-Global-Search --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 2 ++ PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 1 + PROMS/Volian.Controls.Library/DisplaySearch.cs | 3 +++ 3 files changed, 6 insertions(+) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index a291dcb2..d59c839b 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -1492,6 +1492,7 @@ GO @SearchString Search string criteria @SearchStringx Alternate search string criteria @StepTypeList Comma delimited list of of step types used to filter search results (pass '' or null to include all step type sections) + @ProcSectSrch Flag used to indicate if Procedure and Section titles should appear in the global search results. 0 = include 1 = remove Examples: select Text from vefn_SiblingAndChildrenItemsNewByWord('194','','%[^a-z]red[^a-z]%', '%[^a-z]red[^a-z]%',''); select Text from vefn_SiblingAndChildrenItemsNewByWord('194','','%[^a-zA-Z]step 25[^0-9a-zA-Z.vbpi:\\-]%','%[^a-zA-Z]step 25[^0-9a-zA-Z.vbpi:\\-]%',''); @@ -15703,6 +15704,7 @@ GO @UnitPrefix Specified Unit Prefix if any @ByWordPrefix Word Prefix for the specified search string criteria @ByWordSuffix Word Suffix for the specified search string criteria + @ProcSectSrch Flag used to indicate if Procedure and Section titles should appear in the global search results. 0 = include 1 = remove Examples: exec vesp_SearchItemAndChildrenNewByWord '194','','red',0,0,0,0,'','[^a-z]','[^a-z]'; diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 407aa6d1..668e1cf5 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -6986,6 +6986,7 @@ namespace VEPROMS.CSLA.Library get { return _CaseSensitive; } set { _CaseSensitive = value; } } + // B2022-031 - added a ProcSectSrch to filter out procedure and section titles from global search results. private int _ProcSectSrch; public int ProcSectSrch { diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index 9d962791..0ddb5b59 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -2057,6 +2057,7 @@ namespace Volian.Controls.Library ReportTitle = "Step Element Report"; //"Proms - Search by Type: " + typstr; TypesSelected = "Filtered By: " + typstr; SearchString = null; + // B2022-031 - added a cbxProcSectSrch to filter out procedure and section titles from global search results. SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, string.Empty, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, ItemSearchIncludeLinks.Value, includeRTFformat, includeSpecialChars, unitPrefix, string.Empty, string.Empty); cmbResultsStyleIndex = 1; //display step locations in results } @@ -2103,6 +2104,7 @@ namespace Volian.Controls.Library SearchString = TextSearchString; //TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types"; //TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types"); + // B2022-031 - added a cbxProcSectSrch to filter out procedure and section titles from global search results. SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString /*.Replace(@"\",@"\u9586?")*/, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, byWordPrefix, byWordSuffix); cmbResultsStyleIndex = 3; // display step text in results @@ -2145,6 +2147,7 @@ namespace Volian.Controls.Library if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked) { + // B2022-031 - added a cbxProcSectSrch to filter out procedure and section titles from global search results. SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, ROSearchList, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, string.Empty, string.Empty); cmbResultsStyleIndex = 3; // display step text in results }