ProcedureName added to TestResults entity, Basic writer changes
This commit is contained in:
parent
019e85066f
commit
8c83965315
@ -20,7 +20,8 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
||||
const int Tab3 = 430;
|
||||
const int Tab4 = 590;
|
||||
const int BorderW = 1; /// Table border line width
|
||||
const int Margin = 7; /// Margins of the text from table lines
|
||||
const int MarginTop = 7; /// Margins of the text from table lines
|
||||
const int MarginLeft = 4; /// Margins of the text from table lines
|
||||
|
||||
/// Initialized in the constructor
|
||||
readonly Printer prn;
|
||||
@ -324,11 +325,11 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
|
||||
{
|
||||
const int NrParamsInOneTableRow = 6;
|
||||
|
||||
int x = 267 + (parNr % NrParamsInOneTableRow) * 80 + Margin;
|
||||
int y = top + SpacingOneAndHalf + Margin + testNr * SpacingOneAndHalf
|
||||
int x = 267 + (parNr % NrParamsInOneTableRow) * 80 + MarginLeft;
|
||||
int y = top + SpacingOneAndHalf + MarginTop + testNr * SpacingOneAndHalf
|
||||
+ ((parNr >= NrParamsInOneTableRow) ? secondTableOffset : 0);
|
||||
|
||||
if (parNr < 0) x = 80 + Margin; /// When parNr == -1 return the left column x coordinate
|
||||
if (parNr < 0) x = 80 + MarginLeft; /// When parNr == -1 return the left column x coordinate
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
@ -34,6 +34,12 @@ namespace TBF.BenchControl.ResultsWriters.Basic
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation WriteResultsOp(IList<Entities.TestResult> results)
|
||||
{
|
||||
if ((results == null) || (results.Count == 0))
|
||||
{
|
||||
writer = null;
|
||||
return this;
|
||||
}
|
||||
|
||||
this.results = results;
|
||||
now = DateTime.Now;
|
||||
try
|
||||
@ -63,16 +69,20 @@ namespace TBF.BenchControl.ResultsWriters.Basic
|
||||
writer.WriteLine(string.Format(" PROTOKOLL Nummer {0}", 0));
|
||||
writer.WriteLine("");
|
||||
writer.WriteLine("Ver. 3/13");
|
||||
writer.WriteLine(string.Format("Datum / Zeit : {0}.{1}.{2} {3}:{4} Seite : 1/1",
|
||||
writer.WriteLine(string.Format("Datum / Zeit : {0}.{1}.{2} {3}:{4} Seite : 1/1",
|
||||
now.Day.ToString("D2"),
|
||||
now.Month.ToString("D2"),
|
||||
now.Year.ToString("D4"),
|
||||
now.Hour.ToString("D2"),
|
||||
now.Minute.ToString("D2")));
|
||||
writer.WriteLine("Wasserzähler Type : 110338");
|
||||
writer.WriteLine(string.Format("Wasserzähler Type : {0}", results[0].ProcedureName));
|
||||
writer.WriteLine("Gerät Nr. : 1");
|
||||
writer.WriteLine(string.Format("Benutzer : {0}", Entities.User.CurrentUser.Name));
|
||||
writer.WriteLine("Impulsrate : 1 67.422 1");
|
||||
writer.Write("Impulsrate : ");
|
||||
for (int i = 0; i < Program.WMsCount; i++)
|
||||
{
|
||||
//writer.Write(results[0].
|
||||
}
|
||||
writer.WriteLine("Bereich : 22,9 °C 947 mbar 43 %");
|
||||
writer.WriteLine("");
|
||||
writer.WriteLine("Test Metode MIDFehler Durchfluss Test Zeit T1 T2 Dichte Masse Druck Volume Bor");
|
||||
|
||||
@ -333,7 +333,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
//State.Create("set_RV_position",
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, qfrom_test, qto_test, measuredFlow, 10)) /// timeout = 10 sec.
|
||||
.AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, qfrom_test, qto_test, measuredFlow, 600)) /// timeout = 10 sec.
|
||||
//.AddOp(pOut.RegulValve.SetPositionOp(35.0f, 38.0f, uint.MaxValue))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
@ -11,6 +11,8 @@ namespace TBF.Entities
|
||||
public virtual IList<MeterTestResult> Meters { get; set; }
|
||||
public virtual IList<MeterTestResult> CombinedMeters { get; set; }
|
||||
|
||||
/// Value copied from the procedure (Entities.Procedure)
|
||||
public virtual string ProcedureName { get; set; }
|
||||
/// Values copied from the test (Entities.Test)
|
||||
public virtual string TestName { get; set; }
|
||||
public virtual bool DoNotEvaluate { get; set; } /// Not mapped to the database
|
||||
@ -120,6 +122,9 @@ namespace TBF.Entities
|
||||
}
|
||||
RepetitionNr = repetitionNr;
|
||||
|
||||
/// Copy test parameters from Entities.Procedure object
|
||||
ProcedureName = test.Procedure.Name;
|
||||
|
||||
/// Copy test parameters from Entities.Test object
|
||||
TestName = test.Name;
|
||||
Qfrom = test.Qfrom;
|
||||
|
||||
@ -14,7 +14,9 @@ namespace TBF.Mappings
|
||||
HasMany(x => x.CombinedMeters)
|
||||
.Cascade.All();
|
||||
|
||||
Map(x => x.TestName);
|
||||
Map(x => x.ProcedureName);
|
||||
|
||||
Map(x => x.TestName);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Volume);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user