fixed PAS import details
This commit is contained in:
parent
3722223c64
commit
25f9e2eeaa
@ -19,15 +19,26 @@ namespace ENI2.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class LocodeControl : UserControl, INotifyPropertyChanged
|
public partial class LocodeControl : UserControl, INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region fields
|
||||||
|
|
||||||
private List<string> _locodeList = new List<string>();
|
private List<string> _locodeList = new List<string>();
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
private bool _comboSelect;
|
private bool _comboSelect;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Construction
|
||||||
|
|
||||||
public LocodeControl()
|
public LocodeControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Enums
|
||||||
|
|
||||||
protected enum LocodeState
|
protected enum LocodeState
|
||||||
{
|
{
|
||||||
UNKNOWN,
|
UNKNOWN,
|
||||||
@ -36,6 +47,15 @@ namespace ENI2.Controls
|
|||||||
AMBIGUOUS
|
AMBIGUOUS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public void SetFocus()
|
||||||
|
{
|
||||||
|
this.comboBoxLocode.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// used internally to load up drop down
|
/// used internally to load up drop down
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -89,10 +109,10 @@ namespace ENI2.Controls
|
|||||||
// MessageBox.Show(string.Format("CoerceValue is fired : Value {0}", Value));
|
// MessageBox.Show(string.Format("CoerceValue is fired : Value {0}", Value));
|
||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public RuleEngine.LocodeMode LocodeSource { get; set; }
|
public RuleEngine.LocodeMode LocodeSource { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region static methods
|
#region static methods
|
||||||
|
|
||||||
public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl),
|
public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl),
|
||||||
@ -220,6 +240,15 @@ namespace ENI2.Controls
|
|||||||
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocodeList"));
|
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocodeList"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void comboBoxLocode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if ((e.Key == System.Windows.Input.Key.Down) && !this.comboBoxLocode.IsDropDownOpen)
|
||||||
|
{
|
||||||
|
this.comboBoxLocode.IsDropDownOpen = true;
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region private/protected methods
|
#region private/protected methods
|
||||||
@ -246,13 +275,5 @@ namespace ENI2.Controls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void comboBoxLocode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
|
||||||
{
|
|
||||||
if((e.Key == System.Windows.Input.Key.Down) && !this.comboBoxLocode.IsDropDownOpen)
|
|
||||||
{
|
|
||||||
this.comboBoxLocode.IsDropDownOpen = true;
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>6</ApplicationRevision>
|
<ApplicationRevision>7</ApplicationRevision>
|
||||||
<ApplicationVersion>7.5.0.%2a</ApplicationVersion>
|
<ApplicationVersion>7.5.0.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
|
|||||||
@ -18,12 +18,12 @@
|
|||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Content="Type" Grid.Row="0" Grid.Column="0" />
|
<Label Content="Type" Grid.Row="0" Grid.Column="0" Focusable="False" />
|
||||||
<Label Content="Value" Grid.Row="1" Grid.Column="0" />
|
<Label Content="Value" Grid.Row="1" Grid.Column="0" Focusable="False" />
|
||||||
<Label Content="Selection" Grid.Row="2" Grid.Column="0" />
|
<Label Content="Selection" Grid.Row="2" Grid.Column="0" Focusable="False"/>
|
||||||
|
|
||||||
<TextBlock FontWeight="DemiBold" VerticalAlignment="Center" Name="textBlockType" Grid.Row="0" Grid.Column="1">bla</TextBlock>
|
<TextBlock FontWeight="DemiBold" VerticalAlignment="Center" Name="textBlockType" Grid.Row="0" Grid.Column="1" Focusable="False">bla</TextBlock>
|
||||||
<TextBlock FontWeight="DemiBold" VerticalAlignment="Center" Name="textBlockValue" Grid.Row="1" Grid.Column="1">bla</TextBlock>
|
<TextBlock FontWeight="DemiBold" VerticalAlignment="Center" Name="textBlockValue" Grid.Row="1" Grid.Column="1" Focusable="False">bla</TextBlock>
|
||||||
<xctk:WatermarkComboBox Grid.Column="1" Grid.Row="2" x:Name="comboBoxValues" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" Margin="2" IsEditable="True" Watermark="Select an appropriate value" />
|
<xctk:WatermarkComboBox Grid.Column="1" Grid.Row="2" x:Name="comboBoxValues" IsTextSearchEnabled="True" SelectedValuePath="Key" DisplayMemberPath="Value" Margin="2" IsEditable="True" Watermark="Select an appropriate value" />
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" x:Name="locodeControl" Visibility="Hidden" />
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" x:Name="locodeControl" Visibility="Hidden" />
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
using ENI2.Controls;
|
using ENI2.Controls;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
namespace ENI2.EditControls
|
namespace ENI2.EditControls
|
||||||
{
|
{
|
||||||
@ -51,17 +52,37 @@ namespace ENI2.EditControls
|
|||||||
|
|
||||||
public Dictionary<string, string> SelectionValues { get; set; }
|
public Dictionary<string, string> SelectionValues { get; set; }
|
||||||
|
|
||||||
|
#region event handler
|
||||||
|
|
||||||
private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
|
private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
this.EnableOK(false);
|
||||||
|
|
||||||
if (LocodeMode)
|
if (LocodeMode)
|
||||||
{
|
{
|
||||||
this.locodeControl.Focus();
|
this.locodeControl.SetFocus();
|
||||||
|
this.locodeControl.PropertyChanged += LocodeControl_PropertyChanged;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.comboBoxValues.ItemsSource = this.SelectionValues;
|
this.comboBoxValues.ItemsSource = this.SelectionValues;
|
||||||
|
this.comboBoxValues.SelectionChanged += ComboBoxValues_SelectionChanged;
|
||||||
this.comboBoxValues.Focus();
|
this.comboBoxValues.Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ComboBoxValues_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
string val = this.comboBoxValues.SelectedValue as string;
|
||||||
|
this.EnableOK(!val.IsNullOrEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LocodeControl_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
this.EnableOK(!locodeControl.LocodeValue.IsNullOrEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,9 +4,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace bsmd.database
|
namespace bsmd.database
|
||||||
{
|
{
|
||||||
@ -18,6 +15,8 @@ namespace bsmd.database
|
|||||||
public class HAZPosTemplate
|
public class HAZPosTemplate
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region enums
|
||||||
|
|
||||||
public enum SublistType
|
public enum SublistType
|
||||||
{
|
{
|
||||||
IBC,
|
IBC,
|
||||||
@ -26,6 +25,8 @@ namespace bsmd.database
|
|||||||
MARPOL
|
MARPOL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|||||||
@ -314,7 +314,9 @@ namespace bsmd.database
|
|||||||
|
|
||||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||||
{
|
{
|
||||||
/* Nach RM Christin / Trello vom 27.11.17 auskommentiert
|
// /* Nach RM Christin / Trello vom 27.11.17 auskommentiert
|
||||||
|
// und heute (19.10.22) wieder einkommentiert
|
||||||
|
|
||||||
if (this.PassengerPortOfDisembarkation != null)
|
if (this.PassengerPortOfDisembarkation != null)
|
||||||
{
|
{
|
||||||
if (this.PassengerPortOfDisembarkation.Equals("ZZUKN"))
|
if (this.PassengerPortOfDisembarkation.Equals("ZZUKN"))
|
||||||
@ -326,7 +328,7 @@ namespace bsmd.database
|
|||||||
if (this.PassengerPortOfEmbarkation.Equals("ZZUKN"))
|
if (this.PassengerPortOfEmbarkation.Equals("ZZUKN"))
|
||||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, "PassengerPortOfEmbarkation", null, this.Title, this.Identifier, this.Tablename));
|
violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, "PassengerPortOfEmbarkation", null, this.Title, this.Identifier, this.Tablename));
|
||||||
}
|
}
|
||||||
*/
|
// */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user