Adjust document expiry date to 31.12.2100 for all PAS/CREW if date cannot be read
This commit is contained in:
parent
3743b55ef6
commit
a4c340c2ec
@ -2147,7 +2147,7 @@ namespace ENI2.Excel
|
|||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
|
if (crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && isOldVersion)
|
||||||
crew.CrewMemberIdentityDocumentIssuingState = "XX";
|
crew.CrewMemberIdentityDocumentIssuingState = "XX";
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18));
|
crew.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
||||||
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
|
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
@ -2263,7 +2263,7 @@ namespace ENI2.Excel
|
|||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
if (crewd.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty())
|
if (crewd.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty())
|
||||||
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
||||||
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18));
|
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142), 256);
|
crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142), 256);
|
||||||
|
|
||||||
@ -2523,7 +2523,7 @@ namespace ENI2.Excel
|
|||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 18), 100);
|
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 18), 100);
|
||||||
|
|
||||||
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 18));
|
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 18)) ?? (DateTime?)new DateTime(2100, 12, 31); ;
|
||||||
|
|
||||||
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 18), 100);
|
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 18), 100);
|
||||||
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 18), 255);
|
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 18), 255);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user