truncate effects column
This commit is contained in:
parent
70bda5ee1d
commit
bd1931b134
@ -2111,7 +2111,10 @@ namespace ENI2.Excel
|
|||||||
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
|
if (!crew.CrewMemberIdentityDocumentExpiryDate.HasValue && isOldVersion)
|
||||||
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
|
||||||
|
|
||||||
crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
|
crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
|
||||||
|
if (crew.Effects.Length > 256)
|
||||||
|
crew.Effects = crew.Effects.Substring(0, 256);
|
||||||
|
|
||||||
|
|
||||||
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
Util.UIHelper.SetBusyState(); // dialog might reset busy state
|
||||||
}
|
}
|
||||||
@ -2543,13 +2546,13 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
result = "XX";
|
result = "XX";
|
||||||
}
|
}
|
||||||
else if(CREW.NationalityDict.ContainsKey(nationality.ToUpper()))
|
else if(CREW.NationalityDict.ContainsKey(nationality.ToUpper())) // is it already a key
|
||||||
{
|
{
|
||||||
result = nationality.ToUpper();
|
result = nationality.ToUpper();
|
||||||
}
|
}
|
||||||
else if(CREW.NationalityDict.ContainsKey(nationality.ToUpper()))
|
else if(CREW.NationalityDict.ContainsValue(nationality.ToUpper()))
|
||||||
{
|
{
|
||||||
result = CREW.NationalityDict[nationality.ToUpper()];
|
result = CREW.NationalityDict.FirstOrDefault(x => x.Value.Substring(3).Equals(nationality, StringComparison.OrdinalIgnoreCase)).Key;
|
||||||
}
|
}
|
||||||
else if(_countryImportDict.ContainsKey(nationality))
|
else if(_countryImportDict.ContainsKey(nationality))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user