Fixed test comments and bumped version to 7.2.6.2
This commit is contained in:
parent
0d80f6e514
commit
006a253fd7
@ -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>
|
||||
|
||||
@ -2871,35 +2871,38 @@ namespace ENI2.Excel
|
||||
}
|
||||
else // we cannot find whatever this is..
|
||||
{
|
||||
FixImportDialog fid = new FixImportDialog();
|
||||
fid.Value = nationality;
|
||||
fid.ValueType = "Nationality";
|
||||
fid.SelectionValues = CREW.NationalityDict;
|
||||
if (fid.ShowDialog() ?? false)
|
||||
if (setPlaceHolder) // only show import dialog if this is a required field..
|
||||
{
|
||||
if (!fid.SelectedValue.IsNullOrEmpty())
|
||||
FixImportDialog fid = new FixImportDialog();
|
||||
fid.Value = nationality;
|
||||
fid.ValueType = "Nationality";
|
||||
fid.SelectionValues = CREW.NationalityDict;
|
||||
if (fid.ShowDialog() ?? false)
|
||||
{
|
||||
if(!ValueMapping.InvalidKeys[ValueMapping.MappingType.COUNTRY].Contains(nationality))
|
||||
if (!fid.SelectedValue.IsNullOrEmpty())
|
||||
{
|
||||
string selectedValue = fid.SelectedValue;
|
||||
Task<bool> createResult = Task.Run(async () => await ValueMapping.Create(ValueMapping.MappingType.COUNTRY, nationality, selectedValue));
|
||||
if(!createResult.Result)
|
||||
_log.WarnFormat("Error saving nationality value mapping {0} -> {1}", nationality, selectedValue);
|
||||
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)
|
||||
_log.WarnFormat("Error saving nationality value mapping {0} -> {1}", nationality, selectedValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
// add temporary
|
||||
ValueMapping vm = ValueMapping.Create(ValueMapping.MappingType.COUNTRY);
|
||||
vm.Key = nationality;
|
||||
vm.Value = fid.SelectedValue;
|
||||
ValueMapping.Dicts[ValueMapping.MappingType.COUNTRY].Add(nationality, vm);
|
||||
}
|
||||
result = fid.SelectedValue.Substring(0, 2); // attention manual entry
|
||||
}
|
||||
else
|
||||
{
|
||||
// add temporary
|
||||
ValueMapping vm = ValueMapping.Create(ValueMapping.MappingType.COUNTRY);
|
||||
vm.Key = nationality;
|
||||
vm.Value = fid.SelectedValue;
|
||||
ValueMapping.Dicts[ValueMapping.MappingType.COUNTRY].Add(nationality, vm);
|
||||
}
|
||||
result = fid.SelectedValue.Substring(0, 2); // attention manual entry
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
canceled = true;
|
||||
else
|
||||
{
|
||||
canceled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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; }
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -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"));
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -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; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user