Korrektur Report: Absturz wegen null String
This commit is contained in:
parent
8cf8492e87
commit
cedd74c8d6
@ -1595,13 +1595,13 @@ namespace bsmd.ReportGenerator
|
|||||||
row.Cells[0].AddParagraph(pos.Identifier ?? "");
|
row.Cells[0].AddParagraph(pos.Identifier ?? "");
|
||||||
row.Cells[1].AddParagraph(string.Format("{0}\n{1}",pos.ContainerNumber, pos.VehicleLicenseNumber));
|
row.Cells[1].AddParagraph(string.Format("{0}\n{1}",pos.ContainerNumber, pos.VehicleLicenseNumber));
|
||||||
row.Cells[2].AddParagraph(pos.StowagePosition.IsNullOrEmpty() ? string.Format("{0} {1} {2}", pos.Bay, pos.Row, pos.Tier) : pos.StowagePosition);
|
row.Cells[2].AddParagraph(pos.StowagePosition.IsNullOrEmpty() ? string.Format("{0} {1} {2}", pos.Bay, pos.Row, pos.Tier) : pos.StowagePosition);
|
||||||
row.Cells[3].AddParagraph(pos.IMOClass);
|
row.Cells[3].AddParagraph(pos.IMOClass ?? "");
|
||||||
row.Cells[4].AddParagraph(pos.UNNumber);
|
row.Cells[4].AddParagraph(pos.UNNumber ?? "");
|
||||||
row.Cells[5].AddParagraph(DatabaseEntity_ReportReplacer("PackingGroup", pos.PackingGroup.ToString()));
|
row.Cells[5].AddParagraph(DatabaseEntity_ReportReplacer("PackingGroup", pos.PackingGroup.ToString()));
|
||||||
row.Cells[6].AddParagraph((pos.MarinePollutant ?? false) ? "Y" : "N");
|
row.Cells[6].AddParagraph((pos.MarinePollutant ?? false) ? "Y" : "N");
|
||||||
row.Cells[7].AddParagraph(pos.Flashpoint_CEL);
|
row.Cells[7].AddParagraph(pos.Flashpoint_CEL ?? "");
|
||||||
row.Cells[8].AddParagraph(pos.NumberOfPackages.ToString());
|
row.Cells[8].AddParagraph(pos.NumberOfPackages.ToString());
|
||||||
row.Cells[9].AddParagraph(pos.PackageType);
|
row.Cells[9].AddParagraph(pos.PackageType ?? "");
|
||||||
row.Cells[10].AddParagraph((pos.LimitedQuantities ?? false) ? "Y" : "N");
|
row.Cells[10].AddParagraph((pos.LimitedQuantities ?? false) ? "Y" : "N");
|
||||||
row.Cells[11].AddParagraph((pos.ExceptedQuantities ?? false) ? "Y" : "N");
|
row.Cells[11].AddParagraph((pos.ExceptedQuantities ?? false) ? "Y" : "N");
|
||||||
row.Cells[12].AddParagraph(string.Format("GW:{0}\nNW:{1}", pos.GrossQuantity_KGM, pos.NetQuantity_KGM));
|
row.Cells[12].AddParagraph(string.Format("GW:{0}\nNW:{1}", pos.GrossQuantity_KGM, pos.NetQuantity_KGM));
|
||||||
@ -1686,7 +1686,7 @@ namespace bsmd.ReportGenerator
|
|||||||
{
|
{
|
||||||
IBCPosition pos = haz.IBCPositions[i];
|
IBCPosition pos = haz.IBCPositions[i];
|
||||||
Row row = table.AddRow();
|
Row row = table.AddRow();
|
||||||
row.Cells[0].AddParagraph(pos.Identifier);
|
row.Cells[0].AddParagraph(pos.Identifier ?? "");
|
||||||
row.Cells[1].AddParagraph(pos.ProductName ?? "");
|
row.Cells[1].AddParagraph(pos.ProductName ?? "");
|
||||||
row.Cells[2].AddParagraph(pos.PollutionCategoryDisplay);
|
row.Cells[2].AddParagraph(pos.PollutionCategoryDisplay);
|
||||||
row.Cells[3].AddParagraph(pos.HazardsDisplay);
|
row.Cells[3].AddParagraph(pos.HazardsDisplay);
|
||||||
@ -1751,7 +1751,7 @@ namespace bsmd.ReportGenerator
|
|||||||
IGCPosition pos = haz.IGCPositions[i];
|
IGCPosition pos = haz.IGCPositions[i];
|
||||||
Row row = table.AddRow();
|
Row row = table.AddRow();
|
||||||
|
|
||||||
row.Cells[0].AddParagraph(pos.Identifier);
|
row.Cells[0].AddParagraph(pos.Identifier ?? "");
|
||||||
row.Cells[1].AddParagraph(pos.UNNumber ?? "");
|
row.Cells[1].AddParagraph(pos.UNNumber ?? "");
|
||||||
row.Cells[2].AddParagraph(pos.IMOClass ?? "");
|
row.Cells[2].AddParagraph(pos.IMOClass ?? "");
|
||||||
row.Cells[3].AddParagraph(pos.ProductName ?? "");
|
row.Cells[3].AddParagraph(pos.ProductName ?? "");
|
||||||
@ -1816,12 +1816,12 @@ namespace bsmd.ReportGenerator
|
|||||||
IMSBCPosition pos = haz.IMSBCPositions[i];
|
IMSBCPosition pos = haz.IMSBCPositions[i];
|
||||||
Row row = table.AddRow();
|
Row row = table.AddRow();
|
||||||
|
|
||||||
row.Cells[0].AddParagraph(pos.Identifier);
|
row.Cells[0].AddParagraph(pos.Identifier ?? "");
|
||||||
row.Cells[1].AddParagraph(pos.BulkCargoShippingName ?? "");
|
row.Cells[1].AddParagraph(pos.BulkCargoShippingName ?? "");
|
||||||
row.Cells[2].AddParagraph(pos.IMOHazardClassDisplay);
|
row.Cells[2].AddParagraph(pos.IMOHazardClassDisplay);
|
||||||
row.Cells[3].AddParagraph(pos.MHB.HasValue ? (pos.MHB.Value ? "Y" : "N") : "");
|
row.Cells[3].AddParagraph(pos.MHB.HasValue ? (pos.MHB.Value ? "Y" : "N") : "");
|
||||||
row.Cells[4].AddParagraph(pos.UNNumber ?? "");
|
row.Cells[4].AddParagraph(pos.UNNumber ?? "");
|
||||||
row.Cells[5].AddParagraph(pos.IMOClass);
|
row.Cells[5].AddParagraph(pos.IMOClass ?? "");
|
||||||
row.Cells[6].AddParagraph(pos.Quantity_KGM.HasValue ? pos.Quantity_KGM.Value.ToString("N3") : "");
|
row.Cells[6].AddParagraph(pos.Quantity_KGM.HasValue ? pos.Quantity_KGM.Value.ToString("N3") : "");
|
||||||
row.Cells[7].AddParagraph(pos.StowagePosition ?? "");
|
row.Cells[7].AddParagraph(pos.StowagePosition ?? "");
|
||||||
row.Cells[8].AddParagraph(pos.PortOfLoading ?? "");
|
row.Cells[8].AddParagraph(pos.PortOfLoading ?? "");
|
||||||
@ -1879,7 +1879,7 @@ namespace bsmd.ReportGenerator
|
|||||||
MARPOL_Annex_I_Position pos = haz.MARPOLPositions[i];
|
MARPOL_Annex_I_Position pos = haz.MARPOLPositions[i];
|
||||||
Row row = table.AddRow();
|
Row row = table.AddRow();
|
||||||
|
|
||||||
row.Cells[0].AddParagraph(pos.Identifier);
|
row.Cells[0].AddParagraph(pos.Identifier ?? "");
|
||||||
row.Cells[1].AddParagraph(pos.Name ?? "");
|
row.Cells[1].AddParagraph(pos.Name ?? "");
|
||||||
row.Cells[2].AddParagraph(pos.FlashpointInformationDisplay);
|
row.Cells[2].AddParagraph(pos.FlashpointInformationDisplay);
|
||||||
row.Cells[3].AddParagraph(pos.Flashpoint_CEL ?? "");
|
row.Cells[3].AddParagraph(pos.Flashpoint_CEL ?? "");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user