Added special case for DEWHV for new Id dialogs (duh)
This commit is contained in:
parent
40908e1bb3
commit
36b596709a
@ -79,6 +79,11 @@ namespace ENI2.Controls
|
|||||||
portName = LocodeDB.PortNameFromLocode(value); break;
|
portName = LocodeDB.PortNameFromLocode(value); break;
|
||||||
case RuleEngine.LocodeMode.SSN:
|
case RuleEngine.LocodeMode.SSN:
|
||||||
portName = LocodeDB.SSNPortNameFromLocode(value); break;
|
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;
|
LocodeState locodeState = portName.IsNullOrEmpty() ? LocodeState.INVALID : LocodeState.OK;
|
||||||
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
|
this.SetLocodeStateImage(this.imageLocodeState, locodeState);
|
||||||
@ -164,6 +169,18 @@ namespace ENI2.Controls
|
|||||||
portname = LocodeDB.PortNameFromLocode(directLocode); break;
|
portname = LocodeDB.PortNameFromLocode(directLocode); break;
|
||||||
case RuleEngine.LocodeMode.SSN:
|
case RuleEngine.LocodeMode.SSN:
|
||||||
portname = LocodeDB.SSNPortNameFromLocode(directLocode); break;
|
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();
|
bool isLocode = !portname.IsNullOrEmpty();
|
||||||
@ -191,6 +208,8 @@ namespace ENI2.Controls
|
|||||||
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
|
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
|
||||||
case RuleEngine.LocodeMode.SSN:
|
case RuleEngine.LocodeMode.SSN:
|
||||||
locodeEntries = LocalizedLookup.SSNAllLocodesForCityNameAsEntries(lookupString); break;
|
locodeEntries = LocalizedLookup.SSNAllLocodesForCityNameAsEntries(lookupString); break;
|
||||||
|
case RuleEngine.LocodeMode.OLD:
|
||||||
|
locodeEntries = LocodeDB.AllLocodesForCityNameAsEntries(lookupString); break;
|
||||||
}
|
}
|
||||||
locodeEntries.Sort();
|
locodeEntries.Sort();
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
ButtonSpinnerLocation="Right"
|
ButtonSpinnerLocation="Right"
|
||||||
ParsingNumberStyle="Integer"
|
ParsingNumberStyle="Integer"
|
||||||
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Width="Auto" x:Name="locodePoC" />
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Width="Auto" x:Name="locodePoC" LocodeSource="OLD" />
|
||||||
<DatePicker Name="datePickerETA" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199">
|
<DatePicker Name="datePickerETA" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
ButtonSpinnerLocation="Right"
|
ButtonSpinnerLocation="Right"
|
||||||
ParsingNumberStyle="Integer"
|
ParsingNumberStyle="Integer"
|
||||||
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
Watermark="Enter ENI" ValueChanged="doubleUpDownENI_ValueChanged" TextAlignment="Left"/>
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" />
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" LocodeSource="OLD" />
|
||||||
<DatePicker Name="datePickerETA" Grid.Row="3" Grid.Column="1" Margin="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
<DatePicker Name="datePickerETA" Grid.Row="3" Grid.Column="1" Margin="2" SelectedDateChanged="datePickerETA_SelectedDateChanged" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
|
||||||
<DatePicker.BlackoutDates>
|
<DatePicker.BlackoutDates>
|
||||||
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
<CalendarDateRange Start="1/1/0001" End="12/31/1799"/>
|
||||||
|
|||||||
@ -101,7 +101,8 @@ namespace bsmd.database
|
|||||||
{
|
{
|
||||||
STANDARD,
|
STANDARD,
|
||||||
NO_PORT_FLAG,
|
NO_PORT_FLAG,
|
||||||
SSN
|
SSN,
|
||||||
|
OLD // STANDARD + strange codes
|
||||||
};
|
};
|
||||||
|
|
||||||
public delegate bool LocodeValidHandler(string locode, LocodeMode mode);
|
public delegate bool LocodeValidHandler(string locode, LocodeMode mode);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user