diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
index ed6e4407..c1bdc90f 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
@@ -218,6 +218,7 @@ namespace ENI2.DetailViewControls
this.hazd.MARPOLPositions.Add(copyMARPOL);
this.SublistElementChanged(Message.NotificationClass.HAZD);
this.OnControlCacheReset(Properties.Resources.textDGDeparture);
+ this.SetHAZGlobalFlags(this.hazd);
}
}
}
@@ -237,6 +238,7 @@ namespace ENI2.DetailViewControls
this.hazd.IMSBCPositions.Add(copyIMSBC);
this.SublistElementChanged(Message.NotificationClass.HAZD);
this.OnControlCacheReset(Properties.Resources.textDGDeparture);
+ this.SetHAZGlobalFlags(this.hazd);
}
}
}
@@ -256,6 +258,7 @@ namespace ENI2.DetailViewControls
this.hazd.IMDGPositions.Add(copyIMDG);
this.SublistElementChanged(Message.NotificationClass.HAZD);
this.OnControlCacheReset(Properties.Resources.textDGDeparture);
+ this.SetHAZGlobalFlags(this.hazd);
}
}
}
@@ -275,6 +278,7 @@ namespace ENI2.DetailViewControls
this.hazd.IGCPositions.Add(copyIGC);
this.SublistElementChanged(Message.NotificationClass.HAZD);
this.OnControlCacheReset(Properties.Resources.textDGDeparture);
+ this.SetHAZGlobalFlags(this.hazd);
}
}
}
@@ -296,6 +300,7 @@ namespace ENI2.DetailViewControls
this.hazd.IBCPositions.Add(copyIBC);
this.SublistElementChanged(Message.NotificationClass.HAZD);
this.OnControlCacheReset(Properties.Resources.textDGDeparture);
+ this.SetHAZGlobalFlags(this.hazd);
}
}
}
@@ -306,14 +311,23 @@ namespace ENI2.DetailViewControls
///
/// Beim Hinzufügen der allerersten Gefahrgutposition sollen die Flags vorbelegt werden
///
- void SetHAZGlobalFlags()
+ void SetHAZGlobalFlags(HAZ theHAZ)
{
- int totalCount = this.haz.MARPOLPositions.Count + this.haz.IMDGPositions.Count + this.haz.IGCPositions.Count + this.haz.IBCPositions.Count + this.haz.IMSBCPositions.Count;
+ int totalCount = theHAZ.MARPOLPositions.Count + theHAZ.IMDGPositions.Count + theHAZ.IGCPositions.Count + theHAZ.IBCPositions.Count + theHAZ.IMSBCPositions.Count;
if(totalCount == 1)
{
- if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true;
- if(!(this.checkBoxDGManifestOnBoard.IsChecked ?? false)) this.checkBoxDGManifestOnBoard.IsChecked = true;
- if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false;
+ if (theHAZ == this.haz)
+ {
+ if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true;
+ if (!(this.checkBoxDGManifestOnBoard.IsChecked ?? false)) this.checkBoxDGManifestOnBoard.IsChecked = true;
+ if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false;
+ }
+ else
+ {
+ theHAZ.NoDPGOnBoardOnArrival = false;
+ theHAZ.DPGManifestOnBoardOnArrival = true;
+ theHAZ.MOUBaltic = false;
+ }
}
}
@@ -348,7 +362,7 @@ namespace ENI2.DetailViewControls
eld.Identifier = DatabaseEntity.GetNewIdentifier(haz.MARPOLPositions, "MARPOL-");
eld.MARPOL.HAZ = this.haz;
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
};
if (eld.ShowDialog() ?? false)
@@ -383,7 +397,7 @@ namespace ENI2.DetailViewControls
ebd.MARPOL.HAZ = this.haz;
ebd.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.MARPOLPositions, "MARPOL-");
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
};
if (ebd.ShowDialog() ?? false)
@@ -392,7 +406,7 @@ namespace ENI2.DetailViewControls
haz.MARPOLPositions.Add(ebd.MARPOL);
this.dataGridMARPOLItems.Items.Refresh();
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
}
}
@@ -429,7 +443,7 @@ namespace ENI2.DetailViewControls
eld.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IMSBCPositions, "IMSBC-");
eld.IMSBC.HAZ = this.haz;
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
};
if (eld.ShowDialog() ?? false)
@@ -463,7 +477,7 @@ namespace ENI2.DetailViewControls
ebd.IMSBC.HAZ = this.haz;
ebd.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IMSBCPositions, "IMSBC-");
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
};
if (ebd.ShowDialog() ?? false)
@@ -472,7 +486,7 @@ namespace ENI2.DetailViewControls
haz.IMSBCPositions.Add(ebd.IMSBC);
this.dataGridIMSBCItems.Items.Refresh();
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
}
}
@@ -509,7 +523,7 @@ namespace ENI2.DetailViewControls
eld.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IGCPositions, "IGC-");
eld.IGC.HAZ = this.haz;
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
};
if (eld.ShowDialog() ?? false)
@@ -551,7 +565,7 @@ namespace ENI2.DetailViewControls
haz.IGCPositions.Add(ebd.IGC);
this.dataGridIGCItems.Items.Refresh();
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
}
}
@@ -588,7 +602,7 @@ namespace ENI2.DetailViewControls
eld.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IBCPositions, "IBC-");
eld.IBC.HAZ = this.haz;
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
};
if (eld.ShowDialog() ?? false)
@@ -630,7 +644,7 @@ namespace ENI2.DetailViewControls
haz.IBCPositions.Add(ebd.IBC);
this.dataGridIBCItems.Items.Refresh();
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
}
}
@@ -675,7 +689,7 @@ namespace ENI2.DetailViewControls
haz.IMDGPositions.Add(eld.IMDG);
this.dataGridIMDGItems.Items.Refresh();
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
}
}
@@ -709,7 +723,7 @@ namespace ENI2.DetailViewControls
haz.IMDGPositions.Add(ebd.IMDG);
this.dataGridIMDGItems.Items.Refresh();
this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
- this.SetHAZGlobalFlags();
+ this.SetHAZGlobalFlags(this.haz);
}
}
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml
index 91421d0f..ccb12adc 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml
@@ -79,7 +79,7 @@
-
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
index 5553abec..0acd00d3 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
@@ -67,6 +67,7 @@ namespace ENI2.DetailViewControls
this.textBoxIMO.IsReadOnly = false;
this.locodePoC.IsEnabled = true;
this.textBoxDisplayId.IsReadOnly = false;
+ this.buttonCopy.IsEnabled = true;
}
this.textBoxENI.DataContext = this.Core;
@@ -662,9 +663,9 @@ namespace ENI2.DetailViewControls
{
bool cannotCreateReport = false;
- for (int i = 0; i < this.dataGridMessages.SelectedItems.Count; i++)
+ for (int i = 0; i < this.Messages.Count; i++)
{
- Message selectedMessage = this.dataGridMessages.SelectedItems[i] as Message;
+ Message selectedMessage = this.Messages[i];
if ((selectedMessage.InternalStatus == Message.BSMDStatus.SENT) || (selectedMessage.InternalStatus == Message.BSMDStatus.TOSEND))
{
cannotCreateReport = true;
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index e0d9dd03..f73486ac 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
index bccb9477..9f681131 100644
--- a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
+++ b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
@@ -1121,6 +1121,17 @@ namespace bsmd.ReportGenerator
}
}
break;
+ case "Packing Group":
+ {
+ switch (value)
+ {
+ case "0": result = "I"; break;
+ case "1": result = "II"; break;
+ case "2": result = "III"; break;
+ default: break;
+ }
+ }
+ break;
default:
break;
}
diff --git a/nsw/Source/bsmd.database/HAZ.cs b/nsw/Source/bsmd.database/HAZ.cs
index e4bddb6f..c2a37c7e 100644
--- a/nsw/Source/bsmd.database/HAZ.cs
+++ b/nsw/Source/bsmd.database/HAZ.cs
@@ -427,7 +427,7 @@ namespace bsmd.database
public override void Validate(List errors, List violations)
{
- if (this.NoDPGOnBoardOnArrival ?? false)
+ if (this.NoDPGOnBoardOnArrival ?? false) // && this.MessageHeader.InternalStatus == Message.BSMDStatus.TOSEND)
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set!", null, this.Title, null, this.Tablename));
}
diff --git a/nsw/Source/bsmd.database/NOA_NOD.cs b/nsw/Source/bsmd.database/NOA_NOD.cs
index 370c08f8..c94ad733 100644
--- a/nsw/Source/bsmd.database/NOA_NOD.cs
+++ b/nsw/Source/bsmd.database/NOA_NOD.cs
@@ -308,7 +308,12 @@ namespace bsmd.database
public override object Clone()
{
- NOA_NOD noanod = this.MemberwiseClone() as NOA_NOD;
+ // NOA_NOD noanod = this.MemberwiseClone() as NOA_NOD;
+ NOA_NOD noanod = new NOA_NOD();
+ noanod.LastPort = this.LastPort;
+ noanod.NextPort = this.NextPort;
+ noanod.IsAnchored = this.IsAnchored;
+
noanod.id = null;
noanod.callPurposes = new ObservableCollection();
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
index 72b8c794..28152963 100644
--- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
+++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
@@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
-[assembly: AssemblyInformationalVersion("5.0.3")]
+[assembly: AssemblyInformationalVersion("5.0.4")]
[assembly: AssemblyCopyright("Copyright © 2014-2018 schick Informatik")]
[assembly: AssemblyTrademark("")]
\ No newline at end of file
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
index 28003866..f9d34805 100644
--- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
+++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("5.0.3.*")]
+[assembly: AssemblyVersion("5.0.4.*")]
diff --git a/nsw/Source/bsmd.hisnord/Request.cs b/nsw/Source/bsmd.hisnord/Request.cs
index 8ee6cc41..284894ba 100644
--- a/nsw/Source/bsmd.hisnord/Request.cs
+++ b/nsw/Source/bsmd.hisnord/Request.cs
@@ -1673,6 +1673,9 @@ namespace bsmd.hisnord
pi.MarinePollutant = (imdgPosition.MarinePollutant ?? false) ? yorntype.Y : yorntype.N;
pi.NumberOfPackages = imdgPosition.NumberOfPackages?.ToString();
pi.PackageType = imdgPosition.PackageType;
+ pi.PackingGroupSpecified = imdgPosition.PackingGroup.HasValue;
+ if (pi.PackingGroupSpecified)
+ pi.PackingGroup = (packinggrouptype)imdgPosition.PackingGroup;
pi.LimitedQuantities = (imdgPosition.LimitedQuantities ?? false) ? yorntype.Y : yorntype.N;
pi.ExceptedQuantities = (imdgPosition.ExceptedQuantities ?? false) ? yorntype.Y : yorntype.N;
pi.NetQuantity_KGMSpecified = imdgPosition.NetQuantity_KGM.HasValue;