Aus >100.000 Werten errors statt violations machen

This commit is contained in:
Daniel Schick 2023-07-09 14:20:27 +02:00
parent ef65f2545f
commit 12e65a27e4
2 changed files with 10 additions and 2 deletions

View File

@ -18,11 +18,15 @@ namespace bsmd.database
public class BRKA : DatabaseEntity, ISublistElement public class BRKA : DatabaseEntity, ISublistElement
{ {
#region Construction
public BRKA() public BRKA()
{ {
this.tablename = "[dbo].[BKRA]"; this.tablename = "[dbo].[BKRA]";
} }
#endregion
#region Properties #region Properties
[ShowReport] [ShowReport]
@ -124,7 +128,7 @@ namespace bsmd.database
{ {
if(this.BunkerFuelQuantity_TNE.HasValue && this.BunkerFuelQuantity_TNE > 10000) if(this.BunkerFuelQuantity_TNE.HasValue && this.BunkerFuelQuantity_TNE > 10000)
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRA")); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRA"));
} }
} }

View File

@ -18,11 +18,15 @@ namespace bsmd.database
public class BRKD : DatabaseEntity, ISublistElement public class BRKD : DatabaseEntity, ISublistElement
{ {
#region Construction
public BRKD() public BRKD()
{ {
this.tablename = "[dbo].[BKRD]"; this.tablename = "[dbo].[BKRD]";
} }
#endregion
#region Properties #region Properties
[ShowReport] [ShowReport]
@ -123,7 +127,7 @@ namespace bsmd.database
{ {
if (this.BunkerFuelQuantity_TNE.HasValue && this.BunkerFuelQuantity_TNE > 10000) if (this.BunkerFuelQuantity_TNE.HasValue && this.BunkerFuelQuantity_TNE > 10000)
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRD")); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRD"));
} }
} }