Config.Entities.Test : Support for tests using multiple (but not all) lines (Israel PT50, 4 lines).

This commit is contained in:
Milan Hanajik
2019-01-14 15:33:36 +02:00
parent f180af692f
commit f5926259a7
26 changed files with 96 additions and 47 deletions
+12
View File
@@ -319,6 +319,18 @@ namespace Results.Entities
#endif
}
public virtual bool IsPartCompatible(int waterMeterPartNr)
{
if ((this.Part == 0) || (waterMeterPartNr == 0)) return true;
if ((this.Part % 10) == waterMeterPartNr) return true;
if (((this.Part / 10) % 10) == waterMeterPartNr) return true;
if (((this.Part / 100) % 10) == waterMeterPartNr) return true;
if (((this.Part / 1000) % 10) == waterMeterPartNr) return true;
return false;
}
public override string ToString()
{
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());