added some validation rules for 7.1
This commit is contained in:
parent
51efad579d
commit
e3c09c6160
@ -649,7 +649,7 @@ namespace ENI2
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.SUSPENDED;
|
||||
aMessage.ChangedBy = "";
|
||||
aMessage.StatusInfo = string.Format("Validation error: NOA_NOD must be sent before ATA");
|
||||
aMessage.StatusInfo = string.Format("Validation error 142: NOA_NOD must be sent before ATA");
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(aMessage);
|
||||
}
|
||||
}
|
||||
@ -660,7 +660,7 @@ namespace ENI2
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.SUSPENDED;
|
||||
aMessage.ChangedBy = "";
|
||||
aMessage.StatusInfo = string.Format("Validation error: NOA_NOD must be sent before ATD");
|
||||
aMessage.StatusInfo = string.Format("Validation error 142: NOA_NOD must be sent before ATD");
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(aMessage);
|
||||
}
|
||||
|
||||
@ -668,7 +668,7 @@ namespace ENI2
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.SUSPENDED;
|
||||
aMessage.ChangedBy = "";
|
||||
aMessage.StatusInfo = string.Format("Validation error: ATA must be sent before ATD");
|
||||
aMessage.StatusInfo = string.Format("Validation error 143: ATA must be sent before ATD");
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(aMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,8 +270,8 @@ namespace bsmd.database
|
||||
// NSW 7.1 ETDFromLastPort Pflichtfeld, wenn LastPort != ZZUKN
|
||||
if(!this.LastPort.IsNullOrEmpty() && !this.LastPort.Equals("ZZUKN") && !this.ETDFromLastPort.HasValue)
|
||||
{
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.E125, "ETDFromLastPort missing", "", this.Title, null, this.Tablename));
|
||||
}
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.E125, "ETDFromLastPort must be provided for a given last port", "", this.Title, null, this.Tablename));
|
||||
}
|
||||
if((this.ETDFromLastPort < DateTime.Now.AddDays(-14)) || (this.ETDFromLastPort.HasValue && this.ETDFromLastPort.Value.ToLocalTime().IsTimeEmpty()))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
|
||||
|
||||
@ -58,6 +58,7 @@ namespace bsmd.database
|
||||
E123 = 123,
|
||||
E124 = 124,
|
||||
E125 = 125,
|
||||
E222 = 222,
|
||||
V201 = 201,
|
||||
V202,
|
||||
V203,
|
||||
@ -82,7 +83,7 @@ namespace bsmd.database
|
||||
V782 = 782,
|
||||
V783 = 783,
|
||||
V784 = 784,
|
||||
V786 = 786,
|
||||
V786 = 786, // not used any more (7.1)
|
||||
V801 = 801,
|
||||
V802 = 802,
|
||||
V803 = 803,
|
||||
|
||||
@ -107,7 +107,7 @@ namespace bsmd.database
|
||||
public bool? WasteDisposalValidExemption { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.LOCODE_SSN)]
|
||||
[Validation2(ValidationCode.LOCODE_SSN)]
|
||||
[MaxLength(5)]
|
||||
[ENI2Validation]
|
||||
public string LastWasteDisposalPort { get; set; }
|
||||
|
||||
@ -351,7 +351,7 @@ namespace bsmd.database
|
||||
string missingType = "";
|
||||
|
||||
foreach (string wasteCodeString in WAS.WasteCodes)
|
||||
{
|
||||
{
|
||||
bool codeFound = false;
|
||||
foreach (WasteReceived wr in this.WasteReceived)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user