Results.Entities bug fixes and copy constructors.
This commit is contained in:
+67
-24
@@ -10,42 +10,42 @@ namespace Results.Entities
|
|||||||
public class Batch
|
public class Batch
|
||||||
{
|
{
|
||||||
public virtual int Id { get; protected set; }
|
public virtual int Id { get; protected set; }
|
||||||
public virtual int BatchNr { get; set; }
|
public virtual int BatchNr { get; set; }
|
||||||
public virtual string ProgramVersion { get; set; }
|
public virtual string ProgramVersion { get; set; }
|
||||||
public virtual int TestBenchId { get; set; }
|
public virtual int TestBenchId { get; set; }
|
||||||
public virtual string TestBenchName { get; set; } /// CEVAK, not mapped to DB
|
public virtual string TestBenchName { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string Address1 { get; set; } /// CEVAK, not mapped to DB
|
public virtual string Address1 { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string Address2 { get; set; } /// CEVAK, not mapped to DB
|
public virtual string Address2 { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string Address3 { get; set; } /// CEVAK, not mapped to DB
|
public virtual string Address3 { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string Address4 { get; set; } /// CEVAK, not mapped to DB
|
public virtual string Address4 { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string Address5 { get; set; } /// CEVAK, not mapped to DB
|
public virtual string Address5 { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string UserName { get; set; }
|
public virtual string UserName { get; set; }
|
||||||
public virtual int UserNumber { get; set; }
|
public virtual int UserNumber { get; set; }
|
||||||
public virtual string ProcedureName { get; set; }
|
public virtual string ProcedureName { get; set; }
|
||||||
public virtual bool IsRemoteProcedure { get; set; } /// Stara Tura, not mapped to DB
|
public virtual bool IsRemoteProcedure { get; set; } /// Stara Tura, not mapped to DB
|
||||||
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual int ProcedureRevision { get; set; }
|
public virtual int ProcedureRevision { get; set; }
|
||||||
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
|
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
|
||||||
public virtual string ProtocolTitle { get; set; }
|
public virtual string ProtocolTitle { get; set; }
|
||||||
public virtual string Remark { get; set; }
|
public virtual string Remark { get; set; }
|
||||||
public virtual double RealDensity { get; set; } /// Density correction in [kg/m3]
|
public virtual double RealDensity { get; set; } /// Density correction in [kg/m3]
|
||||||
public virtual double AtTemperature { get; set; }
|
public virtual double AtTemperature { get; set; }
|
||||||
public virtual double Buoyancy { get; set; }
|
public virtual double Buoyancy { get; set; }
|
||||||
public virtual int Counter6 { get; set; }
|
public virtual int Counter6 { get; set; }
|
||||||
public virtual int Counter7 { get; set; }
|
public virtual int Counter7 { get; set; }
|
||||||
public virtual int Counter8 { get; set; }
|
public virtual int Counter8 { get; set; }
|
||||||
public virtual int Counter9 { get; set; }
|
public virtual int Counter9 { get; set; }
|
||||||
public virtual int Counter10 { get; set; }
|
public virtual int Counter10 { get; set; }
|
||||||
public virtual DateTime StartTime { get; set; }
|
public virtual DateTime StartTime { get; set; }
|
||||||
public virtual DateTime EndTime { get; set; }
|
public virtual DateTime EndTime { get; set; }
|
||||||
public virtual bool Dirty { get; set; }
|
public virtual bool Dirty { get; set; }
|
||||||
public virtual bool RsltsSent { get; set; }
|
public virtual bool RsltsSent { get; set; }
|
||||||
public virtual bool RsltsPrinted { get; set; }
|
public virtual bool RsltsPrinted { get; set; }
|
||||||
public virtual IList<TestData> Tests { get; set; }
|
public virtual IList<TestData> Tests { get; set; }
|
||||||
public virtual IList<WaterMeter> WaterMeters { get; set; }
|
public virtual IList<WaterMeter> WaterMeters { get; set; }
|
||||||
public virtual IList<TestRslt> TestRslts { get; set; }
|
public virtual IList<TestRslt> TestRslts { get; set; }
|
||||||
public virtual bool Compound { get; set; } /// Not mapped to DB now
|
public virtual bool Compound { get; set; } /// Not mapped to DB now
|
||||||
public virtual bool HeatMeter { get; set; } /// Not mapped to DB now
|
public virtual bool HeatMeter { get; set; } /// Not mapped to DB now
|
||||||
|
|
||||||
public virtual IList<TestData> RegularTests()
|
public virtual IList<TestData> RegularTests()
|
||||||
{
|
{
|
||||||
@@ -122,6 +122,49 @@ namespace Results.Entities
|
|||||||
Buoyancy = Config.Data.Buoyancy;
|
Buoyancy = Config.Data.Buoyancy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copy constructor, copies all except of Id.
|
||||||
|
/// Lists Tests, WaterMeters and TestRslts are empty. Have to be copied elwhere.
|
||||||
|
/// </summary>
|
||||||
|
public Batch(Batch oriBatch)
|
||||||
|
{
|
||||||
|
BatchNr = oriBatch.BatchNr;
|
||||||
|
ProgramVersion = oriBatch.ProgramVersion;
|
||||||
|
TestBenchId = oriBatch.TestBenchId;
|
||||||
|
TestBenchName = oriBatch.TestBenchName;
|
||||||
|
Address1 = oriBatch.Address1;
|
||||||
|
Address2 = oriBatch.Address2;
|
||||||
|
Address3 = oriBatch.Address3;
|
||||||
|
Address4 = oriBatch.Address4;
|
||||||
|
Address5 = oriBatch.Address5;
|
||||||
|
UserName = oriBatch.UserName;
|
||||||
|
UserNumber = oriBatch.UserNumber;
|
||||||
|
ProcedureName = oriBatch.ProcedureName;
|
||||||
|
IsRemoteProcedure = oriBatch.IsRemoteProcedure;
|
||||||
|
ProcedureDescription = oriBatch.ProcedureDescription;
|
||||||
|
ProcedureRevision = oriBatch.ProcedureRevision;
|
||||||
|
WatermetersStr = oriBatch.WatermetersStr;
|
||||||
|
ProtocolTitle = oriBatch.ProtocolTitle;
|
||||||
|
Remark = oriBatch.Remark;
|
||||||
|
RealDensity = oriBatch.RealDensity;
|
||||||
|
AtTemperature = oriBatch.AtTemperature;
|
||||||
|
Buoyancy = oriBatch.Buoyancy;
|
||||||
|
Counter6 = oriBatch.Counter6;
|
||||||
|
Counter7 = oriBatch.Counter7;
|
||||||
|
Counter8 = oriBatch.Counter8;
|
||||||
|
Counter9 = oriBatch.Counter9;
|
||||||
|
Counter10 = oriBatch.Counter10;
|
||||||
|
StartTime = oriBatch.StartTime;
|
||||||
|
EndTime = oriBatch.EndTime;
|
||||||
|
Dirty = oriBatch.Dirty;
|
||||||
|
RsltsSent = oriBatch.RsltsSent;
|
||||||
|
RsltsPrinted = oriBatch.RsltsPrinted;
|
||||||
|
|
||||||
|
Tests = new List<TestData>();
|
||||||
|
WaterMeters = new List<WaterMeter>();
|
||||||
|
TestRslts = new List<TestRslt>();
|
||||||
|
}
|
||||||
|
|
||||||
public virtual int PassedMetersCount()
|
public virtual int PassedMetersCount()
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|||||||
@@ -22,22 +22,25 @@ namespace Results.Entities
|
|||||||
public virtual string Custom2 { get; set; }
|
public virtual string Custom2 { get; set; }
|
||||||
public virtual string Custom3 { get; set; }
|
public virtual string Custom3 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default constructor, safe values
|
||||||
|
/// </summary>
|
||||||
public Components()
|
public Components()
|
||||||
{
|
{
|
||||||
TestBenchId = 0;
|
TestBenchId = 0;
|
||||||
TestBenchName = string.Empty;
|
TestBenchName = string.Empty;
|
||||||
Pump = string.Empty;
|
Pump = string.Empty;
|
||||||
RegValve = string.Empty;
|
RegValve = string.Empty;
|
||||||
Flowmeter = string.Empty;
|
Flowmeter = string.Empty;
|
||||||
Diverter = string.Empty;
|
Diverter = string.Empty;
|
||||||
Scale = string.Empty;
|
Scale = string.Empty;
|
||||||
Custom1 = string.Empty;
|
Custom1 = string.Empty;
|
||||||
Custom2 = string.Empty;
|
Custom2 = string.Empty;
|
||||||
Custom3 = string.Empty;
|
Custom3 = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Components(int benchId, string benchName, string pump, string flowmeter,
|
public Components(int benchId, string benchName, string pump, string flowmeter,
|
||||||
string scale, string regValve, string diverter)
|
string scale, string regValve, string diverter)
|
||||||
{
|
{
|
||||||
TestBenchId = benchId;
|
TestBenchId = benchId;
|
||||||
TestBenchName = benchName;
|
TestBenchName = benchName;
|
||||||
@@ -51,6 +54,23 @@ namespace Results.Entities
|
|||||||
Custom3 = string.Empty;
|
Custom3 = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copy constructor, copies all except of Id
|
||||||
|
/// </summary>
|
||||||
|
public Components(Components oriComponents)
|
||||||
|
{
|
||||||
|
TestBenchId = oriComponents.TestBenchId;
|
||||||
|
TestBenchName = oriComponents.TestBenchName;
|
||||||
|
Pump = oriComponents.Pump;
|
||||||
|
RegValve = oriComponents.RegValve;
|
||||||
|
Flowmeter = oriComponents.Flowmeter;
|
||||||
|
Diverter = oriComponents.Diverter;
|
||||||
|
Scale = oriComponents.Scale;
|
||||||
|
Custom1 = oriComponents.Custom1;
|
||||||
|
Custom2 = oriComponents.Custom2;
|
||||||
|
Custom3 = oriComponents.Custom3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method to compare the content of two entities
|
/// Method to compare the content of two entities
|
||||||
|
|||||||
@@ -10,27 +10,26 @@ namespace Results.Entities
|
|||||||
public class MeterTestRslt
|
public class MeterTestRslt
|
||||||
{
|
{
|
||||||
public virtual int Id { get; protected set; }
|
public virtual int Id { get; protected set; }
|
||||||
public virtual byte CompoundMeterId { get; set; } /// 0=single, 1=compound/main, 2=compound/aux., 3=compound/overal, 4=heat meter volume, 5=heat meter energy
|
public virtual byte CompoundMeterId { get; set; } /// 0=single, 1=compound/main, 2=compound/aux., 3=compound/overal, 4=heat meter volume, 5=heat meter energy
|
||||||
public virtual int RegReaderType { get; set; } /// Not mapped to the DB, does not depend on localization and customer
|
public virtual int RegReaderType { get; set; } /// Not mapped to the DB, does not depend on localization and customer
|
||||||
|
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses
|
||||||
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses
|
public virtual double PulsesMaster { get; set; } /// # of reference flowmeter pulses (gated by this water meter pulses)
|
||||||
public virtual double PulsesMaster { get; set; } /// # of reference flowmeter pulses (gated by this water meter pulses)
|
|
||||||
public virtual double PulsesPerLiter { get; set; } /// [l ^ -1], in case of heat meters (CompoundMeterId==5) pulses per kWh in [kWh ^ -1]
|
public virtual double PulsesPerLiter { get; set; } /// [l ^ -1], in case of heat meters (CompoundMeterId==5) pulses per kWh in [kWh ^ -1]
|
||||||
public virtual double VolumeStart { get; set; } /// Volume or energy (CompoundMeterId==5) on test start in [l] or [J]
|
public virtual double VolumeStart { get; set; } /// Volume or energy (CompoundMeterId==5) on test start in [l] or [J]
|
||||||
public virtual double VolumeEnd { get; set; } /// Volume or energy (CompoundMeterId==5) on test end in [l] or [J]
|
public virtual double VolumeEnd { get; set; } /// Volume or energy (CompoundMeterId==5) on test end in [l] or [J]
|
||||||
public virtual double VolumeMeter { get; set; } /// Measured volume or energy (CompoundMeterId==5) in [l] or [J]
|
public virtual double VolumeMeter { get; set; } /// Measured volume or energy (CompoundMeterId==5) in [l] or [J]
|
||||||
public virtual double VolumeRef { get; set; } /// Reference volume or energy (CompoundMeterId==5) in [l] or [J]
|
public virtual double VolumeRef { get; set; } /// Reference volume or energy (CompoundMeterId==5) in [l] or [J]
|
||||||
public virtual double TimestampStart { get; set; } /// [s]
|
public virtual double TimestampStart { get; set; } /// [s]
|
||||||
public virtual double TimestampEnd { get; set; } /// [s]
|
public virtual double TimestampEnd { get; set; } /// [s]
|
||||||
public virtual double TestTime { get; set; } /// [s]
|
public virtual double TestTime { get; set; } /// [s]
|
||||||
|
|
||||||
/// Main result
|
/// Main result
|
||||||
public virtual double Error { get; set; } /// [%]
|
public virtual double Error { get; set; } /// [%]
|
||||||
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
|
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
|
||||||
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
|
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
|
||||||
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
|
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
|
||||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
public virtual double LastError { get; set; } /// [%] Previous test error at this Q in case Pruefindex > 1
|
public virtual double LastError { get; set; } /// [%] Previous test error at this Q in case Pruefindex > 1
|
||||||
#endif
|
#endif
|
||||||
@@ -38,10 +37,12 @@ namespace Results.Entities
|
|||||||
public virtual WaterMeter WaterMeter { get; set; } /// reference to the WaterMeter entity
|
public virtual WaterMeter WaterMeter { get; set; } /// reference to the WaterMeter entity
|
||||||
public virtual TestRslt TestRslt { get; set; } /// reference to the TestRslt entity
|
public virtual TestRslt TestRslt { get; set; } /// reference to the TestRslt entity
|
||||||
|
|
||||||
|
///
|
||||||
/// Wrappers
|
/// Wrappers
|
||||||
public virtual string Name() { return TestRslt.Name(); }
|
///
|
||||||
|
public virtual string Name() { return TestRslt.Name(); }
|
||||||
public virtual DateTime StartTime() { return TestRslt.StartTime; }
|
public virtual DateTime StartTime() { return TestRslt.StartTime; }
|
||||||
public virtual DateTime EndTime() { return TestRslt.EndTime; }
|
public virtual DateTime EndTime() { return TestRslt.EndTime; }
|
||||||
public virtual double FlowSetTime() { return TestRslt.FlowSetTime; } /// [s]
|
public virtual double FlowSetTime() { return TestRslt.FlowSetTime; } /// [s]
|
||||||
public virtual double FlowMass() { return TestRslt.FlowMass; } /// [kg/h]
|
public virtual double FlowMass() { return TestRslt.FlowMass; } /// [kg/h]
|
||||||
public virtual double FlowVolume() { return TestRslt.FlowVolume; } /// [m3/h]
|
public virtual double FlowVolume() { return TestRslt.FlowVolume; } /// [m3/h]
|
||||||
@@ -114,29 +115,60 @@ namespace Results.Entities
|
|||||||
CompoundMeterId = (byte)compoundMeterId;
|
CompoundMeterId = (byte)compoundMeterId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copy constructor, copies all except of Id
|
||||||
|
/// TestRslt and WaterMeter references arenot set.
|
||||||
|
/// They have to be copied/ser manually.
|
||||||
|
/// </summary>
|
||||||
|
public MeterTestRslt(MeterTestRslt oriMTR)
|
||||||
|
{
|
||||||
|
CompoundMeterId = oriMTR.CompoundMeterId;
|
||||||
|
RegReaderType = oriMTR.RegReaderType;
|
||||||
|
PulsesMeter = oriMTR.PulsesMeter;
|
||||||
|
PulsesMaster = oriMTR.PulsesMaster;
|
||||||
|
PulsesPerLiter = oriMTR.PulsesPerLiter;
|
||||||
|
VolumeStart = oriMTR.VolumeStart;
|
||||||
|
VolumeEnd = oriMTR.VolumeEnd;
|
||||||
|
VolumeMeter = oriMTR.VolumeMeter;
|
||||||
|
VolumeRef = oriMTR.VolumeRef;
|
||||||
|
TimestampStart = oriMTR.TimestampStart;
|
||||||
|
TimestampEnd = oriMTR.TimestampEnd;
|
||||||
|
TestTime = oriMTR.TestTime;
|
||||||
|
Error = oriMTR.Error;
|
||||||
|
ErrorIndicators = oriMTR.ErrorIndicators;
|
||||||
|
InfoIndicators = oriMTR.InfoIndicators;
|
||||||
|
KorrErrQ = oriMTR.KorrErrQ;
|
||||||
|
TestDone = oriMTR.TestDone;
|
||||||
|
Passed = oriMTR.Passed;
|
||||||
|
#if ORACLE_DB
|
||||||
|
LastError = oriMTR.LastError;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
public virtual void CopyContentFrom(MeterTestRslt src)
|
public virtual void CopyContentFrom(MeterTestRslt src)
|
||||||
{
|
{
|
||||||
if (src == null) return;
|
if (src == null) return;
|
||||||
|
|
||||||
CompoundMeterId = src.CompoundMeterId;
|
CompoundMeterId = src.CompoundMeterId;
|
||||||
RegReaderType = src.RegReaderType;
|
RegReaderType = src.RegReaderType;
|
||||||
PulsesMeter = src.PulsesMeter;
|
PulsesMeter = src.PulsesMeter;
|
||||||
PulsesMaster = src.PulsesMaster;
|
PulsesMaster = src.PulsesMaster;
|
||||||
PulsesPerLiter = src.PulsesPerLiter;
|
PulsesPerLiter = src.PulsesPerLiter;
|
||||||
VolumeStart = src.VolumeStart;
|
VolumeStart = src.VolumeStart;
|
||||||
VolumeEnd = src.VolumeEnd;
|
VolumeEnd = src.VolumeEnd;
|
||||||
VolumeMeter = src.VolumeMeter;
|
VolumeMeter = src.VolumeMeter;
|
||||||
VolumeRef = src.VolumeRef;
|
VolumeRef = src.VolumeRef;
|
||||||
TimestampStart = src.TimestampStart;
|
TimestampStart = src.TimestampStart;
|
||||||
TimestampEnd = src.TimestampEnd;
|
TimestampEnd = src.TimestampEnd;
|
||||||
TestTime = src.TestTime;
|
TestTime = src.TestTime;
|
||||||
Error = src.Error;
|
Error = src.Error;
|
||||||
ErrorIndicators = src.ErrorIndicators;
|
ErrorIndicators = src.ErrorIndicators;
|
||||||
KorrErrQ = src.KorrErrQ;
|
InfoIndicators = src.InfoIndicators;
|
||||||
TestDone = src.TestDone;
|
KorrErrQ = src.KorrErrQ;
|
||||||
Passed = src.Passed;
|
TestDone = src.TestDone;
|
||||||
|
Passed = src.Passed;
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
LastError = src.LastError;
|
LastError = src.LastError;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Config.Entities;
|
||||||
|
|
||||||
namespace Results.Entities
|
namespace Results.Entities
|
||||||
{
|
{
|
||||||
@@ -32,33 +33,59 @@ namespace Results.Entities
|
|||||||
public virtual bool Evaluate { get; set; }
|
public virtual bool Evaluate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public TestData()
|
/// <summary>
|
||||||
|
/// Default constructor, safe values
|
||||||
|
/// </summary>
|
||||||
|
public TestData()
|
||||||
{
|
{
|
||||||
Name = string.Empty;
|
Name = string.Empty;
|
||||||
Method = string.Empty;
|
Method = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestData(Config.Entities.Test test)
|
public TestData(Test test)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
Name = test.Name;
|
Name = test.Name;
|
||||||
Repeats = test.Repeats;
|
Repeats = test.Repeats;
|
||||||
Qtg = (double)test.Qtg;
|
Qtg = (double)test.Qtg;
|
||||||
Qfrom = (double)test.Qfrom;
|
Qfrom = (double)test.Qfrom;
|
||||||
Qto = (double)test.Qto;
|
Qto = (double)test.Qto;
|
||||||
TargetVolume = (double)test.Volume;
|
TargetVolume = (double)test.Volume;
|
||||||
TargetTime = (double)test.TstTime;
|
TargetTime = (double)test.TstTime;
|
||||||
Method = test.Method;
|
Method = test.Method;
|
||||||
ErrLimLo = (double)test.ErrLimLo;
|
ErrLimLo = (double)test.ErrLimLo;
|
||||||
ErrLimHi = (double)test.ErrLimHi;
|
ErrLimHi = (double)test.ErrLimHi;
|
||||||
ErrLimMargin = (double)test.Uncertainty;
|
ErrLimMargin = (double)test.Uncertainty;
|
||||||
DoControlWaterTemp = test.DoControlWaterTemp;
|
DoControlWaterTemp = test.DoControlWaterTemp;
|
||||||
TempLimLo = test.TempLimLo;
|
TempLimLo = test.TempLimLo;
|
||||||
TempLimHi = test.TempLimHi;
|
TempLimHi = test.TempLimHi;
|
||||||
Publish = test.Publish;
|
Publish = test.Publish;
|
||||||
Evaluate = test.DoEvaluate;
|
Evaluate = test.DoEvaluate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copy constructor, copies all except of Id
|
||||||
|
/// </summary>
|
||||||
|
public TestData(TestData oriTestData)
|
||||||
|
{
|
||||||
|
Name = oriTestData.Name;
|
||||||
|
Repeats = oriTestData.Repeats;
|
||||||
|
Qtg = oriTestData.Qtg;
|
||||||
|
Qfrom = oriTestData.Qfrom;
|
||||||
|
Qto = oriTestData.Qto;
|
||||||
|
TargetVolume = oriTestData.TargetVolume;
|
||||||
|
TargetTime = oriTestData.TargetTime;
|
||||||
|
Method = oriTestData.Method;
|
||||||
|
ErrLimLo = oriTestData.ErrLimLo;
|
||||||
|
ErrLimHi = oriTestData.ErrLimHi;
|
||||||
|
ErrLimMargin = oriTestData.ErrLimMargin;
|
||||||
|
DoControlWaterTemp = oriTestData.DoControlWaterTemp;
|
||||||
|
TempLimLo = oriTestData.TempLimLo;
|
||||||
|
TempLimHi = oriTestData.TempLimHi;
|
||||||
|
Publish = oriTestData.Publish;
|
||||||
|
Evaluate = oriTestData.Evaluate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method to compare the content of two entities
|
/// Method to compare the content of two entities
|
||||||
|
|||||||
+176
-164
@@ -11,138 +11,139 @@ namespace Results.Entities
|
|||||||
public class TestRslt
|
public class TestRslt
|
||||||
{
|
{
|
||||||
/// Identity
|
/// Identity
|
||||||
public virtual int Id { get; protected set; }
|
public virtual int Id { get; protected set; }
|
||||||
public virtual Batch Batch { get; set; }
|
public virtual Batch Batch { get; set; }
|
||||||
public virtual TestData TestData { get; set; }
|
public virtual TestData TestData { get; set; }
|
||||||
public virtual Components Components { get; set; }
|
public virtual Components Components { get; set; }
|
||||||
public virtual int Part { get; set; }
|
|
||||||
public virtual int RepetitionNr { get; set; } /// Repetition number from the set of repeated tests (1...)
|
public virtual int Part { get; set; }
|
||||||
public virtual string MethodClass { get; set; } /// Not mapped to DB, does not depend on localization and customer
|
public virtual int RepetitionNr { get; set; } /// Repetition number from the set of repeated tests (1...)
|
||||||
|
public virtual string MethodClass { get; set; } /// Not mapped to DB, does not depend on localization and customer
|
||||||
|
|
||||||
/// Main results
|
/// Main results
|
||||||
public virtual bool TestDone { get; set; }
|
public virtual bool TestDone { get; set; }
|
||||||
public virtual string Remark { get; set; }
|
public virtual string Remark { get; set; }
|
||||||
public virtual DateTime StartTime { get; set; } /// Date and time of the test start
|
public virtual DateTime StartTime { get; set; } /// Date and time of the test start
|
||||||
public virtual DateTime EndTime { get; set; } /// Date and time of the test end
|
public virtual DateTime EndTime { get; set; } /// Date and time of the test end
|
||||||
public virtual int FlowSetTime { get; set; } /// [s] Flow set time in seconds
|
public virtual int FlowSetTime { get; set; } /// [s] Flow set time in seconds
|
||||||
public virtual int TimeBtwnMassMsrmnts { get; set; } /// [s] Time between two mass measurements in seconds (if applicable)
|
public virtual int TimeBtwnMassMsrmnts { get; set; } /// [s] Time between two mass measurements in seconds (if applicable)
|
||||||
public virtual double TestTime { get; set; } /// [s] Test time in seconds
|
public virtual double TestTime { get; set; } /// [s] Test time in seconds
|
||||||
public virtual double TestTimeCorrection { get; set; } /// [s] Correction of the test time due to diverter (0 for methods w/o diverter or when there is no correction table)
|
public virtual double TestTimeCorrection { get; set; } /// [s] Correction of the test time due to diverter (0 for methods w/o diverter or when there is no correction table)
|
||||||
public virtual double PulsesMaster { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the water to the tank
|
public virtual double PulsesMaster { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the water to the tank
|
||||||
public virtual double TotalPulsesMstr { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the complete test (not mapped to DB)
|
public virtual double TotalPulsesMstr { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the complete test (not mapped to DB)
|
||||||
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
|
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
|
||||||
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
|
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
|
||||||
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
|
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
|
||||||
/// When mass measurement is not available, corrected by a correction table.
|
/// When mass measurement is not available, corrected by a correction table.
|
||||||
public virtual double MassStartRaw { get; set; } /// [kg]
|
public virtual double MassStartRaw { get; set; } /// [kg]
|
||||||
public virtual double MassStart { get; set; } /// [kg]
|
public virtual double MassStart { get; set; } /// [kg]
|
||||||
public virtual double MassEndRaw { get; set; } /// [kg]
|
public virtual double MassEndRaw { get; set; } /// [kg]
|
||||||
public virtual double MassEnd { get; set; } /// [kg]
|
public virtual double MassEnd { get; set; } /// [kg]
|
||||||
public virtual double DensityIn { get; set; } /// [kg/m3]
|
public virtual double DensityIn { get; set; } /// [kg/m3]
|
||||||
public virtual double DensityLine { get; set; } /// [kg/m3]
|
public virtual double DensityLine { get; set; } /// [kg/m3]
|
||||||
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
||||||
public virtual double MassOfEvapWater { get; set; } /// [kg]
|
public virtual double MassOfEvapWater { get; set; } /// [kg]
|
||||||
public virtual double FlowMass { get; set; } /// [kg/h] calculated from conventional true value
|
public virtual double FlowMass { get; set; } /// [kg/h] calculated from conventional true value
|
||||||
public virtual double FlowVolume { get; set; } /// [m3/h]
|
public virtual double FlowVolume { get; set; } /// [m3/h]
|
||||||
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
||||||
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
||||||
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
|
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
|
||||||
|
|
||||||
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
|
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
|
||||||
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
||||||
public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
||||||
public virtual float DivStart90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
public virtual float DivStart90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
||||||
|
|
||||||
public virtual float DiverterEnd { get; set; } /// [s] Diverter switch time when test ends
|
public virtual float DiverterEnd { get; set; } /// [s] Diverter switch time when test ends
|
||||||
public virtual float DivEnd90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
public virtual float DivEnd90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
|
||||||
public virtual float DivEnd50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
public virtual float DivEnd50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
|
||||||
public virtual float DivEnd10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
public virtual float DivEnd10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
|
||||||
|
|
||||||
public virtual long ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
public virtual long ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
||||||
public virtual long InfoFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
public virtual long InfoFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
|
||||||
|
|
||||||
/// Main results of heat meters
|
/// Main results of heat meters
|
||||||
public virtual double RefEnergy { get; set; } /// [J] Joul
|
public virtual double RefEnergy { get; set; } /// [J] Joul
|
||||||
|
|
||||||
/// Auxiliary results
|
/// Auxiliary results
|
||||||
public virtual float AmbTempMean { get; set; } /// [°C] Average ambient air temperature
|
public virtual float AmbTempMean { get; set; } /// [°C] Average ambient air temperature
|
||||||
public virtual float AmbTempStart { get; set; } /// [°C] Ambient air temperature on test start
|
public virtual float AmbTempStart { get; set; } /// [°C] Ambient air temperature on test start
|
||||||
public virtual float AmbTempEnd { get; set; } /// [°C] Ambient air temperature on test end
|
public virtual float AmbTempEnd { get; set; } /// [°C] Ambient air temperature on test end
|
||||||
public virtual float AmbTempMin { get; set; } /// [°C] Minimum ambient air temperature
|
public virtual float AmbTempMin { get; set; } /// [°C] Minimum ambient air temperature
|
||||||
public virtual float AmbTempMax { get; set; } /// [°C] Maximum ambient air temperature
|
public virtual float AmbTempMax { get; set; } /// [°C] Maximum ambient air temperature
|
||||||
public virtual float AmbPressMean { get; set; } /// [bar] Average ambient air pressure
|
public virtual float AmbPressMean { get; set; } /// [bar] Average ambient air pressure
|
||||||
public virtual float AmbPressStart { get; set; } /// [bar] Ambient air pressure on test start
|
public virtual float AmbPressStart { get; set; } /// [bar] Ambient air pressure on test start
|
||||||
public virtual float AmbPressEnd { get; set; } /// [bar] Ambient air pressure on test end
|
public virtual float AmbPressEnd { get; set; } /// [bar] Ambient air pressure on test end
|
||||||
public virtual float AmbPressMin { get; set; } /// [bar] Minimum ambient air pressure
|
public virtual float AmbPressMin { get; set; } /// [bar] Minimum ambient air pressure
|
||||||
public virtual float AmbPressMax { get; set; } /// [bar] Maximum ambient air pressure
|
public virtual float AmbPressMax { get; set; } /// [bar] Maximum ambient air pressure
|
||||||
public virtual float AmbHumiMean { get; set; } /// [%] Average ambient air relative humidity
|
public virtual float AmbHumiMean { get; set; } /// [%] Average ambient air relative humidity
|
||||||
public virtual float AmbHumiStart { get; set; } /// [%] Ambient air relative humidity on test start
|
public virtual float AmbHumiStart { get; set; } /// [%] Ambient air relative humidity on test start
|
||||||
public virtual float AmbHumiEnd { get; set; } /// [%] Ambient air relative humidity on test end
|
public virtual float AmbHumiEnd { get; set; } /// [%] Ambient air relative humidity on test end
|
||||||
public virtual float AmbHumiMin { get; set; } /// [%] Minimum ambient air relative humidity
|
public virtual float AmbHumiMin { get; set; } /// [%] Minimum ambient air relative humidity
|
||||||
public virtual float AmbHumiMax { get; set; } /// [%] Maximum ambient air relative humidity
|
public virtual float AmbHumiMax { get; set; } /// [%] Maximum ambient air relative humidity
|
||||||
public virtual float PressUpMean { get; set; } /// [bar] Input water pressure (average)
|
public virtual float PressUpMean { get; set; } /// [bar] Input water pressure (average)
|
||||||
public virtual float PressUpStart { get; set; } /// [bar]
|
public virtual float PressUpStart { get; set; } /// [bar]
|
||||||
public virtual float PressUpEnd { get; set; } /// [bar]
|
public virtual float PressUpEnd { get; set; } /// [bar]
|
||||||
public virtual float PressUpMin { get; set; } /// [bar]
|
public virtual float PressUpMin { get; set; } /// [bar]
|
||||||
public virtual float PressUpMax { get; set; } /// [bar]
|
public virtual float PressUpMax { get; set; } /// [bar]
|
||||||
public virtual float PressDownMean { get; set; } /// [bar]
|
public virtual float PressDownMean { get; set; } /// [bar]
|
||||||
public virtual float PressDownStart { get; set; } /// [bar]
|
public virtual float PressDownStart { get; set; } /// [bar]
|
||||||
public virtual float PressDownEnd { get; set; } /// [bar]
|
public virtual float PressDownEnd { get; set; } /// [bar]
|
||||||
public virtual float PressDownMin { get; set; } /// [bar]
|
public virtual float PressDownMin { get; set; } /// [bar]
|
||||||
public virtual float PressDownMax { get; set; } /// [bar]
|
public virtual float PressDownMax { get; set; } /// [bar]
|
||||||
public virtual float PressDeltaMean { get; set; } /// [bar]
|
public virtual float PressDeltaMean { get; set; } /// [bar]
|
||||||
public virtual float PressDeltaStart { get; set; } /// [bar]
|
public virtual float PressDeltaStart { get; set; } /// [bar]
|
||||||
public virtual float PressDeltaEnd { get; set; } /// [bar]
|
public virtual float PressDeltaEnd { get; set; } /// [bar]
|
||||||
public virtual float PressDeltaMin { get; set; } /// [bar]
|
public virtual float PressDeltaMin { get; set; } /// [bar]
|
||||||
public virtual float PressDeltaMax { get; set; } /// [bar]
|
public virtual float PressDeltaMax { get; set; } /// [bar]
|
||||||
public virtual float TempUpMean { get; set; } /// [°C]
|
public virtual float TempUpMean { get; set; } /// [°C]
|
||||||
public virtual float TempUpStart { get; set; } /// [°C]
|
public virtual float TempUpStart { get; set; } /// [°C]
|
||||||
public virtual float TempUpEnd { get; set; } /// [°C]
|
public virtual float TempUpEnd { get; set; } /// [°C]
|
||||||
public virtual float TempUpMin { get; set; } /// [°C]
|
public virtual float TempUpMin { get; set; } /// [°C]
|
||||||
public virtual float TempUpMax { get; set; } /// [°C]
|
public virtual float TempUpMax { get; set; } /// [°C]
|
||||||
public virtual float TempDownMean { get; set; } /// [°C]
|
public virtual float TempDownMean { get; set; } /// [°C]
|
||||||
public virtual float TempDownStart { get; set; } /// [°C]
|
public virtual float TempDownStart { get; set; } /// [°C]
|
||||||
public virtual float TempDownEnd { get; set; } /// [°C]
|
public virtual float TempDownEnd { get; set; } /// [°C]
|
||||||
public virtual float TempDownMin { get; set; } /// [°C]
|
public virtual float TempDownMin { get; set; } /// [°C]
|
||||||
public virtual float TempDownMax { get; set; } /// [°C]
|
public virtual float TempDownMax { get; set; } /// [°C]
|
||||||
public virtual float TempDivMean { get; set; } /// [°C]
|
public virtual float TempDivMean { get; set; } /// [°C]
|
||||||
public virtual float TempDivStart { get; set; } /// [°C]
|
public virtual float TempDivStart { get; set; } /// [°C]
|
||||||
public virtual float TempDivEnd { get; set; } /// [°C]
|
public virtual float TempDivEnd { get; set; } /// [°C]
|
||||||
public virtual float TempDivMin { get; set; } /// [°C]
|
public virtual float TempDivMin { get; set; } /// [°C]
|
||||||
public virtual float TempDivMax { get; set; } /// [°C]
|
public virtual float TempDivMax { get; set; } /// [°C]
|
||||||
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
|
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
|
||||||
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
|
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
|
||||||
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
|
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
|
||||||
public virtual float FlowMin { get; set; } /// [m3/h]
|
public virtual float FlowMin { get; set; } /// [m3/h]
|
||||||
public virtual float FlowMax { get; set; } /// [m3/h]
|
public virtual float FlowMax { get; set; } /// [m3/h]
|
||||||
public virtual float ConductMean { get; set; } /// [uS/cm]
|
public virtual float ConductMean { get; set; } /// [uS/cm]
|
||||||
public virtual float ConductStart { get; set; } /// [uS/cm]
|
public virtual float ConductStart { get; set; } /// [uS/cm]
|
||||||
public virtual float ConductEnd { get; set; } /// [uS/cm]
|
public virtual float ConductEnd { get; set; } /// [uS/cm]
|
||||||
public virtual float ConductMin { get; set; } /// [uS/cm]
|
public virtual float ConductMin { get; set; } /// [uS/cm]
|
||||||
public virtual float ConductMax { get; set; } /// [uS/cm]
|
public virtual float ConductMax { get; set; } /// [uS/cm]
|
||||||
|
|
||||||
public virtual float Uncertnt { get; set; } /// [%] Relative error uncertainty
|
public virtual float Uncertnt { get; set; } /// [%] Relative error uncertainty
|
||||||
public virtual float UncertntScale { get; set; } /// [%] Contribution to uncertainty from scale
|
public virtual float UncertntScale { get; set; } /// [%] Contribution to uncertainty from scale
|
||||||
public virtual float UncertntDensity { get; set; } /// [%] Contribution to uncertainty from density
|
public virtual float UncertntDensity { get; set; } /// [%] Contribution to uncertainty from density
|
||||||
public virtual float UncertntTemp { get; set; } /// [%] Contribution to uncertainty from temperature
|
public virtual float UncertntTemp { get; set; } /// [%] Contribution to uncertainty from temperature
|
||||||
public virtual float UncertntPressure { get; set; } /// [%] Contribution to uncertainty from pressure
|
public virtual float UncertntPressure { get; set; } /// [%] Contribution to uncertainty from pressure
|
||||||
|
|
||||||
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
|
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
|
||||||
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
|
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
|
||||||
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
|
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
|
||||||
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
|
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
|
||||||
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
|
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
|
||||||
public virtual float Custom6 { get; set; } /// [°C] T ref lo mean
|
public virtual float Custom6 { get; set; } /// [°C] T ref lo mean
|
||||||
public virtual float Custom7 { get; set; } /// [°C] T ref lo start
|
public virtual float Custom7 { get; set; } /// [°C] T ref lo start
|
||||||
public virtual float Custom8 { get; set; } /// [°C] T ref lo end
|
public virtual float Custom8 { get; set; } /// [°C] T ref lo end
|
||||||
public virtual float Custom9 { get; set; } /// [°C] T ref lo min
|
public virtual float Custom9 { get; set; } /// [°C] T ref lo min
|
||||||
public virtual float Custom10 { get; set; } /// [°C] T ref lo max
|
public virtual float Custom10 { get; set; } /// [°C] T ref lo max
|
||||||
|
|
||||||
public virtual int Counter1 { get; set; }
|
public virtual int Counter1 { get; set; }
|
||||||
public virtual int Counter2 { get; set; }
|
public virtual int Counter2 { get; set; }
|
||||||
public virtual int Counter3 { get; set; }
|
public virtual int Counter3 { get; set; }
|
||||||
public virtual int Counter4 { get; set; }
|
public virtual int Counter4 { get; set; }
|
||||||
public virtual int Counter5 { get; set; }
|
public virtual int Counter5 { get; set; }
|
||||||
|
|
||||||
/// Wrappers
|
/// Wrappers
|
||||||
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
||||||
@@ -246,46 +247,51 @@ namespace Results.Entities
|
|||||||
{
|
{
|
||||||
if (src == null) return;
|
if (src == null) return;
|
||||||
|
|
||||||
Components = src.Components; /// ???
|
Components = src.Components; /// ???
|
||||||
Part = src.Part;
|
|
||||||
RepetitionNr = src.RepetitionNr;
|
Part = src.Part;
|
||||||
MethodClass = src.MethodClass;
|
RepetitionNr = src.RepetitionNr;
|
||||||
TestDone = src.TestDone;
|
MethodClass = src.MethodClass;
|
||||||
Remark = src.Remark;
|
TestDone = src.TestDone;
|
||||||
StartTime = src.StartTime;
|
Remark = src.Remark;
|
||||||
EndTime = src.EndTime;
|
StartTime = src.StartTime;
|
||||||
FlowSetTime = src.FlowSetTime;
|
EndTime = src.EndTime;
|
||||||
|
FlowSetTime = src.FlowSetTime;
|
||||||
TimeBtwnMassMsrmnts = src.TimeBtwnMassMsrmnts;
|
TimeBtwnMassMsrmnts = src.TimeBtwnMassMsrmnts;
|
||||||
TestTime = src.TestTime;
|
TestTime = src.TestTime;
|
||||||
PulsesMaster = src.PulsesMaster;
|
TestTimeCorrection = src.TestTimeCorrection;
|
||||||
TotalPulsesMstr = src.TotalPulsesMstr;
|
PulsesMaster = src.PulsesMaster;
|
||||||
ConstMasterRaw = src.ConstMasterRaw;
|
TotalPulsesMstr = src.TotalPulsesMstr;
|
||||||
ConstMasterCorr = src.ConstMasterCorr;
|
ConstMasterRaw = src.ConstMasterRaw;
|
||||||
ConstMaster = src.ConstMaster;
|
ConstMasterCorr = src.ConstMasterCorr;
|
||||||
MassStartRaw = src.MassStartRaw;
|
ConstMaster = src.ConstMaster;
|
||||||
MassStart = src.MassStart;
|
MassStartRaw = src.MassStartRaw;
|
||||||
MassEndRaw = src.MassEndRaw;
|
MassStart = src.MassStart;
|
||||||
MassEnd = src.MassEnd;
|
MassEndRaw = src.MassEndRaw;
|
||||||
DensityIn = src.DensityIn;
|
MassEnd = src.MassEnd;
|
||||||
DensityLine = src.DensityLine;
|
DensityIn = src.DensityIn;
|
||||||
DensityDiv = src.DensityDiv;
|
DensityLine = src.DensityLine;
|
||||||
MassOfEvapWater = src.MassOfEvapWater;
|
DensityDiv = src.DensityDiv;
|
||||||
FlowMass = src.FlowMass;
|
MassOfEvapWater = src.MassOfEvapWater;
|
||||||
FlowVolume = src.FlowVolume;
|
FlowMass = src.FlowMass;
|
||||||
VolumeCTV = src.VolumeCTV;
|
FlowVolume = src.FlowVolume;
|
||||||
VolumeMaster = src.VolumeMaster;
|
VolumeCTV = src.VolumeCTV;
|
||||||
ErrorMaster = src.ErrorMaster;
|
VolumeMaster = src.VolumeMaster;
|
||||||
|
ErrorMaster = src.ErrorMaster;
|
||||||
|
|
||||||
DiverterStart = src.DiverterStart;
|
DiverterStart = src.DiverterStart;
|
||||||
DivStart10 = src.DivStart10;
|
DivStart10 = src.DivStart10;
|
||||||
DivStart50 = src.DivStart50;
|
DivStart50 = src.DivStart50;
|
||||||
DivStart90 = src.DivStart90;
|
DivStart90 = src.DivStart90;
|
||||||
DiverterEnd = src.DiverterEnd;
|
DiverterEnd = src.DiverterEnd;
|
||||||
DivEnd10 = src.DivEnd10;
|
DivEnd10 = src.DivEnd10;
|
||||||
DivEnd50 = src.DivEnd50;
|
DivEnd50 = src.DivEnd50;
|
||||||
DivEnd90 = src.DivEnd90;
|
DivEnd90 = src.DivEnd90;
|
||||||
|
|
||||||
ErrorFlags = src.ErrorFlags;
|
ErrorFlags = src.ErrorFlags;
|
||||||
InfoFlags = src.InfoFlags;
|
InfoFlags = src.InfoFlags;
|
||||||
RefEnergy = src.RefEnergy;
|
RefEnergy = src.RefEnergy;
|
||||||
|
|
||||||
AmbTempMean = src.AmbTempMean;
|
AmbTempMean = src.AmbTempMean;
|
||||||
AmbTempStart = src.AmbTempStart;
|
AmbTempStart = src.AmbTempStart;
|
||||||
AmbTempEnd = src.AmbTempEnd;
|
AmbTempEnd = src.AmbTempEnd;
|
||||||
@@ -342,15 +348,21 @@ namespace Results.Entities
|
|||||||
ConductMin = src.ConductMin;
|
ConductMin = src.ConductMin;
|
||||||
ConductMax = src.ConductMax;
|
ConductMax = src.ConductMax;
|
||||||
|
|
||||||
Custom1 = src.Custom1;
|
Uncertnt = src.Uncertnt;
|
||||||
Custom2 = src.Custom2;
|
UncertntScale = src.UncertntScale;
|
||||||
Custom3 = src.Custom3;
|
UncertntDensity = src.UncertntDensity;
|
||||||
Custom4 = src.Custom4;
|
UncertntTemp = src.UncertntTemp;
|
||||||
Custom5 = src.Custom5;
|
UncertntPressure = src.UncertntPressure;
|
||||||
Custom6 = src.Custom6;
|
|
||||||
Custom7 = src.Custom7;
|
Custom1 = src.Custom1;
|
||||||
Custom8 = src.Custom8;
|
Custom2 = src.Custom2;
|
||||||
Custom9 = src.Custom9;
|
Custom3 = src.Custom3;
|
||||||
|
Custom4 = src.Custom4;
|
||||||
|
Custom5 = src.Custom5;
|
||||||
|
Custom6 = src.Custom6;
|
||||||
|
Custom7 = src.Custom7;
|
||||||
|
Custom8 = src.Custom8;
|
||||||
|
Custom9 = src.Custom9;
|
||||||
Custom10 = src.Custom10;
|
Custom10 = src.Custom10;
|
||||||
|
|
||||||
Counter1 = src.Counter1;
|
Counter1 = src.Counter1;
|
||||||
|
|||||||
@@ -459,33 +459,34 @@ namespace Results.Entities
|
|||||||
{
|
{
|
||||||
if (src == null) return;
|
if (src == null) return;
|
||||||
|
|
||||||
SerialNr = src.SerialNr;
|
SerialNr = src.SerialNr;
|
||||||
SerialNrAux = src.SerialNrAux;
|
SerialNrAux = src.SerialNrAux;
|
||||||
PurchaseOrder = src.PurchaseOrder;
|
PurchaseOrder = src.PurchaseOrder;
|
||||||
YearOfProduction = src.YearOfProduction;
|
YearOfProduction = src.YearOfProduction;
|
||||||
// WMPosition skipped
|
WMPosition = src.WMPosition;
|
||||||
EndState = src.EndState;
|
EndState = src.EndState;
|
||||||
EndStateAux = src.EndStateAux;
|
EndStateAux = src.EndStateAux;
|
||||||
QRise = src.QRise;
|
QRise = src.QRise;
|
||||||
QFall = src.QFall;
|
QFall = src.QFall;
|
||||||
ErrorFlags = src.ErrorFlags;
|
ErrorFlags = src.ErrorFlags;
|
||||||
Passed = src.Passed;
|
InfoFlags = src.InfoFlags;
|
||||||
ResultCode = src.ResultCode;
|
Passed = src.Passed;
|
||||||
ArchivePath = src.ArchivePath;
|
ResultCode = src.ResultCode;
|
||||||
Remark = src.Remark;
|
ArchivePath = src.ArchivePath;
|
||||||
|
Remark = src.Remark;
|
||||||
#if IPERL
|
#if IPERL
|
||||||
OrigCalibFactor = src.OrigCalibFactor;
|
OrigCalibFactor = src.OrigCalibFactor;
|
||||||
CalibFactor = src.CalibFactor;
|
CalibFactor = src.CalibFactor;
|
||||||
OrigCalibFactorLNA = src.OrigCalibFactorLNA;
|
OrigCalibFactorLNA = src.OrigCalibFactorLNA;
|
||||||
CalibFactorLNA = src.CalibFactorLNA;
|
CalibFactorLNA = src.CalibFactorLNA;
|
||||||
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
|
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
|
||||||
Q2CorrRL = src.Q2CorrRL;
|
Q2CorrRL = src.Q2CorrRL;
|
||||||
Q2CorrLR = src.Q2CorrLR;
|
Q2CorrLR = src.Q2CorrLR;
|
||||||
Q2CorrFlowRight = src.Q2CorrFlowRight;
|
Q2CorrFlowRight = src.Q2CorrFlowRight;
|
||||||
Diff2Hz8Hz = src.Diff2Hz8Hz;
|
Diff2Hz8Hz = src.Diff2Hz8Hz;
|
||||||
Hz2CorrectionDone = src.Hz2CorrectionDone;
|
Hz2CorrectionDone = src.Hz2CorrectionDone;
|
||||||
Hz2Correction = src.Hz2Correction;
|
Hz2Correction = src.Hz2Correction;
|
||||||
FWVersion = src.FWVersion;
|
FWVersion = src.FWVersion;
|
||||||
#endif
|
#endif
|
||||||
#if TURA_SPECIAL
|
#if TURA_SPECIAL
|
||||||
RadioAddress = src.RadioAddress;
|
RadioAddress = src.RadioAddress;
|
||||||
@@ -501,19 +502,19 @@ namespace Results.Entities
|
|||||||
ProdQ2CorrLR = src.ProdQ2CorrLR;
|
ProdQ2CorrLR = src.ProdQ2CorrLR;
|
||||||
#endif
|
#endif
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
AssignedSerialNr = src.AssignedSerialNr;
|
AssignedSerialNr = src.AssignedSerialNr;
|
||||||
Prefix = src.Prefix;
|
Prefix = src.Prefix;
|
||||||
Suffix = src.Suffix;
|
Suffix = src.Suffix;
|
||||||
CompleteSerialNr = src.CompleteSerialNr;
|
CompleteSerialNr = src.CompleteSerialNr;
|
||||||
WMTypeRevision = src.WMTypeRevision;
|
WMTypeRevision = src.WMTypeRevision;
|
||||||
Pruefindex = src.Pruefindex;
|
Pruefindex = src.Pruefindex;
|
||||||
HydrPruefung = src.HydrPruefung;
|
HydrPruefung = src.HydrPruefung;
|
||||||
RawTestInfos = src.RawTestInfos;
|
RawTestInfos = src.RawTestInfos; /// Not mapped to DB
|
||||||
CompleteTestInfos = src.CompleteTestInfos;
|
CompleteTestInfos = src.CompleteTestInfos; /// Not mapped to DB
|
||||||
#endif
|
#endif
|
||||||
ProcessId = src.ProcessId;
|
ProcessId = src.ProcessId; /// Not mapped to DB
|
||||||
SessionId = src.SessionId;
|
SessionId = src.SessionId; /// Not mapped to DB
|
||||||
LastRecordIsNok = src.LastRecordIsNok;
|
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
|
||||||
|
|
||||||
foreach (var mtr in MeterTestRslts)
|
foreach (var mtr in MeterTestRslts)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,61 +5,97 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Config.Entities;
|
||||||
|
|
||||||
namespace Results.Entities
|
namespace Results.Entities
|
||||||
{
|
{
|
||||||
public class WaterMeterData
|
public class WaterMeterData
|
||||||
{
|
{
|
||||||
public virtual int Id { get; protected set; }
|
public virtual int Id { get; protected set; }
|
||||||
public virtual string ProductName { get; set; }
|
public virtual string ProductName { get; set; }
|
||||||
public virtual string Producer { get; set; }
|
public virtual string Producer { get; set; }
|
||||||
|
public virtual double DN { get; set; } /// [mm]
|
||||||
public virtual double DN { get; set; } /// [mm]
|
public virtual double L { get; set; } /// [mm]
|
||||||
public virtual double L { get; set; } /// [mm]
|
public virtual Mounting Mounting { get; set; } /// H / V / S / F
|
||||||
public virtual Config.Entities.Mounting Mounting { get; set; } /// H / V / S / F
|
public virtual bool NewQnames { get; set; } /// Yes = Q3... No = Qn...
|
||||||
|
public virtual double Q4_Qmax { get; set; } /// [m3/h]
|
||||||
public virtual bool NewQnames { get; set; } /// Yes = Q3... No = Qn...
|
public virtual double Q3_Qn { get; set; } /// [m3/h]
|
||||||
public virtual double Q4_Qmax { get; set; } /// [m3/h]
|
public virtual double Q2_Qt { get; set; } /// [m3/h]
|
||||||
public virtual double Q3_Qn { get; set; } /// [m3/h]
|
public virtual double Q1_Qmin { get; set; } /// [m3/h]
|
||||||
public virtual double Q2_Qt { get; set; } /// [m3/h]
|
public virtual string MetrologicalClass { get; set; }
|
||||||
public virtual double Q1_Qmin { get; set; } /// [m3/h]
|
public virtual TemperatureClass TemperatureClass { get; set; }
|
||||||
|
public virtual PressureLossClass PressureLossClass { get; set; }
|
||||||
public virtual string MetrologicalClass { get; set; }
|
public virtual MaxAdmissiblePressure MaxAdmissiblePressure { get; set; }
|
||||||
public virtual Config.Entities.TemperatureClass TemperatureClass { get; set; }
|
public virtual FlowProfileSensitivityClass FlowProfileSensitivityClass { get; set; }
|
||||||
public virtual Config.Entities.PressureLossClass PressureLossClass { get; set; }
|
public virtual string ApprovalInfo { get; set; }
|
||||||
public virtual Config.Entities.MaxAdmissiblePressure MaxAdmissiblePressure { get; set; }
|
public virtual string Certificate { get; set; }
|
||||||
public virtual Config.Entities.FlowProfileSensitivityClass FlowProfileSensitivityClass { get; set; }
|
public virtual double PulsesPerLtr { get; set; }
|
||||||
|
|
||||||
public virtual string ApprovalInfo { get; set; }
|
|
||||||
public virtual string Certificate { get; set; }
|
|
||||||
|
|
||||||
public virtual double PulsesPerLtr { get; set; }
|
|
||||||
|
|
||||||
/// Concerns compound water meters
|
/// Concerns compound water meters
|
||||||
public virtual string ProducerAux { get; set; }
|
public virtual string ProducerAux { get; set; }
|
||||||
public virtual double Q3_Qn_Aux { get; set; } /// [m3/h]
|
public virtual double Q3_Qn_Aux { get; set; } /// [m3/h]
|
||||||
public virtual string MetrologicalClassAux { get; set; }
|
public virtual string MetrologicalClassAux { get; set; }
|
||||||
public virtual string ApprovalInfoAux { get; set; }
|
public virtual string ApprovalInfoAux { get; set; }
|
||||||
|
|
||||||
public virtual Config.Entities.Medium Medium { get; set; }
|
|
||||||
|
|
||||||
public virtual string Text1 { get; set; }
|
|
||||||
public virtual string Text2 { get; set; }
|
|
||||||
public virtual string Text3 { get; set; }
|
|
||||||
public virtual string Text4 { get; set; }
|
|
||||||
public virtual string Text5 { get; set; }
|
|
||||||
|
|
||||||
public virtual bool Compound { get; set; }
|
|
||||||
public virtual bool HeatMeter { get; set; }
|
|
||||||
|
|
||||||
|
public virtual Medium Medium { get; set; }
|
||||||
|
public virtual string Text1 { get; set; }
|
||||||
|
public virtual string Text2 { get; set; }
|
||||||
|
public virtual string Text3 { get; set; }
|
||||||
|
public virtual string Text4 { get; set; }
|
||||||
|
public virtual string Text5 { get; set; }
|
||||||
|
public virtual bool Compound { get; set; }
|
||||||
|
public virtual bool HeatMeter { get; set; }
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
public virtual int WMTypeId { get; set; }
|
public virtual int WMTypeId { get; set; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Default constructor, safe values
|
||||||
|
/// </summary>
|
||||||
public WaterMeterData()
|
public WaterMeterData()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copy constructor, copies all except of Id
|
||||||
|
/// </summary>
|
||||||
|
public WaterMeterData(WaterMeterData oriWMData)
|
||||||
|
{
|
||||||
|
ProductName = oriWMData.ProductName;
|
||||||
|
Producer = oriWMData.Producer;
|
||||||
|
DN = oriWMData.DN;
|
||||||
|
L = oriWMData.L;
|
||||||
|
Mounting = oriWMData.Mounting;
|
||||||
|
NewQnames = oriWMData.NewQnames;
|
||||||
|
Q4_Qmax = oriWMData.Q4_Qmax;
|
||||||
|
Q3_Qn = oriWMData.Q3_Qn;
|
||||||
|
Q2_Qt = oriWMData.Q2_Qt;
|
||||||
|
Q1_Qmin = oriWMData.Q1_Qmin;
|
||||||
|
MetrologicalClass = oriWMData.MetrologicalClass;
|
||||||
|
TemperatureClass = oriWMData.TemperatureClass;
|
||||||
|
PressureLossClass = oriWMData.PressureLossClass;
|
||||||
|
MaxAdmissiblePressure = oriWMData.MaxAdmissiblePressure;
|
||||||
|
FlowProfileSensitivityClass = oriWMData.FlowProfileSensitivityClass;
|
||||||
|
ApprovalInfo = oriWMData.ApprovalInfo;
|
||||||
|
Certificate = oriWMData.Certificate;
|
||||||
|
PulsesPerLtr = oriWMData.PulsesPerLtr;
|
||||||
|
ProducerAux = oriWMData.ProducerAux;
|
||||||
|
Q3_Qn_Aux = oriWMData.Q3_Qn_Aux;
|
||||||
|
MetrologicalClassAux = oriWMData.MetrologicalClassAux;
|
||||||
|
ApprovalInfoAux = oriWMData.ApprovalInfoAux;
|
||||||
|
Medium = oriWMData.Medium;
|
||||||
|
Text1 = oriWMData.Text1;
|
||||||
|
Text2 = oriWMData.Text2;
|
||||||
|
Text3 = oriWMData.Text3;
|
||||||
|
Text4 = oriWMData.Text4;
|
||||||
|
Text5 = oriWMData.Text5;
|
||||||
|
Compound = oriWMData.Compound;
|
||||||
|
HeatMeter = oriWMData.HeatMeter;
|
||||||
|
#if ORACLE_DB
|
||||||
|
WMTypeId = oriWMData.WMTypeId;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method to compare the content of two entities
|
/// Method to compare the content of two entities
|
||||||
@@ -70,44 +106,34 @@ namespace Results.Entities
|
|||||||
{
|
{
|
||||||
if (ProductName != wmd.ProductName) return false;
|
if (ProductName != wmd.ProductName) return false;
|
||||||
if (Producer != wmd.Producer) return false;
|
if (Producer != wmd.Producer) return false;
|
||||||
|
|
||||||
if (DN != wmd.DN) return false;
|
if (DN != wmd.DN) return false;
|
||||||
if (L != wmd.L) return false;
|
if (L != wmd.L) return false;
|
||||||
if (Mounting != wmd.Mounting) return false;
|
if (Mounting != wmd.Mounting) return false;
|
||||||
|
|
||||||
if (NewQnames != wmd.NewQnames) return false;
|
if (NewQnames != wmd.NewQnames) return false;
|
||||||
if (Q4_Qmax != wmd.Q4_Qmax) return false;
|
if (Q4_Qmax != wmd.Q4_Qmax) return false;
|
||||||
if (Q3_Qn != wmd.Q3_Qn) return false;
|
if (Q3_Qn != wmd.Q3_Qn) return false;
|
||||||
if (Q2_Qt != wmd.Q2_Qt) return false;
|
if (Q2_Qt != wmd.Q2_Qt) return false;
|
||||||
if (Q1_Qmin != wmd.Q1_Qmin) return false;
|
if (Q1_Qmin != wmd.Q1_Qmin) return false;
|
||||||
|
|
||||||
if (MetrologicalClass != wmd.MetrologicalClass) return false;
|
if (MetrologicalClass != wmd.MetrologicalClass) return false;
|
||||||
if (TemperatureClass != wmd.TemperatureClass) return false;
|
if (TemperatureClass != wmd.TemperatureClass) return false;
|
||||||
if (PressureLossClass != wmd.PressureLossClass) return false;
|
if (PressureLossClass != wmd.PressureLossClass) return false;
|
||||||
if (MaxAdmissiblePressure != wmd.MaxAdmissiblePressure) return false;
|
if (MaxAdmissiblePressure != wmd.MaxAdmissiblePressure) return false;
|
||||||
if (FlowProfileSensitivityClass != wmd.FlowProfileSensitivityClass) return false;
|
if (FlowProfileSensitivityClass != wmd.FlowProfileSensitivityClass) return false;
|
||||||
|
|
||||||
if (ApprovalInfo != wmd.ApprovalInfo) return false;
|
if (ApprovalInfo != wmd.ApprovalInfo) return false;
|
||||||
if (Certificate != wmd.Certificate) return false;
|
if (Certificate != wmd.Certificate) return false;
|
||||||
|
|
||||||
if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
|
if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
|
||||||
|
|
||||||
if (ProducerAux != wmd.ProducerAux) return false;
|
if (ProducerAux != wmd.ProducerAux) return false;
|
||||||
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
|
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
|
||||||
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
|
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
|
||||||
if (ApprovalInfoAux != wmd.ApprovalInfoAux) return false;
|
if (ApprovalInfoAux != wmd.ApprovalInfoAux) return false;
|
||||||
|
|
||||||
if (Medium != wmd.Medium) return false;
|
if (Medium != wmd.Medium) return false;
|
||||||
|
|
||||||
if (Text1 != wmd.Text1) return false;
|
if (Text1 != wmd.Text1) return false;
|
||||||
if (Text2 != wmd.Text2) return false;
|
if (Text2 != wmd.Text2) return false;
|
||||||
if (Text3 != wmd.Text3) return false;
|
if (Text3 != wmd.Text3) return false;
|
||||||
if (Text4 != wmd.Text4) return false;
|
if (Text4 != wmd.Text4) return false;
|
||||||
if (Text5 != wmd.Text5) return false;
|
if (Text5 != wmd.Text5) return false;
|
||||||
|
|
||||||
if (Compound != wmd.Compound) return false;
|
if (Compound != wmd.Compound) return false;
|
||||||
if (HeatMeter != wmd.HeatMeter) return false;
|
if (HeatMeter != wmd.HeatMeter) return false;
|
||||||
|
|
||||||
#if ORACLE_DB
|
#if ORACLE_DB
|
||||||
if (WMTypeId != wmd.WMTypeId) return false;
|
if (WMTypeId != wmd.WMTypeId) return false;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user