B2021-076: Proms search results are not presented in order when printed to PDF

This commit is contained in:
Jake
2022-08-18 11:34:46 +00:00
parent 3a633071ec
commit d35222e6bc
6 changed files with 104 additions and 10 deletions

View File

@@ -330,6 +330,9 @@ namespace VEPROMS.CSLA.Library
}
}
public string SearchPath { get { return ""; } }
// B2021-076: Proms search results are not presented in order when printed to PDF
public string SearchDefaultSort { get { return string.Empty; } }
#endregion
#region UnlinkEnhancedDocVersion

View File

@@ -125,7 +125,11 @@ namespace VEPROMS.CSLA.Library
}
}
public string SearchPath { get { return ""; } }
#endregion
// B2021-076: Proms search results are not presented in order when printed to PDF
public string SearchDefaultSort { get { return string.Empty; } }
#endregion
#region Folder Config (Read-Only)
[NonSerialized]
private FolderConfig _FolderConfig;

View File

@@ -2716,6 +2716,33 @@ namespace VEPROMS.CSLA.Library
}
}
// B2021-076: Proms search results are not presented in order when printed to PDF
internal string _SearchDefaultSort;
public string SearchDefaultSort
{
get
{
if (_SearchDefaultSort == null)
{
if (IsProcedure)
_SearchDefaultSort = "FLD" + MyDocVersion.MyFolder.ManualOrder.ToString().PadLeft(5, '0') + string.Format(".PRC{0}", Ordinal.ToString().PadLeft(5, '0'));
else if (IsSection)
_SearchDefaultSort = ActiveParent.SearchDefaultSort + string.Format(".SEC{0}", Ordinal.ToString().PadLeft(5, '0'));
else
{
PartInfo myPart = FirstSibling.ItemPartCount > 0 ? FirstSibling.ItemParts[0] : null;
if (myPart != null)
_SearchDefaultSort = string.Format("{0}{1}", myPart.SearchDefaultSort, Ordinal.ToString().PadLeft(5, '0'));
else
_SearchDefaultSort = ActiveParent.SearchDefaultSort + string.Format(".SUB{0}", Ordinal.ToString().PadLeft(5, '0'));
}
}
return _SearchDefaultSort;
}
}
internal int _SearchAnnotationID;
public int SearchAnnotationID
{

View File

@@ -114,6 +114,47 @@ namespace VEPROMS.CSLA.Library
return _SearchPath;
}
}
// B2021-076: Proms search results are not presented in order when printed to PDF
private string _SearchDefaultSort;
public string SearchDefaultSort
{
get
{
if (_SearchDefaultSort == null)
{
string partText = String.Empty;
switch ((E_FromType)FromType)
{
case E_FromType.Caution:
partText = ".Caution";
break;
case E_FromType.Note:
partText = ".Note";
break;
case E_FromType.RNO:
partText = ".RNO";
break;
case E_FromType.Table:
partText = ".Table";
break;
default:
partText = ".";
break;
}
_SearchDefaultSort = ActiveParent.SearchDefaultSort + partText;
}
return _SearchDefaultSort;
}
}
internal PartInfo(SafeDataReader dr, ItemInfo itemInfo)
{

View File

@@ -16,6 +16,8 @@ namespace VEPROMS.CSLA.Library
FormatInfo LocalFormat { get; }
string SearchDVPath { get; }
string SearchPath { get; }
// B2021-076: Proms search results are not presented in order when printed to PDF
string SearchDefaultSort { get; }
string ToString();
ConfigDynamicTypeDescriptor MyConfig { get; }
bool IsFolder { get; }