diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index f31cb009..79c37d90 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 1
- 7.2.2.1
+ 2
+ 7.2.2.2
false
true
true
diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs
index e9611a0a..05c2e022 100644
--- a/ENI2/Excel/ExcelUtil.cs
+++ b/ENI2/Excel/ExcelUtil.cs
@@ -2257,7 +2257,7 @@ namespace ENI2.Excel
{
for (int i = 0; i < 5000; i++)
{
- string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 13));
+ string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 14));
if (lastName.IsNullOrEmpty()) break;
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
@@ -2273,24 +2273,24 @@ namespace ENI2.Excel
crewd.NotificationPAX = false;
crewd.CrewMemberLastName = lastName;
- crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 13));
+ crewd.CrewMemberFirstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 14));
- crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 13)), out bool canceled);
+ crewd.CrewMemberGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 14)), out bool canceled);
if (canceled) return true;
- crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 13));
- crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 13)), out canceled);
+ crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 14));
+ crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 14)), out canceled);
if (canceled) return true;
- crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 13));
- crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", i + 13));
+ crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 14));
+ crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", i + 14));
- crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 13)), out canceled);
+ crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 14)), 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));
+ crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 14));
+ crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 14));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
}
@@ -2519,8 +2519,64 @@ namespace ENI2.Excel
{
foreach (PASD pasd in newPasList.Cast())
pasd.NotificationPAX = mustPAX;
- }
- }
+ }
+ }
+ else
+ {
+ sheetTitle = "8. PAX - Departure"; // altes Excel Format
+ if (reader.HasWorksheetNamed(sheetTitle))
+ {
+ for (int i = 0; i < 5000; i++)
+ {
+ string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 14));
+ string firstName = reader.ReadCellAsText(sheetTitle, string.Format("D{0}", i + 14));
+ if (lastName.IsNullOrEmpty() && firstName.IsNullOrEmpty()) break; // finish after reading last row
+
+ PASD pas = new PASD();
+ pas.Identifier = (i + 1).ToString();
+ pas.MessageHeader = pasMessage;
+ pas.IsDeparture = true;
+ newPasList.Add(pas);
+
+ pas.NotificationSchengen = true;
+ pas.NotificationPAX = false;
+
+ pas.PassengerLastName = lastName;
+ pas.PassengerFirstName = firstName;
+
+ pas.PassengerNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 14)), out bool canceled);
+ if (canceled) return true;
+
+ pas.PassengerGender = ReadGender(reader.ReadCellAsText(sheetTitle, string.Format("E{0}", i + 14)), out canceled);
+ if (canceled) return true;
+ pas.PassengerPortOfEmbarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 14)), out canceled);
+ if (canceled) return true;
+ pas.PassengerPortOfDisembarkation = ReadLocode(reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 14)), out canceled);
+ if (canceled) return true;
+
+ pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("I{0}", i + 14));
+ pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 14));
+
+ DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("K{0}", i + 14));
+ pas.PassengerDateOfBirth = dateOfBirth;
+
+ pas.PassengerIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 14)), out canceled);
+ if (canceled) return true;
+ pas.PassengerIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("M{0}", i + 14));
+ pas.PassengerIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
+ pas.PassengerIdentityDocumentIssuingState = "XX";
+
+ pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("N{0}", i + 14));
+
+ Util.UIHelper.SetBusyState(); // dialog might reset busy state
+ }
+ }
+
+ else
+ {
+ return false;
+ }
+ }
DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id);
pasMessage.Elements.Clear();