Serious bug in saving/printing results for compound meters fixed, ver. 2.12.486

This commit is contained in:
Milan Hanajik 2017-03-08 10:35:08 +01:00
parent 697b0b3538
commit 3c51b92e5e
6 changed files with 25 additions and 11 deletions

View File

@ -78,6 +78,7 @@ namespace Config.Entities
Compound,
HeatMeterVolume,
HeatMeterEnergy,
SingleOrCompound, /// Only used when querying results
}
public enum Medium

View File

@ -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.12.475.0")]
[assembly: AssemblyFileVersion("2.12.475.0")]
[assembly: AssemblyVersion("2.12.486.0")]
[assembly: AssemblyFileVersion("2.12.486.0")]

View File

@ -92,7 +92,7 @@ namespace Results.Entities
public virtual MeterTestRslt GetMeterTestRslt(string testName)
{
return GetMeterTestRslt(testName, CompoundMeterId.Single);
return GetMeterTestRslt(testName, CompoundMeterId.SingleOrCompound);
}
public virtual MeterTestRslt GetMeterTestRslt(string testName, Config.Entities.CompoundMeterId meterId)
@ -101,9 +101,22 @@ namespace Results.Entities
string testNameL = testName.ToLower();
foreach (var mtr in MeterTestRslts)
{
if ((mtr.CompoundMeterId == (byte)meterId) && mtr.Name().ToLower().Equals(testNameL))
if (mtr.Name().ToLower().Equals(testNameL))
{
return mtr;
if (mtr.CompoundMeterId == (byte)meterId)
{
return mtr;
}
else if (meterId == Config.Entities.CompoundMeterId.SingleOrCompound &&
mtr.CompoundMeterId == (byte)Config.Entities.CompoundMeterId.Single)
{
return mtr;
}
else if (meterId == Config.Entities.CompoundMeterId.SingleOrCompound &&
mtr.CompoundMeterId == (byte)Config.Entities.CompoundMeterId.Compound)
{
return mtr;
}
}
}
return null;

View File

@ -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.12.475.0")]
[assembly: AssemblyFileVersion("2.12.475.0")]
[assembly: AssemblyVersion("2.12.486.0")]
[assembly: AssemblyFileVersion("2.12.486.0")]

View File

@ -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.12.485.0")]
[assembly: AssemblyFileVersion("2.12.485.0")]
[assembly: AssemblyVersion("2.12.486.0")]
[assembly: AssemblyFileVersion("2.12.486.0")]

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.12.485.1")]
[assembly: AssemblyFileVersion("2.12.485.1")]
[assembly: AssemblyVersion("2.12.486.1")]
[assembly: AssemblyFileVersion("2.12.486.1")]