Results.Entities.MeterTestRslt.IsPilotRslt() added to control output protocol generation.
This commit is contained in:
parent
38b985c75f
commit
94e5e906b1
@ -65,6 +65,13 @@ namespace Results.Entities
|
|||||||
public virtual WaterMeterData WaterMeterData() { return WaterMeter.WaterMeterData; }
|
public virtual WaterMeterData WaterMeterData() { return WaterMeter.WaterMeterData; }
|
||||||
public virtual Batch Batch() { return WaterMeter.Batch; }
|
public virtual Batch Batch() { return WaterMeter.Batch; }
|
||||||
|
|
||||||
|
public virtual bool IsPilotRslt()
|
||||||
|
{
|
||||||
|
return (CompoundMeterId == (byte)Config.Entities.CompoundMeterId.Single) ||
|
||||||
|
(CompoundMeterId == (byte)Config.Entities.CompoundMeterId.Compound) ||
|
||||||
|
(CompoundMeterId == (byte)Config.Entities.CompoundMeterId.HeatMeterEnergy);
|
||||||
|
}
|
||||||
|
|
||||||
public virtual string PassedColorStr()
|
public virtual string PassedColorStr()
|
||||||
{
|
{
|
||||||
#if PUCHONG_PT200
|
#if PUCHONG_PT200
|
||||||
|
|||||||
@ -209,10 +209,8 @@ namespace Results.Forms
|
|||||||
|
|
||||||
foreach (var mtr in wMtr.MeterTestRslts)
|
foreach (var mtr in wMtr.MeterTestRslts)
|
||||||
{
|
{
|
||||||
if ((mtr.CompoundMeterId == (byte)CompoundMeterId.Single || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
|
if (mtr.IsPilotRslt() && mtr.TestDone && (mtr.Publish() != Config.Entities.Publish.Never)
|
||||||
&& mtr.TestDone
|
&& (mtr.Publish() != Config.Entities.Publish.Internal))
|
||||||
&& (mtr.Publish() != Config.Entities.Publish.Never)
|
|
||||||
&& (mtr.Publish() != Config.Entities.Publish.Internal))
|
|
||||||
{
|
{
|
||||||
testNames.Add(mtr.Name());
|
testNames.Add(mtr.Name());
|
||||||
}
|
}
|
||||||
@ -251,13 +249,8 @@ namespace Results.Forms
|
|||||||
int ix = 0;
|
int ix = 0;
|
||||||
foreach (var mtr in wMtr.MeterTestRslts)
|
foreach (var mtr in wMtr.MeterTestRslts)
|
||||||
{
|
{
|
||||||
if (mtr != null &&
|
if (mtr != null && mtr.IsPilotRslt() && mtr.TestDone && mtr.Publish() != Config.Entities.Publish.Never
|
||||||
(mtr.CompoundMeterId == (byte)CompoundMeterId.Single ||
|
&& mtr.Publish() != Config.Entities.Publish.Internal)
|
||||||
mtr.CompoundMeterId == (byte)CompoundMeterId.Compound ||
|
|
||||||
mtr.CompoundMeterId == (byte)CompoundMeterId.HeatMeterEnergy) &&
|
|
||||||
mtr.TestDone &&
|
|
||||||
mtr.Publish() != Config.Entities.Publish.Never &&
|
|
||||||
mtr.Publish() != Config.Entities.Publish.Internal)
|
|
||||||
{
|
{
|
||||||
ListViewItem lvi = new ListViewItem(testNames[ix++]);
|
ListViewItem lvi = new ListViewItem(testNames[ix++]);
|
||||||
|
|
||||||
@ -322,13 +315,8 @@ namespace Results.Forms
|
|||||||
|
|
||||||
foreach (var mtr in wMtr.MeterTestRslts)
|
foreach (var mtr in wMtr.MeterTestRslts)
|
||||||
{
|
{
|
||||||
if (mtr != null &&
|
if (mtr != null && mtr.IsPilotRslt() && mtr.TestDone && mtr.Publish() != Config.Entities.Publish.Never &&
|
||||||
(mtr.CompoundMeterId == (byte)CompoundMeterId.Single ||
|
mtr.Publish() != Config.Entities.Publish.Internal)
|
||||||
mtr.CompoundMeterId == (byte)CompoundMeterId.Compound ||
|
|
||||||
mtr.CompoundMeterId == (byte)CompoundMeterId.HeatMeterEnergy) &&
|
|
||||||
mtr.TestDone &&
|
|
||||||
mtr.Publish() != Config.Entities.Publish.Never &&
|
|
||||||
mtr.Publish() != Config.Entities.Publish.Internal)
|
|
||||||
{
|
{
|
||||||
string str = items[i].Print(wMtr, mtr.Name());
|
string str = items[i].Print(wMtr, mtr.Name());
|
||||||
|
|
||||||
|
|||||||
@ -252,7 +252,7 @@ namespace Results.Output.Printers.Enhanced
|
|||||||
float columnWidth = e.Graphics.MeasureString(testItems[i].Caption, font).Width;
|
float columnWidth = e.Graphics.MeasureString(testItems[i].Caption, font).Width;
|
||||||
foreach (var mtr in wm.MeterTestRslts)
|
foreach (var mtr in wm.MeterTestRslts)
|
||||||
{
|
{
|
||||||
if ((mtr != null) && (mtr.Publish() == Config.Entities.Publish.Always))
|
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||||
{
|
{
|
||||||
string itemText = testItems[i].Print(wm, mtr.Name());
|
string itemText = testItems[i].Print(wm, mtr.Name());
|
||||||
|
|
||||||
|
|||||||
@ -402,7 +402,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|||||||
{
|
{
|
||||||
if (abort) return;
|
if (abort) return;
|
||||||
|
|
||||||
if ((mtr != null) && (mtr.Publish() == Config.Entities.Publish.Always))
|
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < testItems.Count; i++)
|
for (int i = 0; i < testItems.Count; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user