Defaults hinzugefügt für fehlende Felder im Excel import

This commit is contained in:
Daniel Schick 2022-12-15 07:26:23 +01:00
parent ee5884aa3f
commit f14e758c98

View File

@ -2153,6 +2153,8 @@ namespace ENI2.Excel
crew.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 13)), out canceled);
if (canceled) return true;
crew.CrewMemberIdentityDocumentIssuingState = "XX";
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crew.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 13));
crew.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 13));
@ -2222,6 +2224,8 @@ namespace ENI2.Excel
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crewd.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
}
}
else
@ -2256,9 +2260,13 @@ namespace ENI2.Excel
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 13)), out canceled);
if (canceled) return true;
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 13));
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 13));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
}
}
else
@ -2375,6 +2383,8 @@ namespace ENI2.Excel
pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 13)), out canceled);
if (canceled) return true;
pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 13));
pas.PassengerIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 13));
Util.UIHelper.SetBusyState(); // dialog might reset busy state