diff --git a/ENI2/DetailViewControls/WasteDetailControl.xaml b/ENI2/DetailViewControls/WasteDetailControl.xaml
index 801a9a0b..bd8cbb7a 100644
--- a/ENI2/DetailViewControls/WasteDetailControl.xaml
+++ b/ENI2/DetailViewControls/WasteDetailControl.xaml
@@ -145,8 +145,8 @@
-
-
+
+
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 7c4ecd43..0efa3d38 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 0
- 7.0.2.0
+ 1
+ 7.0.2.1
false
true
true
diff --git a/ENI2/EditControls/EditWasteReceiptDialog.xaml b/ENI2/EditControls/EditWasteReceiptDialog.xaml
index c44e7399..d6ada39e 100644
--- a/ENI2/EditControls/EditWasteReceiptDialog.xaml
+++ b/ENI2/EditControls/EditWasteReceiptDialog.xaml
@@ -17,7 +17,9 @@
-
+
+
+
@@ -39,5 +41,7 @@
+
+
diff --git a/ENI2/EditControls/EditWasteReceiptDialog.xaml.cs b/ENI2/EditControls/EditWasteReceiptDialog.xaml.cs
index efe1e33c..10c78e26 100644
--- a/ENI2/EditControls/EditWasteReceiptDialog.xaml.cs
+++ b/ENI2/EditControls/EditWasteReceiptDialog.xaml.cs
@@ -52,5 +52,9 @@ namespace ENI2.EditControls
this.CopyValuesToEntity();
}
+ private void buttonAddEntries_Click(object sender, RoutedEventArgs e)
+ {
+ this.WAS_RCPT.AddMissingWasteReceived();
+ }
}
}
diff --git a/ENI2/Report/ReportDocument.cs b/ENI2/Report/ReportDocument.cs
index 4de02bcd..9a284392 100644
--- a/ENI2/Report/ReportDocument.cs
+++ b/ENI2/Report/ReportDocument.cs
@@ -1100,63 +1100,58 @@ namespace ENI2.Report
Table table = AddGrayTable(document);
- table.AddColumn(290);
- table.AddColumn(200);
+ _ = table.AddColumn(290);
+ _ = table.AddColumn(200);
Row row = table.AddRow();
- row.Cells[0].AddParagraph("Valid exemption?");
- row.Cells[1].AddParagraph("Confirmation of correctness");
- row = table.AddRow();
- row.Cells[0].AddParagraph(was.WasteDisposalValidExemption ?? false ? "Yes" : "No");
- row.Cells[1].AddParagraph(was.ConfirmationOfCorrectness ?? false ? "Yes" : "No");
+ _ = row.Cells[0].AddParagraph("Last port where waste or cargo residues were discharged");
+ _ = row.Cells[1].AddParagraph(LocodeDB.PortNameFromLocode(was.LastWasteDisposalPort) ?? "");
+
+ _ = row = table.AddRow();
+ _ = row.Cells[0].AddParagraph("Date of last disposal");
+ if (was.LastWasteDisposalDate.HasValue)
+ row.Cells[1].AddParagraph(was.LastWasteDisposalDate?.ToShortDateString());
row = table.AddRow();
- row.Cells[0].AddParagraph("Last port where waste or cargo residues were discharged");
- row.Cells[1].AddParagraph("Date of last disposal");
- row = table.AddRow();
- row.Cells[0].AddParagraph(LocodeDB.PortNameFromLocode(was.LastWasteDisposalPort) ?? "");
- if(was.LastWasteDisposalDate.HasValue)
- row.Cells[1].AddParagraph(was.LastWasteDisposalDate?.ToShortDateString());
- row = table.AddRow();
- row.Cells[0].AddParagraph("Name of waste disposal service provider");
- row.Cells[1].AddParagraph("Waste disposal order (all, some, none)");
- row = table.AddRow();
+ _ = row.Cells[0].AddParagraph("Name of waste disposal service provider");
for (int i = 0; i < was.WasteDisposalServiceProvider.Count; i++)
- row.Cells[0].AddParagraph(((WasteDisposalServiceProvider) was.WasteDisposalServiceProvider[i]).WasteDisposalServiceProviderName);
+ row.Cells[1].AddParagraph(((WasteDisposalServiceProvider)was.WasteDisposalServiceProvider[i]).WasteDisposalServiceProviderName);
+
+ row = table.AddRow();
+ _ = row.Cells[0].AddParagraph("Next waste disposal port");
+ _ = row.Cells[1].AddParagraph(LocodeDB.PortNameFromLocode(was.NextWasteDisposalPort) ?? "");
table = document.LastSection.AddTable();
table.Rows.VerticalAlignment = VerticalAlignment.Top;
table.Borders.Visible = true;
table.Borders.Color = Colors.LightGray;
- table.AddColumn(100);
- table.AddColumn(65);
- table.AddColumn(65);
- table.AddColumn(65);
- table.AddColumn(65);
- table.AddColumn(65);
+ table.AddColumn(100);
+ table.AddColumn(65);
+ table.AddColumn(65);
+ table.AddColumn(65);
+ table.AddColumn(65);
+ table.AddColumn(65);
table.AddColumn(65);
-
row = table.AddRow();
- row.Cells[0].AddParagraph("TYPE");
- row.Cells[1].AddParagraph("Description");
- row.Cells[2].AddParagraph("Amount to be disposed");
- row.Cells[3].AddParagraph("Maximum dedicated storage capacity on board");
- row.Cells[4].AddParagraph("Amount retained on board");
- row.Cells[5].AddParagraph("Port of delivery of remaining waste");
- row.Cells[6].AddParagraph("Estimated waste/cargo residues amount generated between port of call and next port");
+ _ = row.Cells[0].AddParagraph("TYPE");
+ _ = row.Cells[1].AddParagraph("Description");
+ _ = row.Cells[2].AddParagraph("Amount to be disposed");
+ _ = row.Cells[3].AddParagraph("Maximum dedicated storage capacity on board");
+ _ = row.Cells[4].AddParagraph("Amount retained on board");
+ _ = row.Cells[5].AddParagraph("Port of delivery of remaining waste");
+ _ = row.Cells[6].AddParagraph("Estimated waste/cargo residues amount generated between port of call and next port");
-
for (int i = 0; i < WAS.WasteCodes.Length; i++)
{
row = table.AddRow();
- row.Cells[0].AddParagraph(string.Format("{0} {1}", WAS.WasteCodes[i], WAS.WasteCodeDescriptions[i]));
+ _ = row.Cells[0].AddParagraph(string.Format("{0} {1}", WAS.WasteCodes[i], WAS.WasteCodeDescriptions[i]));
if(Int32.TryParse(WAS.WasteCodes[i], out int wasteCode))
GetWasteForIndex(wasteCode, was, row);
}
-
+
}
private static void GetWasteForIndex(int index, WAS was, Row row)
@@ -1165,13 +1160,13 @@ namespace ENI2.Report
{
if (!waste.WasteType.HasValue) continue; // kaputt!
if (waste.WasteType.Value == index)
- {
- row.Cells[1].AddParagraph(waste.WasteDescription ?? "");
- row.Cells[2].AddParagraph(waste.WasteDisposalAmount_MTQ.HasValue ? waste.WasteDisposalAmount_MTQ.Value.ToString("N3") : "");
- row.Cells[3].AddParagraph(waste.WasteCapacity_MTQ.HasValue ? waste.WasteCapacity_MTQ.Value.ToString("N3") : "");
- row.Cells[4].AddParagraph(waste.WasteAmountRetained_MTQ.HasValue ? waste.WasteAmountRetained_MTQ.Value.ToString("N3") : "");
- row.Cells[5].AddParagraph(LocodeDB.PortNameFromLocode(waste.WasteDisposalPort) ?? "");
- row.Cells[6].AddParagraph(waste.WasteAmountGeneratedTillNextPort_MTQ.HasValue ? waste.WasteAmountGeneratedTillNextPort_MTQ.Value.ToString("N3") : "");
+ {
+ _ = row.Cells[1].AddParagraph(waste.WasteDescription ?? "");
+ _ = row.Cells[2].AddParagraph(waste.WasteDisposalAmount_MTQ.HasValue ? waste.WasteDisposalAmount_MTQ.Value.ToString("N3") : "");
+ _ = row.Cells[3].AddParagraph(waste.WasteCapacity_MTQ.HasValue ? waste.WasteCapacity_MTQ.Value.ToString("N3") : "");
+ _ = row.Cells[4].AddParagraph(waste.WasteAmountRetained_MTQ.HasValue ? waste.WasteAmountRetained_MTQ.Value.ToString("N3") : "");
+ _ = row.Cells[5].AddParagraph(LocodeDB.PortNameFromLocode(waste.WasteDisposalPort) ?? "");
+ _ = row.Cells[6].AddParagraph(waste.WasteAmountGeneratedTillNextPort_MTQ.HasValue ? waste.WasteAmountGeneratedTillNextPort_MTQ.Value.ToString("N3") : "");
}
}
}
@@ -1201,10 +1196,10 @@ namespace ENI2.Report
row.Cells[1].AddParagraph(was_rpct.PortReceptionFacilityProviderName);
row = table.AddRow();
row.Cells[0].AddParagraph("Waste delivery from");
- row.Cells[1].AddParagraph(was_rpct.WasteDeliveryDateFrom.HasValue ? was_rpct.WasteDeliveryDateFrom.ToString() : "");
+ row.Cells[1].AddParagraph(was_rpct.WasteDeliveryDateFrom.HasValue ? was_rpct.WasteDeliveryDateFrom.Value.ToLocalTime().ToString() : "");
row = table.AddRow();
row.Cells[0].AddParagraph("Waste delivery to");
- row.Cells[1].AddParagraph(was_rpct.WasteDeliveryDateTo.HasValue ? was_rpct.WasteDeliveryDateTo.ToString() : "");
+ row.Cells[1].AddParagraph(was_rpct.WasteDeliveryDateTo.HasValue ? was_rpct.WasteDeliveryDateTo.Value.ToLocalTime().ToString() : "");
row = table.AddRow();
row.Cells[0].AddParagraph("Treatment facility provider");
row.Cells[1].AddParagraph(was_rpct.TreatmentFacilityProviderText);
diff --git a/bsmd.database/Waste.cs b/bsmd.database/Waste.cs
index 6452842e..c810f640 100644
--- a/bsmd.database/Waste.cs
+++ b/bsmd.database/Waste.cs
@@ -84,7 +84,7 @@ namespace bsmd.database
[ENI2Validation]
public int? WasteType { get; set; }
- [ShowReport]
+ [ShowReport]
[MaxLength(99)]
[ENI2Validation]
public string WasteDescription { get; set; }