C2019-013 put sorted by information on the Search Results report

This commit is contained in:
2020-06-25 15:13:21 +00:00
parent 10445a7fd3
commit 0078020e60
2 changed files with 14 additions and 3 deletions

View File

@@ -2391,7 +2391,10 @@ namespace Volian.Controls.Library
}
private void btnPrnSrchRslts_Click(object sender, EventArgs e)
{
OnPrintRequest(new DisplaySearchEventArgs(ReportTitle, TypesSelected, SearchString, lbSrchResults.DataSource as ICollection<ItemInfo>));
string sortedBy = "";
if (cbSorted.Checked)
sortedBy = string.Format("Sorted By: {0}", cmbResultsStyle.Text); //C2019-013 pass in sorted by information
OnPrintRequest(new DisplaySearchEventArgs(ReportTitle, TypesSelected, SearchString, lbSrchResults.DataSource as ICollection<ItemInfo>,sortedBy));
}
private void panSearchButtons_Resize(object sender, EventArgs e)
{
@@ -2444,6 +2447,12 @@ namespace Volian.Controls.Library
get { return _TypesSelected; }
set { _TypesSelected = value; }
}
private string _SortedBy = null;
public string SortedBy // C2019-013 pass in sorted by information to print report
{
get { return _SortedBy; }
set { _SortedBy = value; }
}
private ICollection<ItemInfo> _MyItemInfoList;
public ICollection<ItemInfo> MyItemInfoList
{
@@ -2467,12 +2476,13 @@ namespace Volian.Controls.Library
{
HowLong = howLong;
}
public DisplaySearchEventArgs(string reportTitle, string typesSelected, string searchString, ICollection<ItemInfo> myItemInfoList)
public DisplaySearchEventArgs(string reportTitle, string typesSelected, string searchString, ICollection<ItemInfo> myItemInfoList, string sortedBy)
{
_ReportTitle = reportTitle;
_TypesSelected = typesSelected;
_MyItemInfoList = myItemInfoList;
_SearchString = searchString;
_SortedBy = sortedBy; // C2019-013 pass in sorted by information
foreach (ItemInfo tmpII in myItemInfoList)
if (tmpII != null && tmpII.ActiveFormat != null)
{