treat CREWA/D PASA/D the same on excel import for lastname and IdentityDocumentExpiryDate
This commit is contained in:
parent
fadc975b83
commit
d4db41de2c
@ -2227,7 +2227,8 @@ namespace ENI2.Excel
|
|||||||
for (int i = 0; i < 5000; i++)
|
for (int i = 0; i < 5000; i++)
|
||||||
{
|
{
|
||||||
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
|
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 18), 100);
|
||||||
if (lastName.IsNullOrEmpty()) break;
|
string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
|
||||||
|
if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break;
|
||||||
|
|
||||||
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
||||||
{
|
{
|
||||||
@ -2241,7 +2242,7 @@ namespace ENI2.Excel
|
|||||||
crewd.NotificationSchengen = true;
|
crewd.NotificationSchengen = true;
|
||||||
crewd.NotificationPAX = notificationPax ?? false;
|
crewd.NotificationPAX = notificationPax ?? false;
|
||||||
crewd.CrewMemberLastName = lastName;
|
crewd.CrewMemberLastName = lastName;
|
||||||
crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 18), 100);
|
crewd.CrewMemberFirstName = firstName;
|
||||||
|
|
||||||
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
|
crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 18)), out bool canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
@ -2262,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)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
crewd.CrewMemberIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("N{0}", i + 18));
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
@ -2522,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)) ?? (DateTime?)new DateTime(2100, 12, 31);
|
pas.PassengerIdentityDocumentExpiryDate = reader.ReadCellAsDateTime(sheetTitle, string.Format("P{0}", i + 18));
|
||||||
|
|
||||||
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