C2020-009 Search By Word
This commit is contained in:
@@ -6021,11 +6021,11 @@ namespace VEPROMS.CSLA.Library
|
||||
#endregion // EnhancedGetMissingEnh
|
||||
#endregion // EnhancedSupport
|
||||
#region Text Search
|
||||
public static ItemInfoList GetListFromTextSearch(string docVersionList, string stepTypeList, string searchString, int caseSensitive, ItemSearchIncludeLinks includeLinks, bool includeRtfFormatting, bool includeSpecialCharacters, string unitPrefix)
|
||||
public static ItemInfoList GetListFromTextSearch(string docVersionList, string stepTypeList, string searchString, int caseSensitive, ItemSearchIncludeLinks includeLinks, bool includeRtfFormatting, bool includeSpecialCharacters, string unitPrefix, string byWordPrefix, string byWordSuffix)
|
||||
{
|
||||
try
|
||||
{
|
||||
ItemInfoList tmp = DataPortal.Fetch<ItemInfoList>(new ItemListSearchCriteria(docVersionList, stepTypeList, searchString, caseSensitive, includeLinks, includeRtfFormatting, includeSpecialCharacters, unitPrefix));
|
||||
ItemInfoList tmp = DataPortal.Fetch<ItemInfoList>(new ItemListSearchCriteria(docVersionList, stepTypeList, searchString, caseSensitive, includeLinks, includeRtfFormatting, includeSpecialCharacters, unitPrefix, byWordPrefix, byWordSuffix));
|
||||
tmp.SourceOfList = "Search";
|
||||
ItemInfo.AddList(tmp);
|
||||
tmp.AddEvents();
|
||||
@@ -6088,8 +6088,25 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return _UnitPrefix; }
|
||||
set { _UnitPrefix = value; }
|
||||
}
|
||||
// C2020-009: Search - Allow search 'By Word'.
|
||||
// Prefix & Suffix are sql expression to use before/after search string, they limit for alpha or numeric before/after
|
||||
// the search string. These are set in Volian.Controls.Library.DisplaySearch.cs
|
||||
private string _ByWordPrefix;
|
||||
public string ByWordPrefix
|
||||
{
|
||||
get { return _ByWordPrefix; }
|
||||
set { _ByWordPrefix = value; }
|
||||
}
|
||||
private string _ByWordSuffix;
|
||||
|
||||
public string ByWordSuffix
|
||||
{
|
||||
get { return _ByWordSuffix; }
|
||||
set { _ByWordSuffix = value; }
|
||||
}
|
||||
public ItemListSearchCriteria(string docVersionList, string stepTypeList, string searchString,
|
||||
int caseSensitive, ItemSearchIncludeLinks includeLinks, bool includeRtfFormatting, bool includeSpecialCharacters, string unitPrefix)
|
||||
int caseSensitive, ItemSearchIncludeLinks includeLinks, bool includeRtfFormatting, bool includeSpecialCharacters,
|
||||
string unitPrefix, string byWordPrefix, string byWordSuffix)
|
||||
{
|
||||
_DocVersionList = docVersionList;
|
||||
_StepTypeList = stepTypeList;
|
||||
@@ -6099,6 +6116,8 @@ namespace VEPROMS.CSLA.Library
|
||||
_IncludeRtfFormatting = includeRtfFormatting;
|
||||
_IncludeSpecialCharacters = includeSpecialCharacters;
|
||||
_UnitPrefix = unitPrefix;
|
||||
_ByWordPrefix = byWordPrefix;
|
||||
_ByWordSuffix = byWordSuffix;
|
||||
}
|
||||
}
|
||||
private void DataPortal_Fetch(ItemListSearchCriteria criteria)
|
||||
@@ -6111,7 +6130,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "vesp_SearchItemAndChildrenNew";
|
||||
cm.CommandText = "vesp_SearchItemAndChildrenNewByWord";
|
||||
cm.Parameters.AddWithValue("@DocVersionList", criteria.DocVersionList);
|
||||
cm.Parameters.AddWithValue("@StepTypeList", criteria.StepTypeList);
|
||||
cm.Parameters.AddWithValue("@SearchString", criteria.SearchString);
|
||||
@@ -6120,6 +6139,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.Parameters.AddWithValue("@IncludeRtfFormatting", criteria.IncludeRtfFormatting ? 1 : 0);
|
||||
cm.Parameters.AddWithValue("@IncludeSpecialCharacters", criteria.IncludeSpecialCharacters ? 1 : 0);
|
||||
cm.Parameters.AddWithValue("@UnitPrefix", criteria.UnitPrefix);
|
||||
cm.Parameters.AddWithValue("@ByWordPrefix", criteria.ByWordPrefix);
|
||||
cm.Parameters.AddWithValue("@ByWordSuffix", criteria.ByWordSuffix);
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
|
Reference in New Issue
Block a user