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>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>1</ApplicationRevision>
|
<ApplicationRevision>1</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.6.1</ApplicationVersion>
|
<ApplicationVersion>7.2.6.2</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@ -2871,35 +2871,38 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
else // we cannot find whatever this is..
|
else // we cannot find whatever this is..
|
||||||
{
|
{
|
||||||
FixImportDialog fid = new FixImportDialog();
|
if (setPlaceHolder) // only show import dialog if this is a required field..
|
||||||
fid.Value = nationality;
|
|
||||||
fid.ValueType = "Nationality";
|
|
||||||
fid.SelectionValues = CREW.NationalityDict;
|
|
||||||
if (fid.ShowDialog() ?? false)
|
|
||||||
{
|
{
|
||||||
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;
|
if (!ValueMapping.InvalidKeys[ValueMapping.MappingType.COUNTRY].Contains(nationality))
|
||||||
Task<bool> createResult = Task.Run(async () => await ValueMapping.Create(ValueMapping.MappingType.COUNTRY, nationality, selectedValue));
|
{
|
||||||
if(!createResult.Result)
|
string selectedValue = fid.SelectedValue;
|
||||||
_log.WarnFormat("Error saving nationality value mapping {0} -> {1}", nationality, 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
|
||||||
else
|
{
|
||||||
{
|
canceled = true;
|
||||||
canceled = true;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,12 +43,11 @@ namespace bsmd.database
|
|||||||
public string CrewMemberFirstName { get; set; }
|
public string CrewMemberFirstName { get; set; }
|
||||||
|
|
||||||
[ShowReport]
|
[ShowReport]
|
||||||
[ReportDisplayName("Place of birth")]
|
[ReportDisplayName("Place of birth")]
|
||||||
[MaxLength(100)]
|
[MaxLength(100)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public string CrewMemberPlaceOfBirth { get; set; }
|
public string CrewMemberPlaceOfBirth { get; set; }
|
||||||
|
|
||||||
[Validation(ValidationCode.FLAG_CODE)]
|
|
||||||
[MaxLength(2)]
|
[MaxLength(2)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public string CrewMemberCountryOfBirth { get; set; }
|
public string CrewMemberCountryOfBirth { get; set; }
|
||||||
@ -82,7 +81,7 @@ namespace bsmd.database
|
|||||||
[MaxLength(2)]
|
[MaxLength(2)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public string CrewMemberNationality { get; set; }
|
public string CrewMemberNationality { get; set; }
|
||||||
|
|
||||||
[Validation(ValidationCode.NOT_NULL)]
|
[Validation(ValidationCode.NOT_NULL)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public byte? CrewMemberIdentityDocumentType { get; set; }
|
public byte? CrewMemberIdentityDocumentType { get; set; }
|
||||||
@ -121,7 +120,7 @@ namespace bsmd.database
|
|||||||
[MaxLength(2)]
|
[MaxLength(2)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public string CrewMemberIdentityDocumentIssuingState { get; set; }
|
public string CrewMemberIdentityDocumentIssuingState { get; set; }
|
||||||
|
|
||||||
[Validation(ValidationCode.PAST_DATE)]
|
[Validation(ValidationCode.PAST_DATE)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public DateTime? CrewMemberIdentityDocumentExpiryDate { get; set; }
|
public DateTime? CrewMemberIdentityDocumentExpiryDate { get; set; }
|
||||||
@ -324,12 +323,12 @@ namespace bsmd.database
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value > DateTime.Today))
|
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value > DateTime.Today))
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.IsDeparture ? "CREWD" : "CREWA"));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.IsDeparture ? "CREWD" : "CREWA"));
|
||||||
|
|
||||||
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value <= CLAMPMINDATE))
|
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value <= CLAMPMINDATE))
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.IsDeparture ? "CREWD" : "CREWA"));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.IsDeparture ? "CREWD" : "CREWA"));
|
||||||
|
|
||||||
// NSW 7.2 rules
|
// NSW 7.2 rules
|
||||||
|
|
||||||
if((this.NotificationSchengen ?? false) && (!this.HasSchengenDetails))
|
if((this.NotificationSchengen ?? false) && (!this.HasSchengenDetails))
|
||||||
{
|
{
|
||||||
@ -382,14 +381,14 @@ namespace bsmd.database
|
|||||||
row[5] = crew.CrewMemberGender ?? (object)DBNull.Value;
|
row[5] = crew.CrewMemberGender ?? (object)DBNull.Value;
|
||||||
if (crew.CrewMemberNationality?.Length == 2)
|
if (crew.CrewMemberNationality?.Length == 2)
|
||||||
row[6] = crew.CrewMemberNationality;
|
row[6] = crew.CrewMemberNationality;
|
||||||
else
|
else
|
||||||
row[6] = DBNull.Value;
|
row[6] = DBNull.Value;
|
||||||
row[7] = crew.CrewMemberIdentityDocumentType ?? (object)DBNull.Value;
|
row[7] = crew.CrewMemberIdentityDocumentType ?? (object)DBNull.Value;
|
||||||
row[8] = crew.CrewMemberIdentityDocumentId ?? (object)DBNull.Value;
|
row[8] = crew.CrewMemberIdentityDocumentId ?? (object)DBNull.Value;
|
||||||
row[9] = crew.CrewMemberVisaNumber ?? (object)DBNull.Value;
|
row[9] = crew.CrewMemberVisaNumber ?? (object)DBNull.Value;
|
||||||
row[10] = crew.CrewMemberDuty ?? (object)DBNull.Value;
|
row[10] = crew.CrewMemberDuty ?? (object)DBNull.Value;
|
||||||
row[11] = crew.Identifier ?? (object)DBNull.Value;
|
row[11] = crew.Identifier ?? (object)DBNull.Value;
|
||||||
row[12] = crew.IsDeparture;
|
row[12] = crew.IsDeparture;
|
||||||
if (crew.CrewMemberIdentityDocumentIssuingState?.Length == 2)
|
if (crew.CrewMemberIdentityDocumentIssuingState?.Length == 2)
|
||||||
row[13] = crew.CrewMemberIdentityDocumentIssuingState;
|
row[13] = crew.CrewMemberIdentityDocumentIssuingState;
|
||||||
else
|
else
|
||||||
@ -448,7 +447,7 @@ namespace bsmd.database
|
|||||||
this.CrewMemberIdentityDocumentType = crew.CrewMemberIdentityDocumentType;
|
this.CrewMemberIdentityDocumentType = crew.CrewMemberIdentityDocumentType;
|
||||||
this.CrewMemberIdentityDocumentId = crew.CrewMemberIdentityDocumentId;
|
this.CrewMemberIdentityDocumentId = crew.CrewMemberIdentityDocumentId;
|
||||||
this.CrewMemberVisaNumber = crew.CrewMemberVisaNumber;
|
this.CrewMemberVisaNumber = crew.CrewMemberVisaNumber;
|
||||||
this.CrewMemberDuty = crew.CrewMemberDuty;
|
this.CrewMemberDuty = crew.CrewMemberDuty;
|
||||||
this.CrewMemberIdentityDocumentIssuingState = crew.CrewMemberIdentityDocumentIssuingState;
|
this.CrewMemberIdentityDocumentIssuingState = crew.CrewMemberIdentityDocumentIssuingState;
|
||||||
this.CrewMemberIdentityDocumentExpiryDate = crew.CrewMemberIdentityDocumentExpiryDate;
|
this.CrewMemberIdentityDocumentExpiryDate = crew.CrewMemberIdentityDocumentExpiryDate;
|
||||||
this.Effects = crew.Effects;
|
this.Effects = crew.Effects;
|
||||||
@ -462,7 +461,7 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public static CREW CreateCommon(List<CREW> crewList)
|
public static CREW CreateCommon(List<CREW> crewList)
|
||||||
{
|
{
|
||||||
CREW crew = new CREW(); // template entity
|
CREW crew = new CREW(); // template entity
|
||||||
|
|
||||||
if(crewList.IsNullOrEmpty())
|
if(crewList.IsNullOrEmpty())
|
||||||
return crew;
|
return crew;
|
||||||
|
|||||||
@ -268,7 +268,7 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(this.Quantity_KGM >= 1000000000)
|
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) &&
|
if (this.FlashpointInformation.HasValue && (this.FlashpointInformation.Value == 2) &&
|
||||||
this.Flashpoint_CEL.IsNullOrEmpty())
|
this.Flashpoint_CEL.IsNullOrEmpty())
|
||||||
|
|||||||
@ -202,7 +202,7 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(this.Quantity_KGM >= 1000000000)
|
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))
|
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"));
|
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) ||
|
if((this.NetQuantity_KGM >= 1000000000) ||
|
||||||
(this.GrossQuantity_KGM >= 1000000000) ||
|
(this.GrossQuantity_KGM >= 1000000000) ||
|
||||||
(this.Volume_MTQ >= 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)
|
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
|
||||||
|
|||||||
@ -236,7 +236,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.Quantity_KGM >= 1000000000)
|
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)
|
if (!MHB ?? false)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -189,7 +189,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.Quantity_KGM >= 1000000000)
|
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) &&
|
if (this.FlashpointInformation.HasValue && (this.FlashpointInformation.Value == 2) &&
|
||||||
this.Flashpoint_CEL.IsNullOrEmpty())
|
this.Flashpoint_CEL.IsNullOrEmpty())
|
||||||
|
|||||||
@ -149,8 +149,7 @@ namespace bsmd.database
|
|||||||
|
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public bool? NotificationPAX { get; set; }
|
public bool? NotificationPAX { get; set; }
|
||||||
|
|
||||||
[Validation(ValidationCode.FLAG_CODE)]
|
|
||||||
[MaxLength(2)]
|
[MaxLength(2)]
|
||||||
[ENI2Validation]
|
[ENI2Validation]
|
||||||
public string PassengerCountryOfBirth { get; set; }
|
public string PassengerCountryOfBirth { get; set; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user