create errors instead of violations for too large waste amounts
This commit is contained in:
parent
11b9b14fbd
commit
8e1d41cc0d
@ -255,16 +255,16 @@ namespace bsmd.database
|
|||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V784, "WasteCode", null, this.Title, this.Identifier, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.V784, "WasteCode", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
|
||||||
if (this.WasteDisposalAmount_MTQ >= 10000)
|
if (this.WasteDisposalAmount_MTQ >= 10000)
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
|
||||||
if (this.WasteCapacity_MTQ >= 10000)
|
if (this.WasteCapacity_MTQ >= 10000)
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste capacity too high", null, this.Title, this.Identifier, this.Tablename));
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste capacity too high", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
|
||||||
if (this.WasteAmountRetained_MTQ >= 10000)
|
if (this.WasteAmountRetained_MTQ >= 10000)
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste amount retained too high", null, this.Title, this.Identifier, this.Tablename));
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste amount retained too high", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
|
||||||
if (this.WasteAmountGeneratedTillNextPort_MTQ >= 10000)
|
if (this.WasteAmountGeneratedTillNextPort_MTQ >= 10000)
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated till next port too high", null, this.Title, this.Identifier, this.Tablename));
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste generated till next port too high", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
|
||||||
if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ)
|
if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ)
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
|||||||
@ -137,7 +137,7 @@ namespace bsmd.database
|
|||||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||||
{
|
{
|
||||||
if (this.AmountWasteReceived_MTQ >= 10000)
|
if (this.AmountWasteReceived_MTQ >= 10000)
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user