(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_address4, /// 226 'Address 4' from IBenchInfo
|
||||||
Bench_address5, /// 227 'Address 5' from IBenchInfo
|
Bench_address5, /// 227 'Address 5' from IBenchInfo
|
||||||
|
|
||||||
|
Max_test_index, /// 228 MaxPruefindex % 100
|
||||||
|
|
||||||
Count,
|
Count,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.18.1017.0")]
|
[assembly: AssemblyVersion("2.18.1027.0")]
|
||||||
[assembly: AssemblyFileVersion("2.18.1017.0")]
|
[assembly: AssemblyFileVersion("2.18.1027.0")]
|
||||||
|
|||||||
@@ -409,14 +409,17 @@ namespace Results
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IPERL
|
#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.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.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.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.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.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.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.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.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
|
#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.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)));
|
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 string Address5 { get { return myCfg.Address5; } }
|
||||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
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()
|
public Component()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
public string ApprovalDate;
|
public string ApprovalDate;
|
||||||
public string ApprovedBy;
|
public string ApprovedBy;
|
||||||
public RemoteDBUse RemoteDBUse;
|
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
|
/// Private parameterless constructor invoked by all other (public) constructors
|
||||||
ComponentCfg() {}
|
ComponentCfg() {}
|
||||||
@@ -64,6 +67,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
ApprovedBy = string.Empty;
|
ApprovedBy = string.Empty;
|
||||||
|
|
||||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||||
|
#if ORACLE_DB
|
||||||
|
MaxTestIndex = 4;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
string[] paramNames = new string[]
|
string[] paramNames = new string[]
|
||||||
@@ -79,6 +85,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
"Approval date",
|
"Approval date",
|
||||||
"Approved by",
|
"Approved by",
|
||||||
"Remote DB use",
|
"Remote DB use",
|
||||||
|
#if ORACLE_DB
|
||||||
|
"Max.test index",
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
public string ParamName(int i) { return paramNames[i]; }
|
public string ParamName(int i) { return paramNames[i]; }
|
||||||
public int ParamsCount() { return paramNames.Length; }
|
public int ParamsCount() { return paramNames.Length; }
|
||||||
@@ -117,6 +126,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
case 8: return ApprovalDate;
|
case 8: return ApprovalDate;
|
||||||
case 9: return ApprovedBy;
|
case 9: return ApprovedBy;
|
||||||
case 10: return RemoteDBUse.ToDescription();
|
case 10: return RemoteDBUse.ToDescription();
|
||||||
|
#if ORACLE_DB
|
||||||
|
case 11: return MaxTestIndex.ToString();
|
||||||
|
#endif
|
||||||
default: return string.Empty;
|
default: return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,7 +165,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CfgUpdateFlags.Error;
|
return CfgUpdateFlags.Error;
|
||||||
|
#if ORACLE_DB
|
||||||
|
case 11: MaxTestIndex = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||||
|
#endif
|
||||||
default: return CfgUpdateFlags.None;
|
default: return CfgUpdateFlags.None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,6 +190,7 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
case 9:
|
case 9:
|
||||||
return true;
|
return true;
|
||||||
case 1:
|
case 1:
|
||||||
|
case 11:
|
||||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@@ -206,6 +221,9 @@ namespace TBF.BenchControl.BenchInfo.Extended
|
|||||||
prms.ApprovalDate = this.ApprovalDate;
|
prms.ApprovalDate = this.ApprovalDate;
|
||||||
prms.ApprovedBy = this.ApprovedBy;
|
prms.ApprovedBy = this.ApprovedBy;
|
||||||
prms.RemoteDBUse = this.RemoteDBUse;
|
prms.RemoteDBUse = this.RemoteDBUse;
|
||||||
|
#if ORACLE_DB
|
||||||
|
prms.MaxTestIndex = this.MaxTestIndex;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public Config.Entities.IParamsProvider Clone()
|
public Config.Entities.IParamsProvider Clone()
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
|||||||
public string Address4 { get { return string.Empty; } }
|
public string Address4 { get { return string.Empty; } }
|
||||||
public string Address5 { get { return string.Empty; } }
|
public string Address5 { get { return string.Empty; } }
|
||||||
public RemoteDBUse RemoteDBUse { get { return RemoteDBUse.LocalDBOnly; } }
|
public RemoteDBUse RemoteDBUse { get { return RemoteDBUse.LocalDBOnly; } }
|
||||||
|
#if ORACLE_DB
|
||||||
|
public int MaxTestIndex { get { return 0; } }
|
||||||
|
#endif
|
||||||
|
|
||||||
public Component()
|
public Component()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,5 +19,8 @@ namespace TBF.BenchControl.GenericDevices
|
|||||||
string Address4 { get; }
|
string Address4 { get; }
|
||||||
string Address5 { get; }
|
string Address5 { get; }
|
||||||
RemoteDBUse RemoteDBUse { 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()
|
public void StopDevice()
|
||||||
{
|
{
|
||||||
|
if (tracingCfg.DebugLevel == DebugMode.Simulate) return;
|
||||||
|
|
||||||
using (ISession session = sessionFactory.OpenSession())
|
using (ISession session = sessionFactory.OpenSession())
|
||||||
{
|
{
|
||||||
TracingDB.DB.UnregisterWorkplace(session, workplace);
|
TracingDB.DB.UnregisterWorkplace(session, workplace);
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.18.1026.0")]
|
[assembly: AssemblyVersion("2.18.1027.0")]
|
||||||
[assembly: AssemblyFileVersion("2.18.1026.0")]
|
[assembly: AssemblyFileVersion("2.18.1027.0")]
|
||||||
|
|||||||
@@ -322,7 +322,17 @@ namespace TBF.Screens
|
|||||||
ListView GetResultsTestsAreRows(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
ListView GetResultsTestsAreRows(Results.Entities.WaterMeter wMtr, int printedWMNr)
|
||||||
{
|
{
|
||||||
metersKind = wMtr.Compound() ? MetersKind.Combined : (wMtr.HeatMeter() ? MetersKind.HeatMeter : MetersKind.Single);
|
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);
|
ListView lview = GetListView(commonBackColor);
|
||||||
|
|
||||||
IList<Results.WMeterRsltItemSpec> items = GetRsltItems(metersKind);
|
IList<Results.WMeterRsltItemSpec> items = GetRsltItems(metersKind);
|
||||||
|
|||||||
Reference in New Issue
Block a user