diff --git a/ENI2/Controls/LocodeControl.xaml.cs b/ENI2/Controls/LocodeControl.xaml.cs
index 76117687..1777321b 100644
--- a/ENI2/Controls/LocodeControl.xaml.cs
+++ b/ENI2/Controls/LocodeControl.xaml.cs
@@ -79,6 +79,11 @@ namespace ENI2.Controls
portName = LocodeDB.PortNameFromLocode(value); break;
case RuleEngine.LocodeMode.SSN:
portName = LocodeDB.SSNPortNameFromLocode(value); break;
+ case RuleEngine.LocodeMode.OLD:
+ portName = LocodeDB.PortNameFromLocode(value);
+ if ((portName == null) && value.Equals("DEWHV"))
+ portName = "Stadthafen Wilhelmshaven";
+ break;
}
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
@@ -164,6 +169,18 @@ namespace ENI2.Controls
portname = LocodeDB.PortNameFromLocode(directLocode); break;
case RuleEngine.LocodeMode.SSN:
portname = LocodeDB.SSNPortNameFromLocode(directLocode); break;
+ case RuleEngine.LocodeMode.OLD:
+ {
+ if (directLocode.Equals("DEWHV"))
+ {
+ portname = "Stadthafen Wilhelmshaven";
+ }
+ else
+ {
+ portname = LocodeDB.PortNameFromLocode(directLocode);
+ }
+ }
+ break;
}
bool isLocode = !portname.IsNullOrEmpty();
@@ -191,6 +208,8 @@ namespace ENI2.Controls
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
case RuleEngine.LocodeMode.SSN:
locodeEntries = LocalizedLookup.SSNAllLocodesForCityNameAsEntries(lookupString); break;
+ case RuleEngine.LocodeMode.OLD:
+ locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
}
locodeEntries.Sort();
diff --git a/ENI2/EditControls/CopyDeclarationDialog.xaml b/ENI2/EditControls/CopyDeclarationDialog.xaml
index d6e59748..ab1978e3 100644
--- a/ENI2/EditControls/CopyDeclarationDialog.xaml
+++ b/ENI2/EditControls/CopyDeclarationDialog.xaml
@@ -60,7 +60,7 @@
ButtonSpinnerLocation="Right"
ParsingNumberStyle="Integer"
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
-
+
diff --git a/ENI2/EditControls/VisitIdDialog.xaml b/ENI2/EditControls/VisitIdDialog.xaml
index aaa5baa5..df85cc20 100644
--- a/ENI2/EditControls/VisitIdDialog.xaml
+++ b/ENI2/EditControls/VisitIdDialog.xaml
@@ -52,7 +52,7 @@
ButtonSpinnerLocation="Right"
ParsingNumberStyle="Integer"
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
-
+
diff --git a/bsmd.database/RuleEngine.cs b/bsmd.database/RuleEngine.cs
index df7114d9..f6c682d6 100644
--- a/bsmd.database/RuleEngine.cs
+++ b/bsmd.database/RuleEngine.cs
@@ -101,7 +101,8 @@ namespace bsmd.database
{
STANDARD,
NO_PORT_FLAG,
- SSN
+ SSN,
+ OLD // STANDARD + strange codes
};
public delegate bool LocodeValidHandler(string locode, LocodeMode mode);