CREWD und PASD wird jetzt auch im alten Format richtig gelesen
This commit is contained in:
parent
0adc7ab5c4
commit
b2af44895b
@ -36,8 +36,8 @@
|
|||||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>1</ApplicationRevision>
|
<ApplicationRevision>2</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.2.1</ApplicationVersion>
|
<ApplicationVersion>7.2.2.2</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@ -2257,7 +2257,7 @@ 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 + 13));
|
string lastName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", i + 14));
|
||||||
if (lastName.IsNullOrEmpty()) break;
|
if (lastName.IsNullOrEmpty()) break;
|
||||||
|
|
||||||
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
if (!(crewdMessage.GetSublistElementWithIdentifier((i + 1).ToString()) is CREWD crewd))
|
||||||
@ -2273,24 +2273,24 @@ namespace ENI2.Excel
|
|||||||
crewd.NotificationPAX = false;
|
crewd.NotificationPAX = false;
|
||||||
|
|
||||||
crewd.CrewMemberLastName = lastName;
|
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;
|
if (canceled) return true;
|
||||||
|
|
||||||
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 13));
|
crewd.CrewMemberDuty = reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 14));
|
||||||
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 13)), out canceled);
|
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("F{0}", i + 14)), out canceled);
|
||||||
if (canceled) return true;
|
if (canceled) return true;
|
||||||
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 13));
|
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 14));
|
||||||
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", i + 13));
|
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;
|
if (canceled) return true;
|
||||||
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
crewd.CrewMemberIdentityDocumentIssuingState = "XX";
|
||||||
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
crewd.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 13));
|
crewd.CrewMemberIdentityDocumentId = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 14));
|
||||||
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 13));
|
crewd.CrewMemberVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("L{0}", i + 14));
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
||||||
}
|
}
|
||||||
@ -2521,6 +2521,62 @@ namespace ENI2.Excel
|
|||||||
pasd.NotificationPAX = mustPAX;
|
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);
|
DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id);
|
||||||
pasMessage.Elements.Clear();
|
pasMessage.Elements.Clear();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user