(1) 'Max_test_index' added to Results, (2) "Max.test index" added to BenchInfoEx, (3) ResultsTabPageCtrl draws NOK wm-s with max. test index in 'Orange', (4) bug fix in ProductionTracing simulation, ver. 2.18.1027
This commit is contained in:
@@ -261,6 +261,8 @@ namespace Results
|
||||
Bench_address4, /// 226 'Address 4' from IBenchInfo
|
||||
Bench_address5, /// 227 'Address 5' from IBenchInfo
|
||||
|
||||
Max_test_index, /// 228 MaxPruefindex % 100
|
||||
|
||||
Count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.18.1017.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1017.0")]
|
||||
[assembly: AssemblyVersion("2.18.1027.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1027.0")]
|
||||
|
||||
@@ -409,14 +409,17 @@ namespace Results
|
||||
#endif
|
||||
|
||||
#if IPERL
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactor, "iPerl OrigCalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.OrigCalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactor, "iPerl CalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.OrigCalibFactor, "iPerl OrigCalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.OrigCalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.CalibFactor, "iPerl CalibFactor", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.CalibFactor)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2ErrWOCorrection, "iPerl Q2ErrWOCorrection",Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Q2ErrWOCorrection)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrectionDone, "iPerl Q2CorrectionDone", Quantity.Boolean,ItemCategory.MeterResult, (w, t, u, f, p) => (w.Q2CorrectionDone ? Strings.Yes : Strings.No)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrRFlow, "iPerl Q2CorrRFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrRFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrLFlow, "iPerl Q2CorrLFlow", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrLFlow)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2CorrFlowRight, "iPerl Q2CorrFlowRight", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.Q2CorrFlowRight)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.FW_Version, "iPerl FW version", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.FWVersion)));
|
||||
#if ORACLE_DB
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_test_index, "iPerl test index", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, (w.Pruefindex % 100))));
|
||||
#endif
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestDone, Strings.Test_done + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).TestDone)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).Passed)));
|
||||
|
||||
@@ -30,6 +30,10 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
public string Address5 { get { return myCfg.Address5; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
||||
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex { get { return myCfg.MaxTestIndex; } } /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
#endif
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
public RemoteDBUse RemoteDBUse;
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
#endif
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
@@ -64,6 +67,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
ApprovedBy = string.Empty;
|
||||
|
||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||
#if ORACLE_DB
|
||||
MaxTestIndex = 4;
|
||||
#endif
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@@ -79,6 +85,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
"Approval date",
|
||||
"Approved by",
|
||||
"Remote DB use",
|
||||
#if ORACLE_DB
|
||||
"Max.test index",
|
||||
#endif
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -117,6 +126,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
case 8: return ApprovalDate;
|
||||
case 9: return ApprovedBy;
|
||||
case 10: return RemoteDBUse.ToDescription();
|
||||
#if ORACLE_DB
|
||||
case 11: return MaxTestIndex.ToString();
|
||||
#endif
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -153,7 +165,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
}
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
#if ORACLE_DB
|
||||
case 11: MaxTestIndex = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
#endif
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@@ -176,6 +190,7 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
case 9:
|
||||
return true;
|
||||
case 1:
|
||||
case 11:
|
||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
case 10:
|
||||
@@ -206,6 +221,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
||||
prms.ApprovalDate = this.ApprovalDate;
|
||||
prms.ApprovedBy = this.ApprovedBy;
|
||||
prms.RemoteDBUse = this.RemoteDBUse;
|
||||
#if ORACLE_DB
|
||||
prms.MaxTestIndex = this.MaxTestIndex;
|
||||
#endif
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
@@ -29,6 +29,9 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
public string Address4 { get { return string.Empty; } }
|
||||
public string Address5 { get { return string.Empty; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return RemoteDBUse.LocalDBOnly; } }
|
||||
#if ORACLE_DB
|
||||
public int MaxTestIndex { get { return 0; } }
|
||||
#endif
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -19,5 +19,8 @@ namespace TBF.BenchControl.GenericDevices
|
||||
string Address4 { get; }
|
||||
string Address5 { get; }
|
||||
RemoteDBUse RemoteDBUse { get; }
|
||||
}
|
||||
#if ORACLE_DB
|
||||
int MaxTestIndex { get; } /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,8 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
|
||||
public void StopDevice()
|
||||
{
|
||||
if (tracingCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
using (ISession session = sessionFactory.OpenSession())
|
||||
{
|
||||
TracingDB.DB.UnregisterWorkplace(session, workplace);
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1026.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1026.0")]
|
||||
[assembly: AssemblyVersion("2.18.1027.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1027.0")]
|
||||
|
||||
@@ -322,7 +322,17 @@ namespace TBF.Screens
|
||||
ListView GetResultsTestsAreRows(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
||||
{
|
||||
metersKind = wMtr.Compound() ? MetersKind.Combined : (wMtr.HeatMeter() ? MetersKind.HeatMeter : MetersKind.Single);
|
||||
Color commonBackColor = wMtr.PassedFromTests() ? Color.LightGreen : (wMtr.CompletedFromTests() ? Color.LightPink : Color.White);
|
||||
bool wmtrCompleted = wMtr.CompletedFromTests();
|
||||
bool wmtrPassed = wMtr.PassedFromTests();
|
||||
|
||||
Color commonBackColor = wmtrPassed ? Color.LightGreen : (wmtrCompleted ? Color.LightPink : Color.White);
|
||||
#if ORACLE_DB
|
||||
if (TBF.BenchControl.Sequences.ProcessData.BenchInfo != null)
|
||||
{
|
||||
int maxTrials = TBF.BenchControl.Sequences.ProcessData.BenchInfo.MaxTestIndex;
|
||||
if (wmtrCompleted && !wmtrPassed && ((wMtr.Pruefindex % 100) >= maxTrials)) commonBackColor = Color.DarkOrange;
|
||||
}
|
||||
#endif
|
||||
ListView lview = GetListView(commonBackColor);
|
||||
|
||||
IList<Results.WMeterRsltItemSpec> items = GetRsltItems(metersKind);
|
||||
|
||||
Reference in New Issue
Block a user