Bug fix in Sequences.MainSeq.RestoreBatchResults.
This commit is contained in:
+8
-8
@@ -296,13 +296,13 @@ namespace Results
|
|||||||
ISession session = DB.CreateSession();
|
ISession session = DB.CreateSession();
|
||||||
if (session == null) return null;
|
if (session == null) return null;
|
||||||
|
|
||||||
TestDataList = session.QueryOver<TestData>().List();
|
|
||||||
ComponentsList = session.QueryOver<Components>().List();
|
|
||||||
WaterMeterDataList = session.QueryOver<WaterMeterData>().List();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
batches = session.QueryOver<Batch>()
|
TestDataList = session.QueryOver<TestData>().List();
|
||||||
|
ComponentsList = session.QueryOver<Components>().List();
|
||||||
|
WaterMeterDataList = session.QueryOver<WaterMeterData>().List();
|
||||||
|
|
||||||
|
batches = session.QueryOver<Batch>()
|
||||||
.Where(x => (x.BatchNr == batchNr))
|
.Where(x => (x.BatchNr == batchNr))
|
||||||
.List();
|
.List();
|
||||||
|
|
||||||
@@ -315,14 +315,14 @@ namespace Results
|
|||||||
.Where(x => (x.Batch.Id == batch.Id))
|
.Where(x => (x.Batch.Id == batch.Id))
|
||||||
.List();
|
.List();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
return (batches.Count > 0) ? batches[0] : null;
|
||||||
|
}
|
||||||
catch (Exception exc)
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
log.FatalFormat("Cannot load batch #{0}: {1}", batchNr, exc.Message);
|
log.FatalFormat("Cannot load batch #{0}: {1}", batchNr, exc.Message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (batches.Count > 0) ? batches[0] : null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1428,6 +1428,8 @@ namespace TBF.BenchControl.Sequences
|
|||||||
{
|
{
|
||||||
Batch oriBatch = Results.DB.LoadBatch(oriBatchNr);
|
Batch oriBatch = Results.DB.LoadBatch(oriBatchNr);
|
||||||
|
|
||||||
|
if (oriBatch == null) return;
|
||||||
|
|
||||||
batchResults.Batch.StartTime = oriBatch.StartTime;
|
batchResults.Batch.StartTime = oriBatch.StartTime;
|
||||||
|
|
||||||
foreach (var testRslt in batchResults.Batch.TestRslts)
|
foreach (var testRslt in batchResults.Batch.TestRslts)
|
||||||
|
|||||||
Reference in New Issue
Block a user