Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30d525e0b1 | ||
|
|
0186ac443f |
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -28,7 +28,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
+138
-2
@@ -3,9 +3,41 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class to assign descriptions to enum values
|
||||
/// </summary>
|
||||
public class Description : Attribute
|
||||
{
|
||||
public string Text;
|
||||
public Description(string t)
|
||||
{
|
||||
Text = t;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GetDescription
|
||||
{
|
||||
/// Extension method for enum-s
|
||||
public static string ToDescription(this Enum en)
|
||||
{
|
||||
Type type = en.GetType();
|
||||
MemberInfo[] memInfo = type.GetMember(en.ToString());
|
||||
|
||||
if (memInfo != null && memInfo.Length > 0)
|
||||
{
|
||||
object[] attrs = memInfo[0].GetCustomAttributes(typeof(Description), false);
|
||||
if (attrs != null && attrs.Length > 0)
|
||||
return ((Description)attrs[0]).Text;
|
||||
}
|
||||
|
||||
return en.ToString(); /// Return ToString() value in case there is no description
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Identifies the type of a database </summary>
|
||||
public enum DBType
|
||||
{
|
||||
@@ -35,6 +67,7 @@ namespace Config.Entities
|
||||
{
|
||||
Single,
|
||||
Combined,
|
||||
HeatMeter,
|
||||
}
|
||||
|
||||
public enum CompoundMeterId : byte
|
||||
@@ -47,9 +80,74 @@ namespace Config.Entities
|
||||
|
||||
public enum Medium
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
ColdWater,
|
||||
HotWater,
|
||||
}
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Mounting
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("H")] H, /// horizontal
|
||||
[Description("V")] V, /// vertical
|
||||
[Description("S")] S, /// steig
|
||||
[Description("F")] F, /// fall
|
||||
Count
|
||||
}
|
||||
|
||||
public enum TemperatureClass
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("T30")] T30,
|
||||
[Description("T50")] T50,
|
||||
[Description("T70")] T70,
|
||||
[Description("T90")] T90,
|
||||
[Description("T130")] T130,
|
||||
[Description("T180")] T180,
|
||||
[Description("T30/70")] T30_70,
|
||||
[Description("T30/90")] T30_90,
|
||||
[Description("T30/130")] T30_130,
|
||||
[Description("T30/180")] T30_180,
|
||||
[Description("30")] t30,
|
||||
[Description("50")] t50,
|
||||
[Description("70")] t70,
|
||||
[Description("90")] t90,
|
||||
[Description("130")] t130,
|
||||
[Description("180")] t180,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum FlowProfileSensitivityClass
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("U0")] U0, /// ?
|
||||
[Description("D0")] D0, /// ?
|
||||
Count
|
||||
}
|
||||
|
||||
public enum PressureLossClass
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("dp63")] dp63, /// 0.063 MPa = 0.63 bar, TODO: Change to "Δp63"
|
||||
[Description("dp40")] dp40, /// 0.040 MPa = 0.40 bar
|
||||
[Description("dp25")] dp25, /// 0.025 MPa = 0.25 bar
|
||||
[Description("dp16")] dp16, /// 0.016 MPa = 0.16 bar
|
||||
[Description("dp10")] dp10, /// 0.010 MPa = 0.10 bar
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary> Maximum Admissible Pressure </summary>
|
||||
public enum MaxAdmissiblePressure
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("MAP6")] MAP6,
|
||||
[Description("MAP10")] MAP10,
|
||||
[Description("MAP16")] MAP16,
|
||||
[Description("MAP25")] MAP25,
|
||||
[Description("MAP40")] MAP40,
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary> Transition step is finished when this condition is fulfilled </summary>
|
||||
public enum StepCondition
|
||||
@@ -59,7 +157,36 @@ namespace Config.Entities
|
||||
Scale2Empty,
|
||||
Scale3Empty,
|
||||
AllScalesEmpty,
|
||||
Count,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Publish : sbyte
|
||||
{
|
||||
#if MUNICH
|
||||
/// nemecky
|
||||
[Description("nie")] Never = 0,
|
||||
[Description("immer")] Always = 1,
|
||||
[Description("Bildschirm")] OnScreen = 2,
|
||||
[Description("intern")] Internal = 3,
|
||||
#elif CEVAK || BADGER_MALA_TRAT || BADGER_VELKA_TRAT
|
||||
/// cesky
|
||||
[Description("nikdy")] Never = 0,
|
||||
[Description("vždy")] Always = 1,
|
||||
[Description("na obrazovku")] OnScreen = 2,
|
||||
[Description("interně")] Internal = 3,
|
||||
#elif IPERLST || IPERLST_SPECIAL || SLM_50
|
||||
/// slovensky
|
||||
[Description("nikdy")] Never = 0,
|
||||
[Description("vždy")] Always = 1,
|
||||
[Description("na obrazovku")] OnScreen = 2,
|
||||
[Description("interne")] Internal = 3,
|
||||
#else
|
||||
[Description("Never")] Never = 0,
|
||||
[Description("Always")] Always = 1,
|
||||
[Description("On screen")] OnScreen = 2,
|
||||
[Description("Internal")] Internal = 3,
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
|
||||
public enum TestRedType
|
||||
@@ -150,5 +277,14 @@ namespace Config.Entities
|
||||
Vertically,
|
||||
Horizontally,
|
||||
}
|
||||
|
||||
public enum Alignment
|
||||
{
|
||||
Left,
|
||||
Center,
|
||||
Right,
|
||||
Justified,
|
||||
Count
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+40
-17
@@ -17,31 +17,37 @@ namespace Config.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Part { get; set; } /// Part=0 ... test of all WM-s
|
||||
/// Part>0 ... part of a set of tests with the same Name: subset of WM-s is given by MetersPath
|
||||
public virtual bool Publish { get; set; }
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool Evaluate { get; set; }
|
||||
public virtual float Qfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow high limit in [m3/h]
|
||||
public virtual float Volume { get; set; } /// Test volume (target) in [l]
|
||||
public virtual float TstTime { get; set; } /// Test time (estimate) in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0)
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0)
|
||||
public virtual float Uncertainty { get; set; } /// int [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual bool Emptying { get; set; }
|
||||
public virtual bool Zeroing { get; set; }
|
||||
public virtual float PumpPower { get; set; } /// Power of the pump in [%] in the range 0 .. 100.0f, use values 0% and 100% for non-FM pumps
|
||||
public virtual int MassRepeats { get; set; } /// Number of mass. measurements at the beginning/end of test, 0 = default (=5)
|
||||
public virtual float MassSpread { get; set; } /// Max spread of mass. measurements at the beginning/end of test, 0 = default
|
||||
public virtual bool MassMethod { get; set; } /// method of mass. measurement at the beginning/end of test: false=slow (precise), true=fast (immediate)
|
||||
public virtual int TimeBeforeFlow { get; set; } /// Delay time before the start of flow control in [s]
|
||||
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
|
||||
public virtual int TimeMass2Start { get; set; } /// Delay time from the 1st mass measurement to the test start in [s]
|
||||
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
|
||||
public virtual int TimePump2StartV { get; set; }/// Delay time from the start of the pump to opening the start valve in [s]
|
||||
public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0)
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0)
|
||||
public virtual float Uncertainty { get; set; } /// int [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual double TolerRed { get; set; } /// = Filter
|
||||
public virtual TestRedType RedType { get; set; }
|
||||
public virtual string FeedingPath { get; set; }
|
||||
public virtual string BenchPath { get; set; }
|
||||
public virtual string OutputPath { get; set; }
|
||||
public virtual string MetersPath { get; set; }
|
||||
public virtual string RelTransBefore { get; set; }
|
||||
#if HEAT_METERS_SUPPORT
|
||||
public virtual string HeatMetersPath { get; set; }
|
||||
#endif
|
||||
public virtual string RelTransBefore { get; set; }
|
||||
public virtual string RelTransBetween { get; set; }
|
||||
public virtual string RelTransAfter { get; set; }
|
||||
public virtual string TransitionAfter { get; set; }
|
||||
@@ -59,20 +65,27 @@ namespace Config.Entities
|
||||
///
|
||||
/// Default values
|
||||
///
|
||||
Publish = true;
|
||||
Publish = (sbyte)Config.Entities.Publish.Always;
|
||||
Evaluate = true;
|
||||
Repeats = 1;
|
||||
Emptying = false;
|
||||
Zeroing = false;
|
||||
PumpPower = 60.0f; /// [%]
|
||||
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
|
||||
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
|
||||
TimeMass2Start = 1; /// [s] time from the 1st mass measurement to the test start in [s]
|
||||
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
|
||||
ErrLimLo = -2.0f; /// [%] lower error limit
|
||||
ErrLimHi = 2.0f; /// [%] upper error limit
|
||||
Uncertainty = 0;
|
||||
TolerRed = 0; /// = Filter parameter
|
||||
PumpPower = 60.0f; /// [%]
|
||||
MassRepeats = 0; /// default
|
||||
MassSpread = 0; /// default
|
||||
MassMethod = false; /// default
|
||||
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
|
||||
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
|
||||
TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s]
|
||||
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
|
||||
TolerRed = 0; /// = Filter parameter
|
||||
RelTransBefore = string.Empty;
|
||||
RelTransBetween = string.Empty;
|
||||
RelTransAfter = string.Empty;
|
||||
TransitionAfter = string.Empty;
|
||||
}
|
||||
|
||||
public Test(string name, int itemNr, Procedure procedure)
|
||||
@@ -99,9 +112,12 @@ namespace Config.Entities
|
||||
result.Emptying = Emptying;
|
||||
result.Zeroing = Zeroing;
|
||||
result.PumpPower = PumpPower;
|
||||
result.MassRepeats = MassRepeats;
|
||||
result.MassSpread = MassSpread;
|
||||
result.MassMethod = MassMethod;
|
||||
result.TimeBeforeFlow = TimeBeforeFlow;
|
||||
result.TimeFlow2Mass = TimeFlow2Mass;
|
||||
result.TimeMass2Start = TimeMass2Start;
|
||||
result.TimePump2StartV = TimePump2StartV;
|
||||
result.TimeStop2Mass = TimeStop2Mass;
|
||||
result.Method = Method;
|
||||
result.ErrLimLo = ErrLimLo;
|
||||
@@ -113,6 +129,13 @@ namespace Config.Entities
|
||||
result.BenchPath = BenchPath;
|
||||
result.OutputPath = OutputPath;
|
||||
result.MetersPath = MetersPath;
|
||||
#if HEAT_METERS_SUPPORT
|
||||
result.HeatMetersPath = HeatMetersPath;
|
||||
#endif
|
||||
result.RelTransBefore = RelTransBefore;
|
||||
result.RelTransBetween = RelTransBetween;
|
||||
result.RelTransAfter = RelTransAfter;
|
||||
result.TransitionAfter = TransitionAfter;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
|
||||
return result;
|
||||
@@ -122,7 +145,7 @@ namespace Config.Entities
|
||||
{
|
||||
string partStr = (Part > 0) ? string.Format(", part {0}", Part) : string.Empty;
|
||||
|
||||
return string.Format("{0}({1}{2}){3}", Name, Publish ? "P" : "-", Evaluate ? "E" : "-", partStr);
|
||||
return string.Format("{0}(P.{1},{2}){3}", Name, ((Publish)Publish).ToString(), Evaluate ? "E" : "-", partStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,21 +25,29 @@ namespace Config.Mappings
|
||||
Map(x => x.Emptying);
|
||||
Map(x => x.Zeroing);
|
||||
Map(x => x.PumpPower);
|
||||
Map(x => x.MassRepeats);
|
||||
Map(x => x.MassSpread);
|
||||
Map(x => x.MassMethod);
|
||||
Map(x => x.TimeBeforeFlow);
|
||||
Map(x => x.TimeFlow2Mass);
|
||||
Map(x => x.TimeMass2Start);
|
||||
Map(x => x.TimePump2StartV)
|
||||
.Column("TimeMass2Start");
|
||||
Map(x => x.TimeStop2Mass);
|
||||
Map(x => x.Method);
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.TolerRed); /// ???
|
||||
Map(x => x.RedType); /// ???
|
||||
Map(x => x.TolerRed)
|
||||
.Column("TolerRed"); /// ???
|
||||
Map(x => x.RedType); /// ???
|
||||
Map(x => x.FeedingPath);
|
||||
Map(x => x.BenchPath);
|
||||
Map(x => x.OutputPath);
|
||||
Map(x => x.MetersPath);
|
||||
Map(x => x.RelTransBefore);
|
||||
#if HEAT_METERS_SUPPORT
|
||||
Map(x => x.HeatMetersPath);
|
||||
#endif
|
||||
Map(x => x.RelTransBefore);
|
||||
Map(x => x.RelTransBetween);
|
||||
Map(x => x.RelTransAfter);
|
||||
Map(x => x.TransitionAfter);
|
||||
|
||||
@@ -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.1.188.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.188.0")]
|
||||
[assembly: AssemblyVersion("2.9.329.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.329.0")]
|
||||
|
||||
+35
-8
@@ -32,6 +32,7 @@ namespace Results
|
||||
WaterMeterData[] waterMeterDatas, int[] waterMeterParts)
|
||||
{
|
||||
BatchResults d = new BatchResults(waterMeterDatas.Length);
|
||||
int year = DateTime.Now.Year;
|
||||
|
||||
/// Create new batch
|
||||
d.Batch = new Batch()
|
||||
@@ -41,10 +42,16 @@ namespace Results
|
||||
ProgramVersion = programVer,
|
||||
UserName = user,
|
||||
ProcedureName = procedure.Name,
|
||||
ProcedureDescription = procedure.Description,
|
||||
WatermetersStr = procedure.Watermeters,
|
||||
ProcedureRevision = procedure.Revision,
|
||||
ProtocolTitle = procedure.ProtocolTitle,
|
||||
StartTime = DateTime.Now,
|
||||
};
|
||||
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
|
||||
#if HEAT_METERS_SUPPORT
|
||||
HeatMeter = (procedure.MetersKind == Config.Entities.MetersKind.HeatMeter),
|
||||
#endif
|
||||
};
|
||||
|
||||
///
|
||||
/// Add watermeter to an array, array index is WM position.
|
||||
@@ -55,13 +62,19 @@ namespace Results
|
||||
{
|
||||
if (waterMeterDatas[i] == null) continue;
|
||||
WaterMeterData wmd = WaterMeterData.UpdateList(d.WaterMeterDataList, waterMeterDatas[i]);
|
||||
d.WaterMeters[i] = new WaterMeter() { Batch = d.Batch, WaterMeterData = wmd, WMPosition = i + 1 };
|
||||
d.WaterMeters[i] = new WaterMeter()
|
||||
{
|
||||
Batch = d.Batch,
|
||||
WaterMeterData = wmd,
|
||||
WMPosition = i + 1,
|
||||
YearOfProduction = year,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
foreach (var t in procedure.Tests)
|
||||
{
|
||||
if (t.Publish)
|
||||
if (t.Publish != (byte)Config.Entities.Publish.Never)
|
||||
{
|
||||
TestData td = TestData.UpdateList(d.TestDataList, new TestData(t));
|
||||
|
||||
@@ -78,7 +91,7 @@ namespace Results
|
||||
if (t.Part != 0 && waterMeterParts[i] != 0 && t.Part != waterMeterParts[i]) continue;
|
||||
|
||||
/// Create empty watermeter test results and add them to the list and to dictionaries
|
||||
if (procedure.MetersKind == Config.Entities.MetersKind.Single)
|
||||
if (!d.Batch.Compound)
|
||||
{
|
||||
MeterTestRslt mtr = new MeterTestRslt(d.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Single);
|
||||
d.WaterMeters[i].MeterTestRslts.Add(mtr);
|
||||
@@ -102,13 +115,24 @@ namespace Results
|
||||
return d;
|
||||
}
|
||||
|
||||
public static BatchResults FromBatch(Batch batch)
|
||||
{
|
||||
int wmCount = batch.WaterMeters.Count;
|
||||
if (wmCount == 0) return null;
|
||||
|
||||
public TestRslt GetTestRslt(string name, int part)
|
||||
BatchResults batchResults = new BatchResults(wmCount);
|
||||
batchResults.Batch = batch;
|
||||
batchResults.WaterMeters = new WaterMeter[wmCount];
|
||||
for (int i = 0; i < wmCount; i++) batchResults.WaterMeters[i] = batch.WaterMeters[i];
|
||||
|
||||
return batchResults;
|
||||
}
|
||||
|
||||
public TestRslt GetTestRslt(string name, int part)
|
||||
{
|
||||
return Batch.GetTestRslt(name, part);
|
||||
}
|
||||
|
||||
|
||||
public MeterTestRslt GetMeterTestRslt(string name, int wmnr0, Config.Entities.CompoundMeterId meterId)
|
||||
{
|
||||
if (WaterMeters[wmnr0] != null)
|
||||
@@ -148,10 +172,13 @@ namespace Results
|
||||
{
|
||||
for (int i = 0; i < WMPositionsCount; i++)
|
||||
{
|
||||
if (WaterMeters[i] != null)
|
||||
if (WaterMeters[i] != null)
|
||||
{
|
||||
WaterMeters[i].Passed = WaterMeters[i].PassedFromTests();
|
||||
Batch.WaterMeters.Add(WaterMeters[i]);
|
||||
if (!WaterMeters[i].Disabled)
|
||||
{
|
||||
Batch.WaterMeters.Add(WaterMeters[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -13,9 +13,13 @@ namespace Results.Entities
|
||||
public virtual int TestBenchId { get; set; }
|
||||
public virtual string ProgramVersion { get; set; }
|
||||
public virtual string UserName { get; set; }
|
||||
public virtual int UserNumber { get; set; }
|
||||
public virtual string ProcedureName { get; set; }
|
||||
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual int ProcedureRevision { get; set; }
|
||||
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string ProtocolTitle { get; set; }
|
||||
public virtual string Remark { get; set; }
|
||||
public virtual float Custom1 { get; set; }
|
||||
public virtual float Custom2 { get; set; }
|
||||
public virtual float Custom3 { get; set; }
|
||||
@@ -26,8 +30,12 @@ namespace Results.Entities
|
||||
public virtual IList<TestData> Tests { get; set; }
|
||||
public virtual IList<WaterMeter> WaterMeters { get; set; }
|
||||
public virtual IList<TestRslt> TestRslts { get; set; }
|
||||
public virtual bool Compound { get; set; } /// Not mapped to DB now
|
||||
#if HEAT_METERS_SUPPORT
|
||||
public virtual bool HeatMeter { get; set; } /// Not mapped to DB now
|
||||
#endif
|
||||
|
||||
public Batch()
|
||||
public Batch()
|
||||
{
|
||||
Tests = new List<TestData>();
|
||||
WaterMeters = new List<WaterMeter>();
|
||||
|
||||
@@ -13,56 +13,65 @@ namespace Results.Entities
|
||||
public virtual double PulsesMeter { get; set; } /// # of 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; } /// # of water meter pulses per one liter
|
||||
public virtual double VolumeStart { get; set; } /// liter
|
||||
public virtual double VolumeEnd { get; set; } /// liter
|
||||
public virtual double VolumeMeter { get; set; } /// liter
|
||||
public virtual double VolumeRef { get; set; } /// liter
|
||||
public virtual double TimestampStart { get; set; } /// sec.
|
||||
public virtual double TimestampEnd { get; set; } /// sec.
|
||||
public virtual double TestTime { get; set; } /// sec.
|
||||
public virtual double Error { get; set; } /// %
|
||||
public virtual double VolumeStart { get; set; } /// [l]
|
||||
public virtual double VolumeEnd { get; set; } /// [l]
|
||||
public virtual double VolumeMeter { get; set; } /// [l]
|
||||
public virtual double VolumeRef { get; set; } /// [l]
|
||||
public virtual double TimestampStart { get; set; } /// [s]
|
||||
public virtual double TimestampEnd { get; set; } /// [s]
|
||||
public virtual double TestTime { get; set; } /// [s]
|
||||
public virtual double Error { get; set; } /// [%]
|
||||
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 WaterMeter WaterMeter { get; set; } /// reference to the TestData entity
|
||||
public virtual TestRslt TestRslt { get; set; } /// reference to the TestData entity
|
||||
public virtual WaterMeter WaterMeter { get; set; } /// reference to the WaterMeter entity
|
||||
public virtual TestRslt TestRslt { get; set; } /// reference to the TestRslt entity
|
||||
|
||||
/// Wrappers
|
||||
public virtual string Name() { return TestRslt.Name(); }
|
||||
public virtual DateTime StartTime() { return TestRslt.StartTime; }
|
||||
public virtual DateTime EndTime() { return TestRslt.EndTime; }
|
||||
public virtual double FlowSetTime() { return TestRslt.FlowSetTime; }
|
||||
public virtual double FlowMass() { return TestRslt.FlowMass; }
|
||||
public virtual double FlowVolume() { return TestRslt.FlowVolume; }
|
||||
public virtual double ErrorMaster() { return TestRslt.ErrorMaster; }
|
||||
public virtual double FlowSetTime() { return TestRslt.FlowSetTime; } /// [s]
|
||||
public virtual double FlowMass() { return TestRslt.FlowMass; } /// [kg/h]
|
||||
public virtual double FlowVolume() { return TestRslt.FlowVolume; } /// [m3/h]
|
||||
public virtual double ErrorMaster() { return TestRslt.ErrorMaster; } /// [%]
|
||||
public virtual double DensityOut() { return TestRslt.DensityOut; }
|
||||
public virtual Components Components(){ return TestRslt.Components; }
|
||||
///
|
||||
protected virtual TestData TestData() { return TestRslt.TestData; }
|
||||
///
|
||||
public virtual int Repeats() { return TestData().Repeats; }
|
||||
public virtual double Qfrom() { return TestData().Qfrom; }
|
||||
public virtual double Qto() { return TestData().Qto; }
|
||||
public virtual double TargetVolume() { return TestData().TargetVolume; }
|
||||
public virtual double TargetTime() { return TestData().TargetTime; }
|
||||
public virtual double Qfrom() { return TestData().Qfrom; } /// [m3/h]
|
||||
public virtual double Qto() { return TestData().Qto; } /// [m3/h]
|
||||
public virtual double TargetVolume() { return TestData().TargetVolume; } /// [l]
|
||||
public virtual double TargetTime() { return TestData().TargetTime; } /// [s]
|
||||
public virtual string Method() { return TestData().Method; }
|
||||
public virtual double ErrLimLo() { return TestData().ErrLimLo; }
|
||||
public virtual double ErrLimHi() { return TestData().ErrLimHi; }
|
||||
public virtual double Uncertainty() { return TestData().Uncertainty; }
|
||||
public virtual double ErrLimLo() { return TestData().ErrLimLo; } /// [%]
|
||||
public virtual double ErrLimHi() { return TestData().ErrLimHi; } /// [%]
|
||||
public virtual double Uncertainty() { return TestData().Uncertainty; } /// [%]
|
||||
|
||||
public virtual string ProcedureName() { return WaterMeter.Batch.ProcedureName; }
|
||||
public virtual int BatchNr() { return WaterMeter.Batch.BatchNr; }
|
||||
public virtual string SerialNr() { return WaterMeter.SerialNr; }
|
||||
public virtual string EndState() { return WaterMeter.EndState; }
|
||||
public virtual double QRise() { return WaterMeter.QRise; }
|
||||
public virtual double QFall() { return WaterMeter.QFall; }
|
||||
public virtual double QRise() { return WaterMeter.QRise; } /// [m3/h]
|
||||
public virtual double QFall() { return WaterMeter.QFall; } /// [m3/h]
|
||||
|
||||
public virtual bool Evaluate() { return TestData().Evaluate; }
|
||||
public virtual bool Evaluate() { return TestData().Evaluate; }
|
||||
public virtual Config.Entities.Publish Publish() { return (Config.Entities.Publish)TestData().Publish; }
|
||||
|
||||
public virtual WaterMeterData WaterMeterData() { return WaterMeter.WaterMeterData; }
|
||||
public virtual Batch Batch() { return WaterMeter.Batch; }
|
||||
|
||||
public virtual string PassedColorStr()
|
||||
{
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NOK|White";
|
||||
else return Passed ? "OK|Green" : "NOK|Red";
|
||||
{
|
||||
#if PUCHONG_PT200
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NG|White";
|
||||
else return Passed ? "OK|Green" : "NG|Red";
|
||||
#else
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NOK|White";
|
||||
else return Passed ? "OK|Green" : "NOK|Red";
|
||||
#endif
|
||||
}
|
||||
|
||||
public MeterTestRslt()
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Results.Entities
|
||||
public virtual double ErrLimLo { get; set; } /// [%] (usually < 0)
|
||||
public virtual double ErrLimHi { get; set; } /// [%] (usually > 0)
|
||||
public virtual double Uncertainty { get; set; } /// [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool Evaluate { get; set; }
|
||||
|
||||
|
||||
@@ -45,6 +46,7 @@ namespace Results.Entities
|
||||
ErrLimLo = (double)test.ErrLimLo;
|
||||
ErrLimHi = (double)test.ErrLimHi;
|
||||
Uncertainty = (double)test.Uncertainty;
|
||||
Publish = test.Publish;
|
||||
Evaluate = test.Evaluate;
|
||||
}
|
||||
|
||||
@@ -66,6 +68,7 @@ namespace Results.Entities
|
||||
if (ErrLimLo != td.ErrLimLo) return false;
|
||||
if (ErrLimHi != td.ErrLimHi) return false;
|
||||
if (Uncertainty != td.Uncertainty) return false;
|
||||
if (Publish != td.Publish) return false;
|
||||
if (Evaluate != td.Evaluate) return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -89,6 +89,8 @@ namespace Results.Entities
|
||||
public virtual double ErrLimLo() { return TestData.ErrLimLo; }
|
||||
public virtual double ErrLimHi() { return TestData.ErrLimHi; }
|
||||
public virtual double Uncertainty() { return TestData.Uncertainty; }
|
||||
public virtual bool Evaluate() { return TestData.Evaluate; }
|
||||
public virtual Config.Entities.Publish Publish() { return (Config.Entities.Publish)TestData.Publish; }
|
||||
|
||||
|
||||
protected TestRslt()
|
||||
|
||||
@@ -19,16 +19,23 @@ namespace Results.Entities
|
||||
public virtual double QRise { get; set; } ///![m3/h] detected Q_rise of a composed meter
|
||||
public virtual double QFall { get; set; } ///![m3/h] detected Q_fall of a composed meter
|
||||
public virtual bool Passed { get; set; }
|
||||
#if IPERLST
|
||||
public virtual int ResultCode { get; set; }
|
||||
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
public virtual int SerialNrEx { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
|
||||
public virtual double OrigCalibFactor { get; set; } /// iPerl calibration factor used during the test - Not mapped to DB !!!
|
||||
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test - Not mapped to DB !!!
|
||||
public virtual double OrigCalibFactor { get; set; } /// iPerl calibration factor used during the test
|
||||
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test
|
||||
public virtual double Q2ErrWOCorrection { get; set; }
|
||||
public virtual bool Q2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
|
||||
public virtual double Q2Correction { get; set; } /// iPerl Q2 correction used during the test - Not mapped to DB !!!
|
||||
public virtual int Q2CorrFlowRight { get; set; } /// 1 = right to left
|
||||
public virtual double Q2Correction { get; set; } /// iPerl Q2 correction used during the test
|
||||
public virtual int Q2CorrFlowRight { get; set; } /// 1 = right to left
|
||||
public virtual double Diff2Hz8Hz { get; set; }
|
||||
public virtual bool Hz2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
|
||||
public virtual int Hz2Correction { get; set; } /// iPerl Q2 correction used during the test
|
||||
public virtual int Pruefindex { get; set; } /// Not mapped to DB !!! 0=unknown (saving to Oracle failed), >=1 ... pruefindex
|
||||
public virtual int HydrPruefung { get; set; } /// Not mapped to DB !!!
|
||||
#endif
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
public virtual Batch Batch { get; set; }
|
||||
public virtual IList<MeterTestRslt> MeterTestRslts { get; set; }
|
||||
|
||||
@@ -40,11 +47,19 @@ namespace Results.Entities
|
||||
public virtual string MetrologicalClass() { return WaterMeterData.MetrologicalClass; }
|
||||
public virtual string ApprovalInfo() { return WaterMeterData.ApprovalInfo; }
|
||||
public virtual double Q4_Qmax() { return WaterMeterData.Q4_Qmax; }
|
||||
public virtual double Qn() { return WaterMeterData.Qn; }
|
||||
public virtual double Q3() { return WaterMeterData.Q3; }
|
||||
public virtual double Q3_Qn() { return WaterMeterData.Q3_Qn; }
|
||||
public virtual double Q2_Qt() { return WaterMeterData.Q2_Qt; }
|
||||
public virtual double Q1_Qmin() { return WaterMeterData.Q1_Qmin; }
|
||||
public virtual bool Compound() { return WaterMeterData.Compound; }
|
||||
|
||||
public virtual bool Compound() { return WaterMeterData.Compound; }
|
||||
#if HEAT_METER_SUPPORT
|
||||
public virtual bool HeatMeter() { return WaterMeterData.HeatMeter; }
|
||||
#endif
|
||||
|
||||
public virtual string ProducerAux() { return WaterMeterData.ProducerAux; }
|
||||
public virtual double Q3_Qn_Aux() { return WaterMeterData.Q3_Qn_Aux; }
|
||||
public virtual string MetrologicalClassAux() { return WaterMeterData.MetrologicalClassAux; }
|
||||
public virtual string ApprovalInfoAux() { return WaterMeterData.ApprovalInfoAux; }
|
||||
|
||||
public virtual int BatchNr() { return Batch.BatchNr; }
|
||||
public virtual int BenchId() { return Batch.TestBenchId; }
|
||||
@@ -53,6 +68,10 @@ namespace Results.Entities
|
||||
public virtual DateTime StartTime() { return Batch.StartTime; }
|
||||
public virtual DateTime EndTime() { return Batch.EndTime; }
|
||||
|
||||
protected MeterTestRslt lastMeterTestRslts;
|
||||
public virtual MeterTestRslt LastMeterTestRslts() { return lastMeterTestRslts; }
|
||||
|
||||
|
||||
public virtual bool PassedFromTests()
|
||||
{
|
||||
bool passed = true;
|
||||
@@ -113,10 +132,10 @@ namespace Results.Entities
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
#if IPERLST
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
sb.AppendFormat("PCB:{0} S/N:{1} ", SerialNr, SerialNrEx);
|
||||
#else
|
||||
sb.AppendFormat("S/N:{0} ", SerialNr);
|
||||
sb.AppendFormat("S/N:{0} ", SerialNr);
|
||||
#endif
|
||||
|
||||
foreach (var tr in MeterTestRslts) sb.AppendFormat(" {0}:{1}%", tr.Name(), tr.Error.ToString("F2"));
|
||||
|
||||
@@ -10,22 +10,52 @@ namespace Results.Entities
|
||||
public class WaterMeterData
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
|
||||
public virtual string ProductName { get; set; }
|
||||
public virtual string Producer { get; set; }
|
||||
public virtual string MetrologicalClass { get; set; }
|
||||
public virtual string ApprovalInfo { get; set; }
|
||||
public virtual double Q4_Qmax { get; set; } /// [m3/h]
|
||||
public virtual double Qn { get; set; } /// [m3/h]
|
||||
public virtual double Q3 { get; set; } /// [m3/h]
|
||||
public virtual double Q2_Qt { get; set; } /// [m3/h]
|
||||
public virtual double Q1_Qmin { get; set; } /// [m3/h]
|
||||
public virtual bool Compound { get; set; }
|
||||
#if IPERLST
|
||||
|
||||
public virtual double DN { get; set; } /// [mm]
|
||||
public virtual double L { get; set; } /// [mm]
|
||||
public virtual Config.Entities.Mounting Mounting { get; set; } /// H / V / S / F
|
||||
|
||||
public virtual double Q4_Qmax { get; set; } /// [m3/h]
|
||||
public virtual double Q3_Qn { get; set; } /// [m3/h]
|
||||
public virtual double Q2_Qt { get; set; } /// [m3/h]
|
||||
public virtual double Q1_Qmin { get; set; } /// [m3/h]
|
||||
|
||||
public virtual string MetrologicalClass { get; set; }
|
||||
public virtual Config.Entities.TemperatureClass TemperatureClass { get; set; }
|
||||
public virtual Config.Entities.PressureLossClass PressureLossClass { get; set; }
|
||||
public virtual Config.Entities.MaxAdmissiblePressure MaxAdmissiblePressure { get; set; }
|
||||
public virtual Config.Entities.FlowProfileSensitivityClass FlowProfileSensitivityClass { get; set; }
|
||||
|
||||
public virtual string ApprovalInfo { get; set; }
|
||||
public virtual string Certificate { get; set; }
|
||||
|
||||
public virtual double PulsesPerLtr { get; set; }
|
||||
|
||||
/// Concerns compound water meters
|
||||
public virtual string ProducerAux { get; set; }
|
||||
public virtual double Q3_Qn_Aux { get; set; } /// [m3/h]
|
||||
public virtual string MetrologicalClassAux { get; set; }
|
||||
public virtual string ApprovalInfoAux { 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; }
|
||||
#if HEAT_METER_SUPPORT
|
||||
public virtual bool HeatMeter { get; set; }
|
||||
#endif
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
public virtual int WMTypeId { get; set; }
|
||||
public virtual int WMTypeRev { get; set; }
|
||||
#endif
|
||||
|
||||
public WaterMeterData()
|
||||
public WaterMeterData()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,19 +69,45 @@ namespace Results.Entities
|
||||
{
|
||||
if (!ProductName.Equals(wmd.ProductName)) return false;
|
||||
if (!Producer.Equals(wmd.Producer)) return false;
|
||||
if (!MetrologicalClass.Equals(wmd.MetrologicalClass)) return false;
|
||||
if (!ApprovalInfo.Equals(wmd.ApprovalInfo)) return false;
|
||||
if (Q4_Qmax != wmd.Q4_Qmax) return false;
|
||||
if (Qn != wmd.Qn) return false;
|
||||
if (Q3 != wmd.Q3) return false;
|
||||
if (Q2_Qt != wmd.Q2_Qt) return false;
|
||||
|
||||
if (DN != wmd.DN) return false;
|
||||
if (L != wmd.L) return false;
|
||||
if (Mounting != wmd.Mounting) return false;
|
||||
|
||||
if (Q4_Qmax != wmd.Q4_Qmax) return false;
|
||||
if (Q3_Qn != wmd.Q3_Qn) return false;
|
||||
if (Q2_Qt != wmd.Q2_Qt) return false;
|
||||
if (Q1_Qmin != wmd.Q1_Qmin) return false;
|
||||
if (Compound != wmd.Compound) return false;
|
||||
#if IPERLST
|
||||
|
||||
if (!MetrologicalClass.Equals(wmd.MetrologicalClass)) return false;
|
||||
if (!TemperatureClass.Equals(wmd.TemperatureClass)) return false;
|
||||
if (!PressureLossClass.Equals(wmd.PressureLossClass)) return false;
|
||||
if (!MaxAdmissiblePressure.Equals(wmd.MaxAdmissiblePressure)) return false;
|
||||
if (!FlowProfileSensitivityClass.Equals(wmd.FlowProfileSensitivityClass)) return false;
|
||||
|
||||
if (!ApprovalInfo.Equals(wmd.ApprovalInfo)) return false;
|
||||
if (Certificate != wmd.Certificate) return false;
|
||||
|
||||
if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
|
||||
|
||||
if (ProducerAux != wmd.ProducerAux) return false;
|
||||
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
|
||||
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
|
||||
if (ApprovalInfoAux != wmd.ApprovalInfoAux) return false;
|
||||
|
||||
if (Text1 != wmd.Text1) return false;
|
||||
if (Text2 != wmd.Text2) return false;
|
||||
if (Text3 != wmd.Text3) return false;
|
||||
if (Text4 != wmd.Text4) return false;
|
||||
if (Text5 != wmd.Text5) return false;
|
||||
|
||||
if (Compound != wmd.Compound) return false;
|
||||
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
if (WMTypeId != wmd.WMTypeId) return false;
|
||||
if (WMTypeRev != wmd.WMTypeRev) return false;
|
||||
#endif
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,10 +15,14 @@ namespace Results.Mappings
|
||||
Map(x => x.TestBenchId);
|
||||
Map(x => x.ProgramVersion);
|
||||
Map(x => x.UserName);
|
||||
Map(x => x.UserNumber);
|
||||
Map(x => x.ProcedureName);
|
||||
Map(x => x.ProcedureRevision);
|
||||
Map(x => x.ProtocolTitle);
|
||||
Map(x => x.Custom1);
|
||||
Map(x => x.Remark)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(2000)");
|
||||
Map(x => x.Custom1);
|
||||
Map(x => x.Custom2);
|
||||
Map(x => x.Custom3);
|
||||
Map(x => x.StartTime);
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Results.Mappings
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.Evaluate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,18 +13,46 @@ namespace Results.Mappings
|
||||
Id(x => x.Id);
|
||||
Map(x => x.ProductName);
|
||||
Map(x => x.Producer);
|
||||
Map(x => x.MetrologicalClass);
|
||||
Map(x => x.ApprovalInfo);
|
||||
Map(x => x.Q4_Qmax);
|
||||
Map(x => x.Qn);
|
||||
Map(x => x.Q3);
|
||||
|
||||
Map(x => x.DN);
|
||||
Map(x => x.L);
|
||||
Map(x => x.Mounting);
|
||||
|
||||
Map(x => x.Q4_Qmax);
|
||||
Map(x => x.Q3_Qn);
|
||||
Map(x => x.Q2_Qt);
|
||||
Map(x => x.Q1_Qmin);
|
||||
Map(x => x.Compound);
|
||||
#if IPERLST
|
||||
|
||||
Map(x => x.MetrologicalClass);
|
||||
Map(x => x.TemperatureClass);
|
||||
Map(x => x.PressureLossClass);
|
||||
Map(x => x.MaxAdmissiblePressure);
|
||||
Map(x => x.FlowProfileSensitivityClass);
|
||||
|
||||
Map(x => x.ApprovalInfo);
|
||||
Map(x => x.Certificate);
|
||||
|
||||
Map(x => x.PulsesPerLtr);
|
||||
|
||||
Map(x => x.ProducerAux);
|
||||
Map(x => x.Q3_Qn_Aux);
|
||||
Map(x => x.MetrologicalClassAux);
|
||||
Map(x => x.ApprovalInfoAux);
|
||||
|
||||
Map(x => x.Text1);
|
||||
Map(x => x.Text2);
|
||||
Map(x => x.Text3);
|
||||
Map(x => x.Text4);
|
||||
Map(x => x.Text5);
|
||||
|
||||
Map(x => x.Compound);
|
||||
#if HEAT_METER_SUPPORT
|
||||
Map(x => x.HeatMeter);
|
||||
#endif
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
Map(x => x.WMTypeId);
|
||||
Map(x => x.WMTypeRev);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ namespace Results.Mappings
|
||||
Map(x => x.QRise);
|
||||
Map(x => x.QFall);
|
||||
Map(x => x.Passed);
|
||||
#if IPERLST
|
||||
Map(x => x.ResultCode);
|
||||
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
Map(x => x.SerialNrEx);
|
||||
Map(x => x.OrigCalibFactor);
|
||||
Map(x => x.CalibFactor);
|
||||
@@ -29,8 +31,11 @@ namespace Results.Mappings
|
||||
Map(x => x.Q2CorrectionDone);
|
||||
Map(x => x.Q2Correction);
|
||||
Map(x => x.Q2CorrFlowRight);
|
||||
Map(x => x.Diff2Hz8Hz);
|
||||
Map(x => x.Hz2CorrectionDone);
|
||||
Map(x => x.Hz2Correction);
|
||||
#endif
|
||||
References(x => x.WaterMeterData);
|
||||
References(x => x.WaterMeterData);
|
||||
References(x => x.Batch);
|
||||
HasMany(x => x.MeterTestRslts)
|
||||
.Cascade.All();
|
||||
|
||||
@@ -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.1.188.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.188.0")]
|
||||
[assembly: AssemblyVersion("2.9.329.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.329.0")]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -27,7 +27,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -34,7 +34,10 @@ namespace ResultsBrowser
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
QueryBatches = new List<Batch>();
|
||||
Text = string.Format("Results browser ver. {0}",
|
||||
Program.Version);
|
||||
|
||||
QueryBatches = new List<Batch>();
|
||||
QueryWaterMeters = new List<WaterMeter>();
|
||||
|
||||
ReportBatches = new List<Batch>();
|
||||
|
||||
@@ -19,6 +19,9 @@ namespace ResultsBrowser
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(Program));
|
||||
const string log4netConfigFName = "log4netConfig.xml";
|
||||
|
||||
/// Program version string
|
||||
public static string Version;
|
||||
|
||||
/// Local settings
|
||||
public static LocalSettings LocalSettings;
|
||||
public const string LocalSettingsFileName = "ResultsBrowser.xml";
|
||||
@@ -39,9 +42,11 @@ namespace ResultsBrowser
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
/// Program version string
|
||||
Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
string locAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
|
||||
Path.DirectorySeparatorChar + "TestBenchFramework" + Path.DirectorySeparatorChar;
|
||||
|
||||
@@ -77,7 +82,8 @@ namespace ResultsBrowser
|
||||
|
||||
/// Configue and start logging
|
||||
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(locAppDataDir + log4netConfigFName));
|
||||
log.Info("Entering application.");
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
log.Info("Entering application.");
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
|
||||
@@ -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.1.189.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.189.0")]
|
||||
[assembly: AssemblyVersion("2.9.329.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.329.0")]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -31,7 +31,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -164,11 +164,11 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qn :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Qn().ToString());
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Qn :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Qn().ToString()); /// TODO !!!!!
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn().ToString()); /// TODO !!!!!
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace TBF.BenchControl.Sequences
|
||||
Producer = WaterMeters[i].Producer,
|
||||
MetrologicalClass = WaterMeters[i].MetrologicalClass,
|
||||
ApprovalInfo = WaterMeters[i].ApprovalInfo,
|
||||
Qn = WaterMeters[i].Qn,
|
||||
Q3_Qn = WaterMeters[i].Qn,
|
||||
Compound = compound,
|
||||
};
|
||||
#if IPERLST
|
||||
|
||||
Generated
+2
-2
@@ -54,9 +54,9 @@ namespace TBF
|
||||
this.activityLabel = new System.Windows.Forms.Label();
|
||||
this.mainTabControl = new System.Windows.Forms.TabControl();
|
||||
this.homeTabPage = new System.Windows.Forms.TabPage();
|
||||
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
|
||||
this.ctrlBrdComponent = new ControlComponent_Torino2015.UserControl1();
|
||||
this.processTabPage = new System.Windows.Forms.TabPage();
|
||||
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl6();
|
||||
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl48();
|
||||
this.measurementTabPage = new System.Windows.Forms.TabPage();
|
||||
this.MeasurementTabPageCtrl = new TBF.Screens.MeasurementTabPageCtrl();
|
||||
this.insertTabPage = new System.Windows.Forms.TabPage();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
|
||||
@@ -749,7 +750,7 @@ namespace TBF
|
||||
lviMetrlg2.SubItems.Add(test.ErrLimHi.ToString());
|
||||
lviMetrlg2.SubItems.Add(test.Uncertainty.ToString());
|
||||
lviMetrlg2.SubItems.Add(test.TolerRed.ToString());
|
||||
lviMetrlg2.SubItems.Add(test.Publish ? Strings.yes : Strings.no);
|
||||
lviMetrlg2.SubItems.Add(((Config.Entities.Publish)test.Publish).ToDescription());
|
||||
lviMetrlg2.SubItems.Add(test.Evaluate ? Strings.yes : Strings.no);
|
||||
|
||||
metrology2ListViewEx.Items.Add(lviMetrlg2);
|
||||
@@ -840,8 +841,14 @@ namespace TBF
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)Mtrlgy2Clmn.Uncertainty].Text, out tmp)) entity.Uncertainty = tmp;
|
||||
if (Utils.TryParseUFloat(lvi.SubItems[(int)Mtrlgy2Clmn.Filter].Text, out tmp)) entity.TolerRed = (double)tmp;
|
||||
|
||||
if (lvi.SubItems[(int)Mtrlgy2Clmn.Publish].Text.Equals(Strings.yes)) entity.Publish = true;
|
||||
else if (lvi.SubItems[(int)Mtrlgy2Clmn.Publish].Text.Equals(Strings.no)) entity.Publish = false;
|
||||
for (Config.Entities.Publish pb = 0; pb < Config.Entities.Publish.Count; pb++)
|
||||
{
|
||||
if (lvi.SubItems[(int)Mtrlgy2Clmn.Publish].Text.Equals(pb.ToDescription()))
|
||||
{
|
||||
entity.Publish = (sbyte)pb;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (lvi.SubItems[(int)Mtrlgy2Clmn.Evaluate].Text.Equals(Strings.yes)) entity.Evaluate = true;
|
||||
else if (lvi.SubItems[(int)Mtrlgy2Clmn.Evaluate].Text.Equals(Strings.no)) entity.Evaluate = false;
|
||||
|
||||
@@ -117,11 +117,11 @@ namespace TBF
|
||||
|
||||
private void downButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DialogResult.Yes == MessageBox.Show("Chcete naplnit 'Publish' a 'Evaluate' vsetkych testov?", "Otazka", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
|
||||
{
|
||||
UpgradeAllTests();
|
||||
return;
|
||||
}
|
||||
//if (DialogResult.Yes == MessageBox.Show("Chcete naplnit 'Publish' a 'Evaluate' vsetkych testov?", "Otazka", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
|
||||
//{
|
||||
// UpgradeAllTests();
|
||||
// return;
|
||||
//}
|
||||
proceduresCtrl.MoveDownSelected();
|
||||
}
|
||||
|
||||
@@ -194,6 +194,8 @@ namespace TBF
|
||||
Config.Entities.Procedure proc = procedures[i];
|
||||
Text = string.Format("{0} ({1}/{2})", proc.Name, i+1, N);
|
||||
|
||||
//TBF.BenchControl.Generic.IComponent component = TBF.BenchControl.TbfComponents.FindComponent()
|
||||
|
||||
NHibernate.ITransaction transaction = session.BeginTransaction();
|
||||
|
||||
try
|
||||
@@ -203,40 +205,6 @@ namespace TBF
|
||||
.OrderBy(x => x.ItemNr).Desc
|
||||
.List<Config.Entities.Test>();
|
||||
|
||||
foreach (var test in tests)
|
||||
{
|
||||
bool publish;
|
||||
bool evaluate;
|
||||
|
||||
if (test.Name.ToLower().Equals("rfid") ||
|
||||
test.Name.ToLower().Equals("q1") ||
|
||||
test.Name.ToLower().Equals("q2") ||
|
||||
test.Name.ToLower().Equals("q3"))
|
||||
{
|
||||
publish = true;
|
||||
evaluate = true;
|
||||
}
|
||||
else if (test.Name.ToLower().Equals("adjustment") ||
|
||||
test.Name.ToLower().Equals("q2adj"))
|
||||
{
|
||||
publish = true;
|
||||
evaluate = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
publish = false;
|
||||
evaluate = false;
|
||||
}
|
||||
|
||||
bool testChanged = false;
|
||||
if (test.Publish != publish) { test.Publish = publish; testChanged = true; }
|
||||
if (test.Evaluate != evaluate) { test.Evaluate = evaluate; testChanged = true; }
|
||||
|
||||
if (testChanged)
|
||||
{
|
||||
/// Do nothing, changing the test objects before Commit() is sufficient
|
||||
}
|
||||
}
|
||||
|
||||
transaction.Commit();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
@@ -49,7 +49,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -58,7 +58,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -67,7 +67,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -97,8 +97,8 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ControlComponent3Munich">
|
||||
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
|
||||
<Reference Include="ControlComponent3U">
|
||||
<HintPath>..\packages\ControlBoard\iPerlST\ControlComponent3U.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.3.0.733, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
||||
Reference in New Issue
Block a user