diff --git a/ENI-2/ENI2/ENI2/DetailBaseControl.cs b/ENI-2/ENI2/ENI2/DetailBaseControl.cs
index 9a00551e..1732693b 100644
--- a/ENI-2/ENI2/ENI2/DetailBaseControl.cs
+++ b/ENI-2/ENI2/ENI2/DetailBaseControl.cs
@@ -175,7 +175,14 @@ namespace ENI2
protected void RegisterTextboxChange(TextBox textBox, Message.NotificationClass notificationClass)
{
this._dpTextBox.AddValueChanged(textBox, this.controlContentChanged);
- this._controlClassDict[textBox] = notificationClass;
+ this._controlClassDict[textBox] = notificationClass;
+ }
+
+ protected void UnregisterTextboxChange(TextBox textBox)
+ {
+ this._dpTextBox.RemoveValueChanged(textBox, this.controlContentChanged);
+ if (this._controlClassDict.ContainsKey(textBox))
+ this._controlClassDict.Remove(textBox);
}
protected void RegisterDateTimePickerChange(Xceed.Wpf.Toolkit.DateTimePicker dateTimePicker, Message.NotificationClass notificationClass)
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
index 8d84a26d..005fa3a0 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
@@ -377,15 +377,22 @@ namespace ENI2.DetailViewControls
public void UpdateCore()
{
+ this.UnregisterTextboxChange(this.textBoxDisplayId);
+
this.textBoxDisplayId.DataContext = null;
this.textBoxDisplayId.DataContext = this.Core;
this.textBoxDisplayId.GetBindingExpression(TextBox.TextProperty)?.UpdateTarget();
+ this.RegisterTextboxChange(this.textBoxDisplayId, Message.NotificationClass.ATA);
+
this.labelBSMDStatusInternal.DataContext = null;
this.labelBSMDStatusInternal.DataContext = this.Core;
- this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget();
-
- MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
+ this.labelBSMDStatusInternal.GetBindingExpression(Label.ContentProperty)?.UpdateTarget();
+ //MessageBox.Show(string.Format("Visit/Transit ID updated: {0}", this.Core.DisplayId));
+ ShowIdDialog sid = new ShowIdDialog();
+ sid.DisplayId = this.Core.DisplayId;
+ sid.Show();
+ this.Core.IsDirty = false; // ist ja schon gespeichert..
}
#endregion
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 4e49ad29..2e1dea6f 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,8 +35,8 @@
3.5.1.0
true
publish.html
- 1
- 3.9.3.%2a
+ 0
+ 3.9.5.%2a
false
true
true
@@ -308,6 +308,9 @@
NewWithIdDialog.xaml
+
+ ShowIdDialog.xaml
+
SimplePropertyViewDialog.xaml
@@ -537,6 +540,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs
index 89e51f3e..9574cf93 100644
--- a/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/NewWithIdDialog.xaml.cs
@@ -43,9 +43,9 @@ namespace ENI2.EditControls
public string VisitTransitId { get { return this.textBoxVisitTransitId.Text; } }
- public string IMO { get { if (this.doubleUpDownIMO.Value.HasValue) return this.doubleUpDownIMO.Value.ToString(); else return null; } }
+ public string IMO { get { if (this.doubleUpDownIMO.Value.HasValue) return this.doubleUpDownIMO.Value.Value.ToString("0000000"); else return null; } }
- public string ENI { get { if (this.doubleUpDownENI.Value.HasValue) return this.doubleUpDownENI.Value.ToString(); else return null; } }
+ public string ENI { get { if (this.doubleUpDownENI.Value.HasValue) return this.doubleUpDownENI.Value.Value.ToString("00000000"); else return null; } }
public DateTime? ETA { get { return this.datePickerETA.SelectedDate; } }
diff --git a/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml
new file mode 100644
index 00000000..14f84b0c
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml.cs
new file mode 100644
index 00000000..ad0ece58
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/ShowIdDialog.xaml.cs
@@ -0,0 +1,48 @@
+// Copyright (c) 2017 schick Informatik
+// Description: Info-Dialog wenn eine Id erhalten wird
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for ShowIdDialog.xaml
+ ///
+ public partial class ShowIdDialog : Window
+ {
+ public ShowIdDialog()
+ {
+ InitializeComponent();
+ }
+
+ public string DisplayId
+ {
+ set { this.textBoxId.Text = value; }
+ get { return this.textBoxId.Text; }
+ }
+
+ private void textBoxId_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ Clipboard.SetText(this.textBoxId.Text);
+ this.textBoxId.Background = Brushes.LightGreen;
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs
index 49f6ab0a..baefb421 100644
--- a/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs
@@ -57,10 +57,10 @@ namespace ENI2.EditControls
}
if (this.doubleUpDownIMO.Value.HasValue)
- this.Core.IMO = this.doubleUpDownIMO.Value.ToString();
+ this.Core.IMO = this.doubleUpDownIMO.Value.Value.ToString("0000000");
if (this.doubleUpDownENI.Value.HasValue)
- this.Core.ENI = this.doubleUpDownENI.Value.ToString();
+ this.Core.ENI = this.doubleUpDownENI.Value.Value.ToString("00000000");
this.Core.PoC = this.locodePoC.LocodeValue;
this.Core.Portname = LocodeDB.PortNameFromLocode(this.Core.PoC);
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index 7473be4b..4dca5341 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.database/BPOL.cs b/nsw/Source/bsmd.database/BPOL.cs
index 9117ff00..fb935993 100644
--- a/nsw/Source/bsmd.database/BPOL.cs
+++ b/nsw/Source/bsmd.database/BPOL.cs
@@ -165,7 +165,7 @@ namespace bsmd.database
public override void Validate(List errors, List violations)
{
foreach (PortOfItinerary poi in this.PortOfItineraries)
- RuleEngine.ValidateProperties(poi, errors);
+ RuleEngine.ValidateProperties(poi, errors, violations);
}
#endregion
diff --git a/nsw/Source/bsmd.database/DBManager.cs b/nsw/Source/bsmd.database/DBManager.cs
index 61fc99b4..ad0ff9ee 100644
--- a/nsw/Source/bsmd.database/DBManager.cs
+++ b/nsw/Source/bsmd.database/DBManager.cs
@@ -330,7 +330,9 @@ namespace bsmd.database
{
result = (Message) messages[0]; // es kann nur eine sein
result.MessageCore = core;
- // TODO: abhängige Listen laden?
+ List lm = new List();
+ lm.Add(result);
+ this.LoadMessageDependencies(lm);
}
if (this._closeConnectionAfterUse) this.Disconnect();
diff --git a/nsw/Source/bsmd.database/HAZ.cs b/nsw/Source/bsmd.database/HAZ.cs
index e4b439c2..0f5b6103 100644
--- a/nsw/Source/bsmd.database/HAZ.cs
+++ b/nsw/Source/bsmd.database/HAZ.cs
@@ -434,30 +434,30 @@ namespace bsmd.database
foreach (IMDGPosition imdg in this.IMDGPositions)
{
- RuleEngine.ValidateProperties(imdg, errors);
+ RuleEngine.ValidateProperties(imdg, errors, violations);
imdg.Validate(errors, violations);
}
foreach(IBCPosition ibc in this.IBCPositions)
{
- RuleEngine.ValidateProperties(ibc, errors);
+ RuleEngine.ValidateProperties(ibc, errors, violations);
ibc.Validate(errors, violations);
}
foreach(IGCPosition igc in this.IGCPositions)
{
- RuleEngine.ValidateProperties(igc, errors);
+ RuleEngine.ValidateProperties(igc, errors, violations);
}
foreach(IMSBCPosition imsbc in this.IMSBCPositions)
{
- RuleEngine.ValidateProperties(imsbc, errors);
+ RuleEngine.ValidateProperties(imsbc, errors, violations);
imsbc.Validate(errors, violations);
}
foreach(MARPOL_Annex_I_Position marpol in this.MARPOLPositions)
{
- RuleEngine.ValidateProperties(marpol, errors);
+ RuleEngine.ValidateProperties(marpol, errors, violations);
marpol.Validate(errors, violations);
}
}
diff --git a/nsw/Source/bsmd.database/IMDGPosition.cs b/nsw/Source/bsmd.database/IMDGPosition.cs
index c6402f06..137fdcd5 100644
--- a/nsw/Source/bsmd.database/IMDGPosition.cs
+++ b/nsw/Source/bsmd.database/IMDGPosition.cs
@@ -447,7 +447,7 @@ namespace bsmd.database
violations.Add(RuleEngine.CreateViolation(ValidationCode.V809, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
- RuleEngine.ValidateProperties(sr, errors);
+ RuleEngine.ValidateProperties(sr, errors, violations);
}
#endregion
diff --git a/nsw/Source/bsmd.database/MDH.cs b/nsw/Source/bsmd.database/MDH.cs
index ed1aa35e..b08d574c 100644
--- a/nsw/Source/bsmd.database/MDH.cs
+++ b/nsw/Source/bsmd.database/MDH.cs
@@ -555,7 +555,7 @@ namespace bsmd.database
foreach (PortOfCallLast30Days poc30d in this.portOfCallLast30Days)
{
- RuleEngine.ValidateProperties(poc30d, errors);
+ RuleEngine.ValidateProperties(poc30d, errors, violations);
poc30d.Validate(errors, violations);
}
}
diff --git a/nsw/Source/bsmd.database/PortOfCallLast30Days.cs b/nsw/Source/bsmd.database/PortOfCallLast30Days.cs
index 5cc9ef30..cca5d59c 100644
--- a/nsw/Source/bsmd.database/PortOfCallLast30Days.cs
+++ b/nsw/Source/bsmd.database/PortOfCallLast30Days.cs
@@ -258,7 +258,7 @@ namespace bsmd.database
{
foreach (PortOfCallLast30DaysCrewJoinedShip poc30Crew in this.CrewJoinedShip)
{
- RuleEngine.ValidateProperties(poc30Crew, errors);
+ RuleEngine.ValidateProperties(poc30Crew, errors, violations);
}
}
}
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
index 2164a602..63e583da 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("3.9.3")]
+[assembly: AssemblyInformationalVersion("3.9.5")]
[assembly: AssemblyCopyright("Copyright © 2014-2017 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 54829404..e43f724c 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("3.9.3.*")]
+[assembly: AssemblyVersion("3.9.5.*")]
diff --git a/nsw/Source/bsmd.database/RuleEngine.cs b/nsw/Source/bsmd.database/RuleEngine.cs
index 3343e5c9..7ae37a31 100644
--- a/nsw/Source/bsmd.database/RuleEngine.cs
+++ b/nsw/Source/bsmd.database/RuleEngine.cs
@@ -134,7 +134,7 @@ namespace bsmd.database
///
///
///
- public static void ValidateProperties(DatabaseEntity entity, List errors)
+ public static void ValidateProperties(DatabaseEntity entity, List errors, List violations)
{
string identifier = null;
if (entity is ISublistElement)
@@ -186,6 +186,17 @@ namespace bsmd.database
}
}
+ /// check for truncation warnings
+ if (Attribute.IsDefined(property, typeof(MaxLengthAttribute)))
+ {
+ MaxLengthAttribute mla = Attribute.GetCustomAttribute(property, typeof(MaxLengthAttribute)) as MaxLengthAttribute;
+ if((value.Length >= 50) && (mla.MaxLength == value.Length))
+ {
+ // put out a warning this might be truncated
+ violations.Add(RuleEngine.CreateViolation(ValidationCode.TRUNCATE, property.Name, value, entity.Title, identifier, entity.Tablename));
+ }
+ }
+
// check properties
switch (validationCode)
@@ -195,16 +206,21 @@ namespace bsmd.database
break;
case ValidationCode.LOCODE:
{
- Regex rgx = new Regex("[A-Z]{2}[A-Z0-9]{3}");
- if (!rgx.IsMatch(value)) errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
- if (_locodeChecker != null)
+ Regex rgx = new Regex("^[A-Z]{2}[A-Z0-9]{3}$");
+ if (!rgx.IsMatch(value))
+ {
+ errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
+ }
+ else if (_locodeChecker != null)
+ {
if (!_locodeChecker(value, LocodeMode.STANDARD))
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
+ }
}
break;
case ValidationCode.LOCODE_NOPORT:
{
- Regex rgx = new Regex("[A-Z]{2}[A-Z0-9]{3}");
+ Regex rgx = new Regex("^[A-Z]{2}[A-Z0-9]{3}$");
if (!rgx.IsMatch(value)) errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
if (_locodeChecker != null)
if (!_locodeChecker(value, LocodeMode.NO_PORT_FLAG))
@@ -213,7 +229,7 @@ namespace bsmd.database
break;
case ValidationCode.LOCODE_SSN:
{
- Regex rgx = new Regex("[A-Z]{2}[A-Z0-9]{3}");
+ Regex rgx = new Regex("^[A-Z]{2}[A-Z0-9]{3}$");
if (!rgx.IsMatch(value)) errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
if (_locodeChecker != null)
if (!_locodeChecker(value, LocodeMode.SSN))
@@ -326,6 +342,13 @@ namespace bsmd.database
if ((value.Length > maxlen) || (value.Length == 0))
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
break;
+ case ValidationCode.FRZ:
+ {
+ Regex rgx = new Regex(@"^[A-Z, a-z,0-9]{4,7}$");
+ if (!rgx.IsMatch(value)) errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
+
+ break;
+ }
default:
break;
}
@@ -348,7 +371,7 @@ namespace bsmd.database
// individuelle Fehler nach Nachrichtenklasse prüfen
derivedEntity.MessageCore = aMessage.MessageCore; // some instance we need info from core (NOA / Transit)
if ((derivedEntity is LADG) && aMessage.MessageCore.IsTransit) continue; // kein error reporting für LADG bei Transit (CH, 1.2.16)
- RuleEngine.ValidateProperties(derivedEntity, errors);
+ RuleEngine.ValidateProperties(derivedEntity, errors, violations);
derivedEntity.Validate(errors, violations);
}
@@ -373,7 +396,7 @@ namespace bsmd.database
// individuelle Fehler nach Nachrichtenklasse prüfen
derivedEntity.MessageCore = entity.MessageCore; // some instance we need info from core (NOA / Transit)
if ((derivedEntity is LADG) && entity.MessageCore.IsTransit) continue; // kein error reporting für LADG bei Transit (CH, 1.2.16)
- RuleEngine.ValidateProperties(derivedEntity, errors);
+ RuleEngine.ValidateProperties(derivedEntity, errors, violations);
derivedEntity.Validate(errors, violations);
}
diff --git a/nsw/Source/bsmd.database/SEC.cs b/nsw/Source/bsmd.database/SEC.cs
index 85fb65b2..03db31ce 100644
--- a/nsw/Source/bsmd.database/SEC.cs
+++ b/nsw/Source/bsmd.database/SEC.cs
@@ -371,13 +371,13 @@ namespace bsmd.database
foreach (LastTenPortFacilitiesCalled L10Called in this.LastTenPortFacilitesCalled)
{
- RuleEngine.ValidateProperties(L10Called, errors);
+ RuleEngine.ValidateProperties(L10Called, errors, violations);
L10Called.Validate(errors, violations);
}
foreach (ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s in this.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)
{
- RuleEngine.ValidateProperties(s2s, errors);
+ RuleEngine.ValidateProperties(s2s, errors, violations);
s2s.Validate(errors, violations);
}
}
diff --git a/nsw/Source/bsmd.database/STAT.cs b/nsw/Source/bsmd.database/STAT.cs
index 65356634..ab65c9ef 100644
--- a/nsw/Source/bsmd.database/STAT.cs
+++ b/nsw/Source/bsmd.database/STAT.cs
@@ -32,7 +32,7 @@ namespace bsmd.database
public string ShipName { get; set; }
[ShowReport]
- [Validation(ValidationCode.NOT_NULL)]
+ [Validation(ValidationCode.FRZ)]
[MaxLength(50)]
[ENI2Validation]
public string CallSign { get; set; }
diff --git a/nsw/Source/bsmd.database/Util.cs b/nsw/Source/bsmd.database/Util.cs
index 258fae79..9b5441db 100644
--- a/nsw/Source/bsmd.database/Util.cs
+++ b/nsw/Source/bsmd.database/Util.cs
@@ -11,6 +11,7 @@ using System;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Text.RegularExpressions;
+using log4net;
namespace bsmd.database
{
@@ -18,6 +19,7 @@ namespace bsmd.database
{
private static Regex regexVisit = new Regex("(DE)([A-Z]{3})-([0-9]{4})-([A-Z]{6})", RegexOptions.IgnoreCase);
private static Regex regexTransit = new Regex("(ZZNOK)-([0-9]{4})-([A-Z]{6})", RegexOptions.IgnoreCase);
+ private static ILog _log = LogManager.GetLogger(typeof(Util));
///
/// Extension helper to add values that can be null:
@@ -127,7 +129,13 @@ namespace bsmd.database
if(!existingMessages.IsNullOrEmpty())
{
foreach (Message aMessage in existingMessages)
- messageDict.Add(aMessage.MessageNotificationClass, aMessage);
+ {
+ if(messageDict.ContainsKey(aMessage.MessageNotificationClass))
+ {
+ _log.WarnFormat("Core {0} [{1}] has more than one message class for {2}", core.Id, core.DisplayId, aMessage.MessageNotificationClassDisplay);
+ }
+ messageDict[aMessage.MessageNotificationClass] = aMessage;
+ }
}
bool isDE, isDK;
diff --git a/nsw/Source/bsmd.database/ValidationAttribute.cs b/nsw/Source/bsmd.database/ValidationAttribute.cs
index 867d8b8f..7611e112 100644
--- a/nsw/Source/bsmd.database/ValidationAttribute.cs
+++ b/nsw/Source/bsmd.database/ValidationAttribute.cs
@@ -37,12 +37,14 @@ namespace bsmd.database
DOT_NO_COMMA,
VESSEL_TYPE,
NOT_NULL_MAX_LEN,
+ FRZ,
POSITION_COUNT = 22,
STRING_UNNUMBER = 23,
STRING_IMOCLASS = 24,
DRAUGHT_IMPLAUSIBLE = 25,
TIME_IMPLAUSIBLE = 26,
PORTAREA,
+ TRUNCATE = 28,
E121 = 121,
E122 = 122,
E123 = 123,
diff --git a/nsw/Source/bsmd.database/WAS.cs b/nsw/Source/bsmd.database/WAS.cs
index 90d564e9..32daedf6 100644
--- a/nsw/Source/bsmd.database/WAS.cs
+++ b/nsw/Source/bsmd.database/WAS.cs
@@ -312,10 +312,16 @@ namespace bsmd.database
{
foreach (Waste waste in this.Waste)
{
- RuleEngine.ValidateProperties(waste, errors);
+ RuleEngine.ValidateProperties(waste, errors, violations);
waste.Validate(errors, violations);
}
+ foreach(WasteDisposalServiceProvider wdsp in this.WasteDisposalServiceProvider)
+ {
+ RuleEngine.ValidateProperties(wdsp, errors, violations);
+ wdsp.Validate(errors, violations);
+ }
+
bool entryMissing = false;
int missingType = 0;
diff --git a/nsw/Source/bsmd.database/Waste.cs b/nsw/Source/bsmd.database/Waste.cs
index cb5a787b..5170be23 100644
--- a/nsw/Source/bsmd.database/Waste.cs
+++ b/nsw/Source/bsmd.database/Waste.cs
@@ -108,10 +108,12 @@ namespace bsmd.database
[ShowReport]
[MaxLength(5)]
[ENI2Validation]
+ [Validation(ValidationCode.LOCODE)]
public string WasteDisposalPort { get; set; }
[ShowReport]
[ENI2Validation]
+ [Validation(ValidationCode.NOT_NULL)]
public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; }
[ENI2Validation]
diff --git a/nsw/Source/bsmd.database/WasteDisposalServiceProvider.cs b/nsw/Source/bsmd.database/WasteDisposalServiceProvider.cs
index 2d9c13f9..c29cf8ca 100644
--- a/nsw/Source/bsmd.database/WasteDisposalServiceProvider.cs
+++ b/nsw/Source/bsmd.database/WasteDisposalServiceProvider.cs
@@ -27,8 +27,9 @@ namespace bsmd.database
public WAS WAS { get; set; }
[ShowReport]
- [MaxLength(100)]
+ [MaxLength(99)]
[ENI2Validation]
+ [Validation(ValidationCode.STRING_MAXLEN, 99)]
public string WasteDisposalServiceProviderName { get; set; }
[ShowReport]