Fixed test comments and bumped version to 7.2.6.2

This commit is contained in:
Daniel Schick 2025-01-30 07:44:14 +01:00
parent 0d80f6e514
commit 006a253fd7
9 changed files with 44 additions and 43 deletions

View File

@ -37,7 +37,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>7.2.6.1</ApplicationVersion>
<ApplicationVersion>7.2.6.2</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -2870,6 +2870,8 @@ namespace ENI2.Excel
result = ValueMapping.Dicts[ValueMapping.MappingType.COUNTRY][nationality].Value;
}
else // we cannot find whatever this is..
{
if (setPlaceHolder) // only show import dialog if this is a required field..
{
FixImportDialog fid = new FixImportDialog();
fid.Value = nationality;
@ -2879,11 +2881,11 @@ namespace ENI2.Excel
{
if (!fid.SelectedValue.IsNullOrEmpty())
{
if(!ValueMapping.InvalidKeys[ValueMapping.MappingType.COUNTRY].Contains(nationality))
if (!ValueMapping.InvalidKeys[ValueMapping.MappingType.COUNTRY].Contains(nationality))
{
string selectedValue = fid.SelectedValue;
Task<bool> createResult = Task.Run(async () => await ValueMapping.Create(ValueMapping.MappingType.COUNTRY, nationality, selectedValue));
if(!createResult.Result)
if (!createResult.Result)
_log.WarnFormat("Error saving nationality value mapping {0} -> {1}", nationality, selectedValue);
}
else
@ -2902,6 +2904,7 @@ namespace ENI2.Excel
canceled = true;
}
}
}
return result;
}

View File

@ -48,7 +48,6 @@ namespace bsmd.database
[ENI2Validation]
public string CrewMemberPlaceOfBirth { get; set; }
[Validation(ValidationCode.FLAG_CODE)]
[MaxLength(2)]
[ENI2Validation]
public string CrewMemberCountryOfBirth { get; set; }

View File

@ -268,7 +268,7 @@ namespace bsmd.database
{
if(this.Quantity_KGM >= 1000000000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
if (this.FlashpointInformation.HasValue && (this.FlashpointInformation.Value == 2) &&
this.Flashpoint_CEL.IsNullOrEmpty())

View File

@ -202,7 +202,7 @@ namespace bsmd.database
{
if(this.Quantity_KGM >= 1000000000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
if (!this.UNNumber.IsNullOrEmpty() && !unNumberRegex.IsMatch(this.UNNumber))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "UNNumber", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));

View File

@ -499,7 +499,7 @@ namespace bsmd.database
if((this.NetQuantity_KGM >= 1000000000) ||
(this.GrossQuantity_KGM >= 1000000000) ||
(this.Volume_MTQ >= 1000000000))
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)

View File

@ -236,7 +236,7 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if(this.Quantity_KGM >= 1000000000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
if (!MHB ?? false)
{

View File

@ -189,7 +189,7 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if (this.Quantity_KGM >= 1000000000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
if (this.FlashpointInformation.HasValue && (this.FlashpointInformation.Value == 2) &&
this.Flashpoint_CEL.IsNullOrEmpty())

View File

@ -150,7 +150,6 @@ namespace bsmd.database
[ENI2Validation]
public bool? NotificationPAX { get; set; }
[Validation(ValidationCode.FLAG_CODE)]
[MaxLength(2)]
[ENI2Validation]
public string PassengerCountryOfBirth { get; set; }