Case-independent lookup of Nationality in dictionary (some have lower case..)
This commit is contained in:
parent
f639241e43
commit
d3ded290f5
@ -2265,18 +2265,18 @@ namespace ENI2.Excel
|
||||
pas.IsDeparture = true;
|
||||
pas.NotificationSchengen = notificationSchengen;
|
||||
pas.NotificationPAX = notificationPax;
|
||||
pas.PassengerLastName = lastName;
|
||||
pas.PassengerFirstName = reader.ReadText(pasFirstName);
|
||||
pas.PassengerLastName = lastName;
|
||||
pas.PassengerFirstName = reader.ReadText(pasFirstName);
|
||||
pas.PassengerGender = reader.ReadGender(pasGender);
|
||||
pas.PassengerNationality = reader.ReadNationality(pasNationality);
|
||||
pas.PassengerNationality = reader.ReadNationality(pasNationality);
|
||||
// TODO: Nicht klar ob hier LOCODEs kommen oder nicht
|
||||
pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation);
|
||||
pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation);
|
||||
pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation);
|
||||
pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation);
|
||||
pas.PassengerInTransit = reader.ReadBoolean(pasTransit);
|
||||
pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth);
|
||||
pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth);
|
||||
pas.PassengerDateOfBirth = reader.ReadBirthDate(pasDateOfBirth);
|
||||
pas.PassengerIdentityDocumentType = reader.ReadIdentityDocumentType(pasIdentDocType);
|
||||
pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId);
|
||||
pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId);
|
||||
pas.PassengerVisaNumber = reader.ReadText(pasVisaNo);
|
||||
pas.PassengerIdentityDocumentIssuingState = reader.ReadNationality(pasIssuing);
|
||||
pas.PassengerIdentityDocumentExpiryDate = reader.ReadDate(pasExpiryDate);
|
||||
@ -2481,11 +2481,16 @@ namespace ENI2.Excel
|
||||
public static string ReadNationality(string nationality)
|
||||
{
|
||||
string result = null;
|
||||
nationality = nationality.Trim();
|
||||
|
||||
if(CREW.NationalityDict.ContainsKey(nationality))
|
||||
{
|
||||
result = nationality;
|
||||
}
|
||||
else if(CREW.NationalityDict.ContainsKey(nationality.ToUpper()))
|
||||
{
|
||||
result = CREW.NationalityDict[nationality.ToUpper()];
|
||||
}
|
||||
else if(_countryImportDict.ContainsKey(nationality))
|
||||
{
|
||||
result = _countryImportDict[nationality];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user