This commit is contained in:
parent
6f4dbdb5bc
commit
d45084d1f1
@ -35,8 +35,8 @@
|
|||||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>1</ApplicationRevision>
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
<ApplicationVersion>3.9.9.%2a</ApplicationVersion>
|
<ApplicationVersion>3.9.10.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@ -696,7 +696,7 @@ namespace bsmd.ReportGenerator
|
|||||||
portOfCallLast30Days.PortOfCallLast30DaysCrewMembersJoined.Value ? "Yes" : "No" : "");
|
portOfCallLast30Days.PortOfCallLast30DaysCrewMembersJoined.Value ? "Yes" : "No" : "");
|
||||||
for (int i = 0; i < portOfCallLast30Days.CrewJoinedShip.Count; i++)
|
for (int i = 0; i < portOfCallLast30Days.CrewJoinedShip.Count; i++)
|
||||||
{
|
{
|
||||||
row.Cells[4].AddParagraph(portOfCallLast30Days.CrewJoinedShip[i].PortOfCallLast30DaysCrewJoinedShipName ?? "");
|
row.Cells[4].AddParagraph(((PortOfCallLast30DaysCrewJoinedShip)portOfCallLast30Days.CrewJoinedShip[i]).PortOfCallLast30DaysCrewJoinedShipName ?? "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -903,7 +903,7 @@ namespace bsmd.ReportGenerator
|
|||||||
row.Cells[1].AddParagraph("Waste disposal order (all, some, none)");
|
row.Cells[1].AddParagraph("Waste disposal order (all, some, none)");
|
||||||
row = table.AddRow();
|
row = table.AddRow();
|
||||||
for (int i = 0; i < was.WasteDisposalServiceProvider.Count; i++)
|
for (int i = 0; i < was.WasteDisposalServiceProvider.Count; i++)
|
||||||
row.Cells[0].AddParagraph(was.WasteDisposalServiceProvider[i].WasteDisposalServiceProviderName);
|
row.Cells[0].AddParagraph(((WasteDisposalServiceProvider) was.WasteDisposalServiceProvider[i]).WasteDisposalServiceProviderName);
|
||||||
if (was.WasteDisposalDelivery.HasValue)
|
if (was.WasteDisposalDelivery.HasValue)
|
||||||
row.Cells[1].AddParagraph((was.WasteDisposalDelivery.Value == 0) ? "ALL" : (was.WasteDisposalDelivery == 1) ? "SOME" : "NONE");
|
row.Cells[1].AddParagraph((was.WasteDisposalDelivery.Value == 0) ? "ALL" : (was.WasteDisposalDelivery == 1) ? "SOME" : "NONE");
|
||||||
|
|
||||||
|
|||||||
@ -282,6 +282,11 @@ namespace bsmd.ReportGenerator
|
|||||||
// Schiffsname_ID_Meldeklassen.pdf
|
// Schiffsname_ID_Meldeklassen.pdf
|
||||||
string shipName = DBManager.Instance.GetShipNameFromCore(reportCore);
|
string shipName = DBManager.Instance.GetShipNameFromCore(reportCore);
|
||||||
if (shipName.IsNullOrEmpty()) shipName = "UNKNOWN";
|
if (shipName.IsNullOrEmpty()) shipName = "UNKNOWN";
|
||||||
|
// INSANITY CHECK!!!
|
||||||
|
string invalid = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
|
||||||
|
foreach (char c in invalid)
|
||||||
|
shipName = shipName.Replace(c.ToString(), "");
|
||||||
|
|
||||||
shipName = shipName.Replace(' ', '_');
|
shipName = shipName.Replace(' ', '_');
|
||||||
string fullPath = string.Format("{0}\\{1}_{2}_{3}.pdf", Properties.Settings.Default.OutputDirectory, shipName, reportCore.DisplayId, classes);
|
string fullPath = string.Format("{0}\\{1}_{2}_{3}.pdf", Properties.Settings.Default.OutputDirectory, shipName, reportCore.DisplayId, classes);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user