edit
This commit is contained in:
@@ -501,6 +501,23 @@ namespace XLAB2
|
||||
return serialNumbers.Count == 0 ? string.Empty : string.Join(", ", serialNumbers.ToArray());
|
||||
}
|
||||
|
||||
private static string BuildInstrumentNamesText(IEnumerable<PsvDocumentLine> lines)
|
||||
{
|
||||
var instrumentNames = (lines ?? Enumerable.Empty<PsvDocumentLine>())
|
||||
.Select(delegate(PsvDocumentLine line)
|
||||
{
|
||||
return line == null || string.IsNullOrWhiteSpace(line.InstrumentName)
|
||||
? null
|
||||
: line.InstrumentName.Trim();
|
||||
})
|
||||
.Where(delegate(string instrumentName) { return !string.IsNullOrWhiteSpace(instrumentName); })
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.OrderBy(delegate(string instrumentName) { return instrumentName; }, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
return instrumentNames.Count == 0 ? string.Empty : string.Join("; ", instrumentNames.ToArray());
|
||||
}
|
||||
|
||||
private static bool HasVerificationData(PsvDocumentLine line)
|
||||
{
|
||||
return line != null
|
||||
@@ -1759,7 +1776,8 @@ namespace XLAB2
|
||||
return true;
|
||||
}
|
||||
|
||||
return Contains(group.InstrumentType, GroupFilterText)
|
||||
return Contains(group.InstrumentName, GroupFilterText)
|
||||
|| Contains(group.InstrumentType, GroupFilterText)
|
||||
|| Contains(group.RangeText, GroupFilterText)
|
||||
|| Contains(group.RegistryNumber, GroupFilterText)
|
||||
|| Contains(group.SerialNumbersText, GroupFilterText);
|
||||
@@ -2330,6 +2348,7 @@ namespace XLAB2
|
||||
.ThenBy(group => group.Key.RangeText)
|
||||
.Select(group => new PsvDocumentGroupSummary
|
||||
{
|
||||
InstrumentName = BuildInstrumentNamesText(group),
|
||||
InstrumentType = group.Key.InstrumentType,
|
||||
RangeText = group.Key.RangeText,
|
||||
RegistryNumber = group.Key.RegistryNumber,
|
||||
|
||||
Reference in New Issue
Block a user