fixed some small import/export excel bugs
This commit is contained in:
parent
8c521d16a1
commit
f69b1656b7
@ -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>14</ApplicationRevision>
|
<ApplicationRevision>15</ApplicationRevision>
|
||||||
<ApplicationVersion>7.0.0.14</ApplicationVersion>
|
<ApplicationVersion>7.0.0.15</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@ -1184,7 +1184,6 @@ namespace ENI2.Excel
|
|||||||
if (waste.WasteType == 2313) waste.WasteType = 506;
|
if (waste.WasteType == 2313) waste.WasteType = 506;
|
||||||
if (waste.WasteType == 2309) waste.WasteType = 507;
|
if (waste.WasteType == 2309) waste.WasteType = 507;
|
||||||
if (waste.WasteType == 3000) waste.WasteType = 401;
|
if (waste.WasteType == 3000) waste.WasteType = 401;
|
||||||
if (waste.WasteType == 2600) waste.WasteType = 506;
|
|
||||||
|
|
||||||
// Waste description Spezialfälle für DK
|
// Waste description Spezialfälle für DK
|
||||||
waste.WasteDescription = reader.ReadText(wasteDescription);
|
waste.WasteDescription = reader.ReadText(wasteDescription);
|
||||||
@ -1301,7 +1300,7 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
wr.WasteCode = reader.ReadText(wtype); // hier muss immer was stehen, ist ein festes Beschreibungsfeld
|
wr.WasteCode = reader.ReadText(wtype); // hier muss immer was stehen, ist ein festes Beschreibungsfeld
|
||||||
wr.WasteDescription = reader.ReadText(wDescr);
|
wr.WasteDescription = reader.ReadText(wDescr);
|
||||||
if(wr.WasteDescription.IsNullOrEmpty())
|
if(wr.WasteDescription.IsNullOrEmpty() && (wr.WasteCode != null))
|
||||||
{
|
{
|
||||||
if (wr.WasteCode.Equals("999") || wr.WasteCode.Equals("201") || wr.WasteCode.Equals("202") || wr.WasteCode.Equals("203") ||
|
if (wr.WasteCode.Equals("999") || wr.WasteCode.Equals("201") || wr.WasteCode.Equals("202") || wr.WasteCode.Equals("203") ||
|
||||||
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
|
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
|
||||||
|
|||||||
@ -85,9 +85,9 @@ namespace ENI2.Excel
|
|||||||
case Message.NotificationClass.CREW:
|
case Message.NotificationClass.CREW:
|
||||||
this.WriteCREW(message, true, isRefSheet);
|
this.WriteCREW(message, true, isRefSheet);
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.CREWD:
|
//case Message.NotificationClass.CREWD: // XXX-TODO
|
||||||
this.WriteCREW(message, false, isRefSheet);
|
// this.WriteCREW(message, false, isRefSheet);
|
||||||
break;
|
// break;
|
||||||
case Message.NotificationClass.HAZA:
|
case Message.NotificationClass.HAZA:
|
||||||
this.WriteHAZ(message, true);
|
this.WriteHAZ(message, true);
|
||||||
break;
|
break;
|
||||||
@ -120,9 +120,9 @@ namespace ENI2.Excel
|
|||||||
case Message.NotificationClass.PAS:
|
case Message.NotificationClass.PAS:
|
||||||
this.WritePAS(message, true, isRefSheet);
|
this.WritePAS(message, true, isRefSheet);
|
||||||
break;
|
break;
|
||||||
case Message.NotificationClass.PASD:
|
//case Message.NotificationClass.PASD: // XXX - TODO
|
||||||
this.WritePAS(message, false, isRefSheet);
|
// this.WritePAS(message, false, isRefSheet);
|
||||||
break;
|
// break;
|
||||||
case Message.NotificationClass.POBA:
|
case Message.NotificationClass.POBA:
|
||||||
if (message.Elements[0] is POBA poba) this.WriteMessage(poba);
|
if (message.Elements[0] is POBA poba) this.WriteMessage(poba);
|
||||||
break;
|
break;
|
||||||
@ -387,11 +387,13 @@ namespace ENI2.Excel
|
|||||||
private void WriteCREW(Message crewMessage, bool isArrival, bool isRefSheet)
|
private void WriteCREW(Message crewMessage, bool isArrival, bool isRefSheet)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/* XXX - TODO
|
||||||
if (crewMessage.Elements.Count > 0)
|
if (crewMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
WriteBoolean(string.Format("CREW{0}.NotificationSchengen", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationSchengen);
|
WriteBoolean(string.Format("CREW{0}.NotificationSchengen", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationSchengen);
|
||||||
WriteBoolean(string.Format("CREW{0}.NotificationPAX", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationPAX);
|
WriteBoolean(string.Format("CREW{0}.NotificationPAX", isArrival ? "" : "D"), ((CREW)crewMessage.Elements[0]).NotificationPAX);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
for(int i = 0; i<Math.Min(crewMessage.NumberOfExcelRows, crewMessage.Elements.Count); i++)
|
for(int i = 0; i<Math.Min(crewMessage.NumberOfExcelRows, crewMessage.Elements.Count); i++)
|
||||||
{
|
{
|
||||||
@ -432,7 +434,7 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!crew.CrewMemberIdentityDocumentIssuingState.Equals("XX"))
|
if(!crew.CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && !crew.CrewMemberIdentityDocumentIssuingState.Equals("XX"))
|
||||||
WriteText(crewIssuingState, crew.CrewMemberIdentityDocumentIssuingState);
|
WriteText(crewIssuingState, crew.CrewMemberIdentityDocumentIssuingState);
|
||||||
}
|
}
|
||||||
if(isRefSheet)
|
if(isRefSheet)
|
||||||
@ -795,11 +797,13 @@ namespace ENI2.Excel
|
|||||||
|
|
||||||
private void WritePAS(Message pasMessage, bool isArrival, bool isRefSheet)
|
private void WritePAS(Message pasMessage, bool isArrival, bool isRefSheet)
|
||||||
{
|
{
|
||||||
|
/* XXX - TODO
|
||||||
if(pasMessage.Elements.Count > 0)
|
if(pasMessage.Elements.Count > 0)
|
||||||
{
|
{
|
||||||
WriteBoolean(string.Format("PAS{0}.NotificationSchengen", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationSchengen);
|
WriteBoolean(string.Format("PAS{0}.NotificationSchengen", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationSchengen);
|
||||||
WriteBoolean(string.Format("PAS{0}.NotificationPAX", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationPAX);
|
WriteBoolean(string.Format("PAS{0}.NotificationPAX", isArrival ? "" : "D"), ((PAS)pasMessage.Elements[0]).NotificationPAX);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
for(int i = 0; i < Math.Min(pasMessage.NumberOfExcelRows, pasMessage.Elements.Count); i++)
|
for(int i = 0; i < Math.Min(pasMessage.NumberOfExcelRows, pasMessage.Elements.Count); i++)
|
||||||
{
|
{
|
||||||
@ -845,7 +849,7 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!pas.PassengerIdentityDocumentIssuingState.Equals("XX"))
|
if(!pas.PassengerIdentityDocumentIssuingState.IsNullOrEmpty() && !pas.PassengerIdentityDocumentIssuingState.Equals("XX"))
|
||||||
WriteText(pasIssuing, pas.PassengerIdentityDocumentIssuingState);
|
WriteText(pasIssuing, pas.PassengerIdentityDocumentIssuingState);
|
||||||
}
|
}
|
||||||
if (isRefSheet)
|
if (isRefSheet)
|
||||||
@ -1292,7 +1296,7 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
if(gender.HasValue)
|
if(gender.HasValue)
|
||||||
{
|
{
|
||||||
if (gender == 0) WriteText(label, "?");
|
if (gender == 0) WriteText(label, "not known");
|
||||||
if (gender == 1) WriteText(label, "m");
|
if (gender == 1) WriteText(label, "m");
|
||||||
if (gender == 2) WriteText(label, "f");
|
if (gender == 2) WriteText(label, "f");
|
||||||
if (gender == 9) WriteText(label, "d");
|
if (gender == 9) WriteText(label, "d");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user