ein bunter Strauß an Korrekturen
This commit is contained in:
parent
c761c8a304
commit
00bc43790d
@ -36,7 +36,7 @@
|
|||||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>2</ApplicationRevision>
|
<ApplicationRevision>3</ApplicationRevision>
|
||||||
<ApplicationVersion>7.8.0.%2a</ApplicationVersion>
|
<ApplicationVersion>7.8.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
|
|||||||
@ -479,6 +479,30 @@ namespace bsmd.database
|
|||||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "IMOClass", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "IMOClass", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!this.Bay.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
const string pattern = @"^[0-9]{3}$";
|
||||||
|
Regex regex = new Regex(pattern);
|
||||||
|
if (!regex.IsMatch(this.Bay))
|
||||||
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Bay", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.Row.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
const string pattern = @"^[0-9]{2}$";
|
||||||
|
Regex regex = new Regex(pattern);
|
||||||
|
if (!regex.IsMatch(this.Row))
|
||||||
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Row", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.Tier.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
const string pattern = @"^[0-9]{2}$";
|
||||||
|
Regex regex = new Regex(pattern);
|
||||||
|
if (!regex.IsMatch(this.Tier))
|
||||||
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Tier", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -258,6 +258,16 @@ namespace bsmd.database
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Validation
|
||||||
|
|
||||||
|
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||||
|
{
|
||||||
|
if (this.TowageOnArrivalDraught_DMT.HasValue && ((this.TowageOnArrivalDraught_DMT.Value < 10) || (this.TowageOnArrivalDraught_DMT.Value > 200)))
|
||||||
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Check draught on arrival", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -241,6 +241,16 @@ namespace bsmd.database
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Validation
|
||||||
|
|
||||||
|
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||||
|
{
|
||||||
|
if (this.TowageOnDepartureDraught_DMT.HasValue && ((this.TowageOnDepartureDraught_DMT.Value < 10) || (this.TowageOnDepartureDraught_DMT.Value > 200)))
|
||||||
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Check draught on departure", null, this.Title, this.Identifier, this.Tablename));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace bsmd.database
|
|||||||
[ShowReport]
|
[ShowReport]
|
||||||
[MaxLength(70)]
|
[MaxLength(70)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
[Validation(ValidationCode.STRING_MAXLEN, 70)]
|
[Validation(ValidationCode.NOT_NULL_MAX_LEN, 70)]
|
||||||
public string TreatmentFacilityProviderName { get; set; }
|
public string TreatmentFacilityProviderName { get; set; }
|
||||||
|
|
||||||
public string Identifier { get; set; }
|
public string Identifier { get; set; }
|
||||||
|
|||||||
@ -347,6 +347,11 @@ namespace bsmd.database
|
|||||||
wasteReceived.Validate(errors, violations);
|
wasteReceived.Validate(errors, violations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(TreatmentFacilityProviderText.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "TreatmentFacilityProviderName empty", null, this.Title, this.IdentificationNumber, this.Tablename));
|
||||||
|
}
|
||||||
|
|
||||||
bool entryMissing = false;
|
bool entryMissing = false;
|
||||||
string missingType = "";
|
string missingType = "";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user