Bug fix : Pruefindex / MaxTestIndex evaluated correctly now.
This commit is contained in:
parent
c6a2965faf
commit
26126d380b
@ -252,7 +252,9 @@ namespace Results.Entities
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if ORACLE_DB
|
||||
if (Utils.MaxTestIndex != 0 && (Pruefindex % 100) > Utils.MaxTestIndex) passed = false;
|
||||
#endif
|
||||
return passed;
|
||||
}
|
||||
|
||||
|
||||
@ -79,18 +79,18 @@ namespace Results.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
/// Update background color
|
||||
/// Update background color and caption
|
||||
string message = string.Empty;
|
||||
UpdateBkColor(wMtr.GetColorOfResults(false, out message));
|
||||
|
||||
/// Update caption
|
||||
#if ORACLE_DB
|
||||
bool maxRepeatsExceeded = (Utils.MaxTestIndex != 0 && (wMtr.Pruefindex % 100) > Utils.MaxTestIndex);
|
||||
UpdateBkColor(wMtr.GetColorOfResults(maxRepeatsExceeded, out message));
|
||||
tBox.Text = caption = string.Format("{0} ({1}) {2} {3}",
|
||||
wMtr.WMPosition,
|
||||
wMtr.Pruefindex == 0 ? "?" : string.Format("{0}x", wMtr.Pruefindex % 100),
|
||||
(string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr),
|
||||
message);
|
||||
#else
|
||||
UpdateBkColor(wMtr.GetColorOfResults(false, out message));
|
||||
tBox.Text = caption = string.Format("s/n = {0}", string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr);
|
||||
#endif
|
||||
|
||||
|
||||
@ -91,21 +91,21 @@ namespace Results.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
/// Update background color
|
||||
/// Update background color and caption
|
||||
string message = string.Empty;
|
||||
UpdateBkColor(wMtr.GetColorOfResults(false, out message));
|
||||
|
||||
/// Update caption
|
||||
#if ORACLE_DB
|
||||
bool maxRepeatsExceeded = (Utils.MaxTestIndex != 0 && (wMtr.Pruefindex % 100) > Utils.MaxTestIndex);
|
||||
UpdateBkColor(wMtr.GetColorOfResults(maxRepeatsExceeded, out message));
|
||||
tBox.Text = caption = string.Format("{0} ({1}) {2} {3}",
|
||||
wMtr.WMPosition,
|
||||
wMtr.Pruefindex == 0 ? "?" : string.Format("{0}x", wMtr.Pruefindex % 100),
|
||||
(string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr),
|
||||
message);
|
||||
#else
|
||||
UpdateBkColor(wMtr.GetColorOfResults(false, out message));
|
||||
tBox.Text = caption = string.Format("s/n = {0}", string.IsNullOrEmpty(wMtr.SerialNr) ? string.Empty : wMtr.SerialNr);
|
||||
#endif
|
||||
|
||||
|
||||
UpdateWMPos(wMtr.WMPosition);
|
||||
|
||||
/// Update test results
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2016-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Text;
|
||||
@ -9,6 +9,8 @@ namespace Results
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
public static int MaxTestIndex = 0;
|
||||
|
||||
public static string GetTestName(string name, int repeats, int repetitionNr)
|
||||
{
|
||||
return Common.Utils.GetTestName(name, repeats, repetitionNr);
|
||||
|
||||
@ -235,8 +235,17 @@ namespace TBF.Rig
|
||||
foreach (var cmpnt in components)
|
||||
{
|
||||
if (cmpnt is Elde.ControlBoardDev) ControlBoard = cmpnt as Elde.ControlBoardDev;
|
||||
if (cmpnt is IBenchInfo) ProcessData.BenchInfo = cmpnt as IBenchInfo;
|
||||
if (cmpnt is IErrorFlags) ProcessData.ErrorFlagsComp = cmpnt as IErrorFlags;
|
||||
|
||||
if (cmpnt is IBenchInfo)
|
||||
{
|
||||
ProcessData.BenchInfo = cmpnt as IBenchInfo;
|
||||
if (cmpnt is TBF.Rig.DataContainers.BenchInfo.iPerl.Component)
|
||||
{
|
||||
Results.Utils.MaxTestIndex = (cmpnt as TBF.Rig.DataContainers.BenchInfo.iPerl.Component).MaxTestIndex;
|
||||
}
|
||||
}
|
||||
|
||||
if (cmpnt is IErrorFlags) ProcessData.ErrorFlagsComp = cmpnt as IErrorFlags;
|
||||
if (cmpnt is IStatisticsMonitoring) ProcessData.StatisticsMonitoringComp = cmpnt as IStatisticsMonitoring;
|
||||
|
||||
if ((cmpnt is Output.DB.SensusOracle.Database) && (ProcessData.OracleDB == null))
|
||||
|
||||
@ -754,7 +754,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
meterRslt.VolumeStart = oriMeterRslt.VolumeStart;
|
||||
meterRslt.VolumeEnd = oriMeterRslt.VolumeEnd;
|
||||
#if ORACLE_DB
|
||||
if (ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex == 1)
|
||||
if ((ProcessData.BatchRslts.Batch.WaterMeters[i].Pruefindex % 100) == 1)
|
||||
{
|
||||
meterRslt.Passed = (oriMeterRslt.Error >= tstRslt.ErrLimLo() + tstRslt.ErrLimMargin()
|
||||
&& oriMeterRslt.Error <= tstRslt.ErrLimHi() - tstRslt.ErrLimMargin());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user