diff --git a/ENI-2/ENI2/ENI2/App.config b/ENI-2/ENI2/ENI2/App.config
index fdca3b66..7daab5b1 100644
--- a/ENI-2/ENI2/ENI2/App.config
+++ b/ENI-2/ENI2/ENI2/App.config
@@ -26,12 +26,12 @@
1000
- http://192.168.2.24/LockingService/LockingService.svc
-
+
+ http://heupferd/bsmd.LockingService/LockingService.svc
- Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false
-
+
+ Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index ab5f3637..95be9d00 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,7 +35,7 @@
true
publish.html
0
- 6.2.0.%2a
+ 6.2.1.%2a
false
true
true
diff --git a/ENI-2/ENI2/ENI2/LocalizedLookup.cs b/ENI-2/ENI2/ENI2/LocalizedLookup.cs
index ca8c46a1..2e468bae 100644
--- a/ENI-2/ENI2/ENI2/LocalizedLookup.cs
+++ b/ENI-2/ENI2/ENI2/LocalizedLookup.cs
@@ -91,8 +91,8 @@ namespace ENI2
string name = null;
if (!reader.IsDBNull(0)) code = reader.GetString(0);
if (!reader.IsDBNull(1)) name = reader.GetString(1);
- if((code != null) && (name != null))
- result[code] = string.Format("{0} {1}", code, name);
+ if ((code != null) && (name != null))
+ result[code] = name; // string.Format("{0} {1}", code, name);
}
reader.Close();
return result;
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index f5dc69ff..8f46617a 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.ReportGenerator/App.config b/nsw/Source/bsmd.ReportGenerator/App.config
index d40bb9be..a8a4c6c1 100644
--- a/nsw/Source/bsmd.ReportGenerator/App.config
+++ b/nsw/Source/bsmd.ReportGenerator/App.config
@@ -11,10 +11,10 @@
- replace me!
+ Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
-
+ E:\temp>
300
@@ -43,7 +43,7 @@
donotreply@bsmd.de
-
+ E:\svnlager\BSMD\nsw\Source\misc\EUREPORT.png
False
diff --git a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
index 0f5f4ba1..fb351427 100644
--- a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
+++ b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
@@ -86,7 +86,7 @@ namespace bsmd.ReportGenerator
MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, migraTempFile);
// TODO Test font embedding (-> filesize!)
- PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.None);
+ PdfDocumentRenderer renderer = new PdfDocumentRenderer(true);
renderer.Document = document;
renderer.RenderDocument();
@@ -281,10 +281,10 @@ namespace bsmd.ReportGenerator
Column col = table.AddColumn(90); // die Bildspalte
col.Format.Alignment = ParagraphAlignment.Center;
- col = table.AddColumn(70);
- col = table.AddColumn(140);
- col = table.AddColumn(60);
- col = table.AddColumn(140);
+ table.AddColumn(70);
+ table.AddColumn(140);
+ table.AddColumn(60);
+ table.AddColumn(140);
Row row = table.AddRow();
Image logoImage = row.Cells[0].AddImage(Properties.Settings.Default.LogoPath);
@@ -438,6 +438,42 @@ namespace bsmd.ReportGenerator
#endregion
+ #region Einzelne Seite in Landscape für TOWA Meldung
+
+ if ((message != null) && (message.MessageNotificationClass == Message.NotificationClass.TOWA))
+ {
+ // Landscape!
+ BSMDDocument.DefineContentSection(document, Orientation.Landscape, false);
+
+ document.LastSection.AddParagraph(BSMDDocument.ReplaceTitle(messageParagraph.Title), "Heading2");
+ document.LastSection.AddParagraph(BSMDDocument.ReplaceTitle(messageParagraph.Subtitle), "Heading3");
+
+ BSMDDocument.CreateTOWATable(document, message);
+
+ BSMDDocument.DefineContentSection(document, Orientation.Portrait, false);
+ return;
+ }
+
+ #endregion
+
+ #region Einzelne Seite in Landscape für TOWD Meldung
+
+ if ((message != null) && (message.MessageNotificationClass == Message.NotificationClass.TOWD))
+ {
+ // Landscape!
+ BSMDDocument.DefineContentSection(document, Orientation.Landscape, false);
+
+ document.LastSection.AddParagraph(BSMDDocument.ReplaceTitle(messageParagraph.Title), "Heading2");
+ document.LastSection.AddParagraph(BSMDDocument.ReplaceTitle(messageParagraph.Subtitle), "Heading3");
+
+ BSMDDocument.CreateTOWDTable(document, message);
+
+ BSMDDocument.DefineContentSection(document, Orientation.Portrait, false);
+ return;
+ }
+
+ #endregion
+
document.LastSection.AddParagraph(BSMDDocument.ReplaceTitle(messageParagraph.Title), "Heading2");
document.LastSection.AddParagraph(BSMDDocument.ReplaceTitle(messageParagraph.Subtitle), "Heading3");
@@ -489,22 +525,34 @@ namespace bsmd.ReportGenerator
if((message != null) && (message.MessageNotificationClass == Message.NotificationClass.SEC))
{
BSMDDocument.CreateLast10PortFacilitiesTable(document, message);
+ BSMDDocument.CreateShip2ShipActivitiesTable(document, message);
return;
}
#endregion
+ #region BPOL
+
+ if((message != null) && (message.MessageNotificationClass == Message.NotificationClass.BPOL))
+ {
+ BSMDDocument.CreatePortOfItineraryTable(document, message);
+ }
+
+ #endregion
+
#region MDH
- if((message != null) && (message.MessageNotificationClass == Message.NotificationClass.MDH))
+ if ((message != null) && (message.MessageNotificationClass == Message.NotificationClass.MDH))
{
- BSMDDocument.CreatePoCLast30DaysTable(document, message);
+ BSMDDocument.CreateSanitaryMeasuresTable(document, message);
+ BSMDDocument.CreateInfectedAreaTable(document, message);
+ BSMDDocument.CreatePoCLast30DaysTable(document, message);
return;
}
#endregion
- #region Child paragraphs (1:n message CREW, PAS,..)
+ #region Child paragraphs (untergeordnete Tabellen..)
if (messageParagraph.ChildParagraphs != null)
{
@@ -686,10 +734,78 @@ namespace bsmd.ReportGenerator
}
}
+ private static void CreateSanitaryMeasuresTable(Document document, Message message)
+ {
+ MDH mdh = message.Elements[0] as MDH;
+ if(mdh.SanitaryMeasuresApplied ?? false)
+ {
+ document.LastSection.AddParagraph("Sanitary measures", "Heading3");
+ Table table = document.LastSection.AddTable();
+ table.Rows.VerticalAlignment = VerticalAlignment.Center;
+ table.Borders.Visible = true;
+
+ Column column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(0.8);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(3);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1.5);
+
+ Row hRow = table.AddRow();
+ hRow.Cells[1].AddParagraph("Type");
+ hRow.Cells[2].AddParagraph("Location");
+ hRow.Cells[3].AddParagraph("Date");
+
+ for (int i = 0; i < mdh.SanitaryMeasuresDetails.Count; i++)
+ {
+ Row row = table.AddRow();
+ row.Cells[0].AddParagraph(mdh.SanitaryMeasuresDetails[i].Identifier);
+ row.Cells[1].AddParagraph(mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresType);
+ row.Cells[2].AddParagraph(mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresLocation);
+ row.Cells[3].AddParagraph(mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate.HasValue ? mdh.SanitaryMeasuresDetails[i].SanitaryMeasuresDate.Value.ToShortDateString() : "");
+ }
+ }
+ }
+
+ private static void CreateInfectedAreaTable(Document document, Message message)
+ {
+ MDH mdh = message.Elements[0] as MDH;
+ if (mdh.InfectedAreaVisited ?? false)
+ {
+ document.LastSection.AddParagraph("Infected areas", "Heading3");
+ Table table = document.LastSection.AddTable();
+ table.Rows.VerticalAlignment = VerticalAlignment.Center;
+ table.Borders.Visible = true;
+
+ Column column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(0.8);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(3);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+
+ Row hRow = table.AddRow();
+ hRow.Cells[1].AddParagraph("Port");
+ hRow.Cells[2].AddParagraph("Date");
+
+ for (int i = 0; i < mdh.InfectedAreas.Count; i++)
+ {
+ Row row = table.AddRow();
+ row.Cells[0].AddParagraph(mdh.InfectedAreas[i].Identifier);
+ row.Cells[1].AddParagraph(mdh.InfectedAreas[i].InfectedAreaPort);
+ row.Cells[2].AddParagraph(mdh.InfectedAreas[i].InfectedAreaDate.HasValue ? mdh.InfectedAreas[i].InfectedAreaDate.Value.ToShortDateString() : "");
+ }
+ }
+ }
+
+
private static void SetPoCLast30Days(PortOfCallLast30Days portOfCallLast30Days, Row row)
{
row.Cells[0].AddParagraph(portOfCallLast30Days.Identifier);
- row.Cells[1].AddParagraph(portOfCallLast30Days.PortOfCallLast30DaysLocode ?? "");
+
+ row.Cells[1].AddParagraph(LocodeDB.LocationNameFromLocode(portOfCallLast30Days.PortOfCallLast30DaysLocode) ?? "");
row.Cells[2].AddParagraph(portOfCallLast30Days.PortOfCallLast30DaysDateOfDeparture.HasValue ?
portOfCallLast30Days.PortOfCallLast30DaysDateOfDeparture.Value.ToShortDateString() : "");
row.Cells[3].AddParagraph(portOfCallLast30Days.PortOfCallLast30DaysCrewMembersJoined.HasValue ?
@@ -769,7 +885,7 @@ namespace bsmd.ReportGenerator
column = table.AddColumn();
column.Width = Unit.FromCentimeter(0.8);
column = table.AddColumn();
- column.Width = Unit.FromCentimeter(2);
+ column.Width = Unit.FromCentimeter(4);
column = table.AddColumn();
column.Width = Unit.FromCentimeter(1);
@@ -781,7 +897,7 @@ namespace bsmd.ReportGenerator
hRow.Cells[4].AddParagraph("Arr.");
hRow.Cells[5].AddParagraph("Dep.");
hRow.Cells[6].AddParagraph("Ship sec. level");
- hRow.Cells[7].AddParagraph("sec. matter to report");
+ hRow.Cells[7].AddParagraph("Sec. matter to report");
hRow.Cells[8].AddParagraph("GISIS");
for(int i=0;i 0)
+ {
+ document.LastSection.AddParagraph("Ship-to-ship Activities", "Heading3");
+ Table table = document.LastSection.AddTable();
+ table.Format.Font.Size = 8;
+ table.Rows.VerticalAlignment = VerticalAlignment.Center;
+ table.Borders.Visible = true;
+
+ Column column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(0.8);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(3.9);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1.5);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1.5);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1.5);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1.5);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(3);
+
+ Row hRow = table.AddRow();
+ hRow.Cells[1].AddParagraph("Location");
+ hRow.Cells[1].MergeRight = 3;
+ hRow = table.AddRow();
+ hRow.Cells[0].AddParagraph("No.");
+ hRow.Cells[1].AddParagraph("Name");
+ hRow.Cells[2].AddParagraph("LoCode");
+ hRow.Cells[3].AddParagraph("Lat");
+ hRow.Cells[4].AddParagraph("Lon");
+ hRow.Cells[5].AddParagraph("From");
+ hRow.Cells[6].AddParagraph("To");
+ hRow.Cells[7].AddParagraph("Activity");
+ hRow.Cells[8].AddParagraph("Sec. matter to report");
+
+ for (int i = 0; i < sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Count; i++)
+ {
+ Row row = table.AddRow();
+ BSMDDocument.SetShip2ShipActivity((i + 1), ((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled[i]), row);
+ }
+ }
+ }
+
+ private static void SetShip2ShipActivity(int p, ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2sActivity, Row row)
+ {
+ row.Cells[0].AddParagraph(p.ToString());
+ row.Cells[1].AddParagraph(s2sActivity.ShipToShipActivityLocationName ?? "");
+ row.Cells[2].AddParagraph(s2sActivity.ShipToShipActivityLocationLoCode ?? "");
+ row.Cells[3].AddParagraph(s2sActivity.ShipToShipActivityLocationCoordinatesLatitude.HasValue ? s2sActivity.ShipToShipActivityLocationCoordinatesLatitude.ToString() : "");
+ row.Cells[4].AddParagraph(s2sActivity.ShipToShipActivityLocationCoordinatesLongitude.HasValue ? s2sActivity.ShipToShipActivityLocationCoordinatesLongitude.ToString() : "");
+ row.Cells[5].AddParagraph(s2sActivity.ShipToShipActivityDateFrom.HasValue ? s2sActivity.ShipToShipActivityDateFrom.Value.ToShortDateString() : "");
+ row.Cells[6].AddParagraph(s2sActivity.ShipToShipActivityDateTo.HasValue ? s2sActivity.ShipToShipActivityDateTo.Value.ToShortDateString() : "");
+ row.Cells[7].AddParagraph(s2sActivity.ShipToShipActivityType ?? "");
+ row.Cells[8].AddParagraph(s2sActivity.ShipToShipActivitySecurityMattersToReport ?? "");
+ }
+
+ private static void CreatePortOfItineraryTable(Document document, Message message)
+ {
+ BPOL bpol = message.Elements[0] as BPOL;
+ if ((bpol.CruiseShip ?? false) && (bpol.PortOfItineraries.Count > 0))
+ {
+ document.LastSection.AddParagraph("Port of itinerary (cruise)", "Heading3");
+ Table table = document.LastSection.AddTable();
+ table.Format.Font.Size = 8;
+ table.Rows.VerticalAlignment = VerticalAlignment.Center;
+ table.Borders.Visible = true;
+
+ Column column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(0.8);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(5);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1.5);
+ column = table.AddColumn();
+
+ Row hRow = table.AddRow();
+ hRow.Cells[0].AddParagraph("No.");
+ hRow.Cells[1].AddParagraph("Name");
+ hRow.Cells[2].AddParagraph("ETA");
+
+ for (int i = 0; i < bpol.PortOfItineraries.Count; i++)
+ {
+ Row row = table.AddRow();
+ row.Cells[0].AddParagraph((i+1).ToString());
+ row.Cells[1].AddParagraph(bpol.PortOfItineraries[i].PortOfItineraryName ?? "");
+ row.Cells[2].AddParagraph(bpol.PortOfItineraries[i].PortOfItineraryETA.HasValue ? bpol.PortOfItineraries[i].PortOfItineraryETA.Value.ToString() : "");
+ }
+ }
+ }
+
#endregion
#region BKRD
@@ -1011,6 +1226,174 @@ namespace bsmd.ReportGenerator
#endregion
+ #region TOWA
+
+ private static void CreateTOWATable(Document document, Message message)
+ {
+ Table table = document.LastSection.AddTable();
+ table.Rows.VerticalAlignment = VerticalAlignment.Center;
+ table.Borders.Visible = true;
+
+ Column column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+
+ Row opRow = table.AddRow();
+ opRow.Cells[2].AddParagraph("Operator");
+ opRow.Cells[2].MergeRight = 8;
+
+ Row hRow = table.AddRow();
+ hRow.Cells[1].AddParagraph("Name");
+ hRow.Cells[2].AddParagraph("Flag");
+ hRow.Cells[3].AddParagraph("Company Name");
+ hRow.Cells[4].AddParagraph("Street / No.");
+ hRow.Cells[5].AddParagraph("Postal Code");
+ hRow.Cells[6].AddParagraph("Country");
+ hRow.Cells[7].AddParagraph("Phone");
+ hRow.Cells[8].AddParagraph("Fax");
+ hRow.Cells[9].AddParagraph("Email");
+ hRow.Cells[10].AddParagraph("Gross ton.");
+ hRow.Cells[11].AddParagraph("Length(m)");
+ hRow.Cells[12].AddParagraph("Beam(m)");
+ hRow.Cells[13].AddParagraph("Purpose of call");
+ hRow.Cells[14].AddParagraph("Draft(m)");
+ hRow.Cells[15].AddParagraph("Remarks");
+
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ TOWA towa = message.Elements[i] as TOWA;
+ Row row = table.AddRow();
+ row.Cells[0].AddParagraph((i + 1).ToString());
+ row.Cells[1].AddParagraph(towa.TowageOnArrivalName ?? "");
+ row.Cells[2].AddParagraph(towa.TowageOnArrivalFlag ?? "");
+ row.Cells[3].AddParagraph(towa.TowageOnArrivalOperatorCompanyName ?? "");
+ row.Cells[4].AddParagraph(towa.TowageOnArrivalOperatorStreetNameAndNumber);
+ row.Cells[5].AddParagraph(towa.TowageOnArrivalOperatorPostalCode);
+ row.Cells[6].AddParagraph(towa.TowageOnArrivalOperatorCountry ?? "");
+ row.Cells[7].AddParagraph(towa.TowageOnArrivalOperatorPhone);
+ row.Cells[8].AddParagraph(towa.TowageOnArrivalOperatorFax ?? "");
+ row.Cells[9].AddParagraph(towa.TowageOnArrivalOperatorEmail ?? "");
+ row.Cells[10].AddParagraph(towa.TowageOnArrivalGrossTonnage.HasValue ? towa.TowageOnArrivalGrossTonnage.Value.ToString() : "");
+ row.Cells[11].AddParagraph(towa.TowageOnArrivalLengthOverall_MTR.HasValue ? towa.TowageOnArrivalLengthOverall_MTR.Value.ToString() : "");
+ row.Cells[12].AddParagraph(towa.TowageOnArrivalBeam_MTR.HasValue ? towa.TowageOnArrivalBeam_MTR.Value.ToString() : "");
+ row.Cells[13].AddParagraph(towa.TowageOnArrivalPurposeOfCall ?? "");
+ row.Cells[14].AddParagraph(towa.TowageOnArrivalDraught_DMT.HasValue ? towa.TowageOnArrivalDraught_DMT.Value.ToString() : "");
+ row.Cells[15].AddParagraph(towa.TowageOnArrivalRemarks ?? "");
+ }
+ }
+
+ #endregion
+
+ #region TOWD
+
+ private static void CreateTOWDTable(Document document, Message message)
+ {
+ Table table = document.LastSection.AddTable();
+ table.Rows.VerticalAlignment = VerticalAlignment.Center;
+ table.Borders.Visible = true;
+
+ Column column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(2);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+ column = table.AddColumn();
+ column.Width = Unit.FromCentimeter(1);
+
+ Row opRow = table.AddRow();
+ opRow.Cells[2].AddParagraph("Operator");
+ opRow.Cells[2].MergeRight = 8;
+
+ Row hRow = table.AddRow();
+ hRow.Cells[1].AddParagraph("Name");
+ hRow.Cells[2].AddParagraph("Flag");
+ hRow.Cells[3].AddParagraph("Company Name");
+ hRow.Cells[4].AddParagraph("Street / No.");
+ hRow.Cells[5].AddParagraph("Postal Code");
+ hRow.Cells[6].AddParagraph("Country");
+ hRow.Cells[7].AddParagraph("Phone");
+ hRow.Cells[8].AddParagraph("Fax");
+ hRow.Cells[9].AddParagraph("Email");
+ hRow.Cells[10].AddParagraph("Length(m)");
+ hRow.Cells[11].AddParagraph("Beam(m)");
+ hRow.Cells[12].AddParagraph("Draft(m)");
+ hRow.Cells[13].AddParagraph("Remarks");
+
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ TOWD towd = message.Elements[i] as TOWD;
+ Row row = table.AddRow();
+ row.Cells[0].AddParagraph((i + 1).ToString());
+ row.Cells[1].AddParagraph(towd.TowageOnDepartureName ?? "");
+ row.Cells[2].AddParagraph(towd.TowageOnDepartureFlag ?? "");
+ row.Cells[3].AddParagraph(towd.TowageOnDepartureOperatorCompanyName ?? "");
+ row.Cells[4].AddParagraph(towd.TowageOnDepartureOperatorStreetNameAndNumber);
+ row.Cells[5].AddParagraph(towd.TowageOnDepartureOperatorPostalCode);
+ row.Cells[6].AddParagraph(towd.TowageOnDepartureOperatorCountry ?? "");
+ row.Cells[7].AddParagraph(towd.TowageOnDepartureOperatorPhone);
+ row.Cells[8].AddParagraph(towd.TowageOnDepartureOperatorFax ?? "");
+ row.Cells[9].AddParagraph(towd.TowageOnDepartureOperatorEmail ?? "");
+ row.Cells[10].AddParagraph(towd.TowageOnDepartureLengthOverall_MTR.HasValue ? towd.TowageOnDepartureLengthOverall_MTR.Value.ToString() : "");
+ row.Cells[11].AddParagraph(towd.TowageOnDepartureBeam_MTR.HasValue ? towd.TowageOnDepartureBeam_MTR.Value.ToString() : "");
+ row.Cells[12].AddParagraph(towd.TowageOnDepartureDraught_DMT.HasValue ? towd.TowageOnDepartureDraught_DMT.Value.ToString() : "");
+ row.Cells[13].AddParagraph(towd.TowageOnDepartureRemarks ?? "");
+ }
+ }
+
+ #endregion
+
private static void AddActualTableParagraph(Document document, IMessageParagraph paragraph, bool isSubTable)
{
@@ -1145,6 +1528,19 @@ namespace bsmd.ReportGenerator
}
}
break;
+ case "General Description of Cargo":
+ {
+ switch(value)
+ {
+ case "0": result = "Container"; break;
+ case "1": result = "Vehicles"; break;
+ case "2": result = "Conventional general cargo"; break;
+ case "3": result = "Dry cargo in bulk"; break;
+ case "4": result = "Liquid cargo in bulk"; break;
+ default: result = "empty"; break;
+ }
+ }
+ break;
default:
break;
}
@@ -1152,13 +1548,14 @@ namespace bsmd.ReportGenerator
if(propertyName.Contains("flag", StringComparison.OrdinalIgnoreCase))
if (LocalizedLookup.getNationalities().ContainsKey(value))
result = LocalizedLookup.getNationalities()[value];
-
+
if(propertyName.Contains("port", StringComparison.OrdinalIgnoreCase))
{
string portName = LocodeDB.PortNameFromLocode(value);
if (!portName.IsNullOrEmpty())
{
- result = string.Format("{0} - {1}", value, portName);
+ result = portName;
+ //result = string.Format("{0} - {1}", value, portName);
}
}
diff --git a/nsw/Source/bsmd.ReportGenerator/LabelStorage.cs b/nsw/Source/bsmd.ReportGenerator/LabelStorage.cs
index f9191453..35bae572 100644
--- a/nsw/Source/bsmd.ReportGenerator/LabelStorage.cs
+++ b/nsw/Source/bsmd.ReportGenerator/LabelStorage.cs
@@ -13,7 +13,7 @@ namespace bsmd.ReportGenerator
///
public class LabelStorage
{
- private static SQLiteConnection _con;
+ private static readonly SQLiteConnection _con;
private const string _locode_DB_NAME = "report.db";
private static Dictionary _collectionLabelDict = null;
diff --git a/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj b/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj
index 669e7b62..0e8ec2e0 100644
--- a/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj
+++ b/nsw/Source/bsmd.ReportGenerator/bsmd.ReportGenerator.csproj
@@ -45,32 +45,32 @@
..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
- True
-
- ..\packages\PDFsharp-MigraDoc-GDI.1.32.4334.0\lib\net20\MigraDoc.DocumentObjectModel.dll
+
+ ..\packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.DocumentObjectModel-gdi.dll
-
- ..\packages\PDFsharp-MigraDoc-GDI.1.32.4334.0\lib\net20\MigraDoc.Rendering.dll
+
+ ..\packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.Rendering-gdi.dll
-
- ..\packages\PDFsharp-MigraDoc-GDI.1.32.4334.0\lib\net20\MigraDoc.RtfRendering.dll
+
+ ..\packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.RtfRendering-gdi.dll
-
- ..\packages\PDFsharp-MigraDoc-GDI.1.32.4334.0\lib\net20\PdfSharp.dll
+
+ ..\packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\PdfSharp-gdi.dll
-
- ..\packages\PDFsharp-MigraDoc-GDI.1.32.4334.0\lib\net20\PdfSharp.Charting.dll
+
+ ..\packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\PdfSharp.Charting-gdi.dll
+
-
- ..\packages\System.Data.SQLite.Core.1.0.106.0\lib\net45\System.Data.SQLite.dll
- True
+
+ ..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net45\System.Data.SQLite.dll
+
@@ -161,12 +161,12 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+