Merge branch 'release/eni_7.2.10'
This commit is contained in:
commit
cbfffa573d
@ -8,6 +8,7 @@ using System.Windows;
|
|||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace ENI2.Controls
|
namespace ENI2.Controls
|
||||||
{
|
{
|
||||||
@ -161,8 +162,9 @@ namespace ENI2.Controls
|
|||||||
}
|
}
|
||||||
if (!abort)
|
if (!abort)
|
||||||
{
|
{
|
||||||
var tabControl = Parent as ItemsControl;
|
var tabControl = Parent as TabControl;
|
||||||
tabControl.Items.Remove(this);
|
tabControl.SelectedItem = null;
|
||||||
|
_ = Dispatcher.BeginInvoke(new Action(() => tabControl.Items.Remove(this)), DispatcherPriority.Background);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
dockPanel.Children.Add(closeButton);
|
dockPanel.Children.Add(closeButton);
|
||||||
|
|||||||
@ -70,7 +70,7 @@ namespace ENI2
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Damit kann ein Listenelement eine Validierung der gesamten Anmeldung auslösen (inkl. Highlighting) (auf Knopfdruck)
|
/// Damit kann ein Listenelement eine Validierung der gesamten Anmeldung auslösen (inkl. Highlighting) (auf Knopfdruck)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action RequestValidate;
|
public event Action<bool> RequestValidate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Alle Meldeklassen die auf "zu versenden" stehen werden validiert und falls die Validierung scheitert auf "SUSPEND" gestellt
|
/// Alle Meldeklassen die auf "zu versenden" stehen werden validiert und falls die Validierung scheitert auf "SUSPEND" gestellt
|
||||||
@ -160,9 +160,9 @@ namespace ENI2
|
|||||||
this.RequestReload?.Invoke(coreId);
|
this.RequestReload?.Invoke(coreId);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnRequestValidate()
|
protected virtual void OnRequestValidate(bool showDialog)
|
||||||
{
|
{
|
||||||
this.RequestValidate?.Invoke();
|
this.RequestValidate?.Invoke(showDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnRequestSendValidation()
|
protected virtual void OnRequestSendValidation()
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="220" />
|
<ColumnDefinition Width="220" x:Name="leftColumnDefinition"/>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|||||||
@ -189,6 +189,7 @@ namespace ENI2
|
|||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text11DangerousCargoDeparture, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text11DangerousCargoDeparture, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" });
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text12ATAATD, MessageGroupControlType = typeof(ATAControl), ImagePath = "Resources/clock.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text12ATAATD, MessageGroupControlType = typeof(ATAControl), ImagePath = "Resources/clock.png" });
|
||||||
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text13WasteReceipts, MessageGroupControlType = typeof(WasteReceiptsControl), ImagePath = "Resources/garbage.png" });
|
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text13WasteReceipts, MessageGroupControlType = typeof(WasteReceiptsControl), ImagePath = "Resources/garbage.png" });
|
||||||
|
this.leftColumnDefinition.Width = new GridLength(260);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.listBoxMessages.ItemsSource = this._listBoxList;
|
this.listBoxMessages.ItemsSource = this._listBoxList;
|
||||||
@ -657,7 +658,7 @@ namespace ENI2
|
|||||||
|
|
||||||
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
|
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.DetailControl_RequestValidate();
|
this.DetailControl_RequestValidate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DetailControl_RequestReload(Guid id)
|
private void DetailControl_RequestReload(Guid id)
|
||||||
@ -770,9 +771,9 @@ namespace ENI2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DetailControl_RequestValidate()
|
private void DetailControl_RequestValidate(bool showDialog)
|
||||||
{
|
{
|
||||||
this.Validate(true, out _, out _);
|
this.Validate(showDialog, out _, out _);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Validate(bool showMessages, out List<MessageViolation> vViolations, out List<MessageError> vErrors)
|
private void Validate(bool showMessages, out List<MessageViolation> vViolations, out List<MessageError> vErrors)
|
||||||
@ -793,6 +794,15 @@ namespace ENI2
|
|||||||
List<MessageViolation> violations = new List<MessageViolation>();
|
List<MessageViolation> violations = new List<MessageViolation>();
|
||||||
ruleEngine.ValidateMessage(aMessage, out errors, out violations);
|
ruleEngine.ValidateMessage(aMessage, out errors, out violations);
|
||||||
|
|
||||||
|
if (errors.Count > 0)
|
||||||
|
aMessage.ErrorCount = errors.Count;
|
||||||
|
else
|
||||||
|
aMessage.ErrorCount = null;
|
||||||
|
if (violations.Count > 0)
|
||||||
|
aMessage.ViolationCount = violations.Count;
|
||||||
|
else
|
||||||
|
aMessage.ViolationCount = null;
|
||||||
|
|
||||||
string messageGroup = this.MessageGroupForMessage(aMessage);
|
string messageGroup = this.MessageGroupForMessage(aMessage);
|
||||||
|
|
||||||
if (messageGroup != null)
|
if (messageGroup != null)
|
||||||
@ -1278,7 +1288,7 @@ namespace ENI2
|
|||||||
|
|
||||||
private void _errorListDialog_RefreshClicked()
|
private void _errorListDialog_RefreshClicked()
|
||||||
{
|
{
|
||||||
DetailControl_RequestValidate();
|
DetailControl_RequestValidate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _errorListDialog_ErrorSelected(DatabaseEntity obj)
|
private void _errorListDialog_ErrorSelected(DatabaseEntity obj)
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
xmlns:data="clr-namespace:bsmd.database;assembly=bsmd.database"
|
xmlns:data="clr-namespace:bsmd.database;assembly=bsmd.database"
|
||||||
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
xmlns:local="clr-namespace:ENI2.DetailViewControls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="800">
|
d:DesignHeight="768" d:DesignWidth="1024">
|
||||||
<xctk:BusyIndicator Name="busyIndicator">
|
<xctk:BusyIndicator Name="busyIndicator">
|
||||||
<xctk:BusyIndicator.ProgressBarStyle>
|
<xctk:BusyIndicator.ProgressBarStyle>
|
||||||
<Style TargetType="ProgressBar">
|
<Style TargetType="ProgressBar">
|
||||||
@ -26,75 +26,85 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</xctk:BusyIndicator.BusyContent>
|
</xctk:BusyIndicator.BusyContent>
|
||||||
|
|
||||||
<GroupBox Name="visitTransitGroupBox" Header="{x:Static p:Resources.textVisitTransit}">
|
<GroupBox Name="visitTransitGroupBox" Header="{x:Static p:Resources.textOverview}">
|
||||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="400" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
|
||||||
<RowDefinition Height="4" />
|
<RowDefinition Height="4" />
|
||||||
<RowDefinition Height="32" />
|
<RowDefinition Height="36" />
|
||||||
<RowDefinition Height="32" />
|
|
||||||
<RowDefinition Height="4" />
|
<RowDefinition Height="4" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
|
||||||
|
<RowDefinition Height="4" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="28" />
|
||||||
|
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" Margin="0,0,10,0"/>
|
|
||||||
<enictrl:LocodeControl Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" IsEnabled="False" />
|
|
||||||
<!--Grid Grid.Column="1" Grid.Row="0" Width="Auto">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<xctk:WatermarkComboBox Grid.Column="0" x:Name="comboBoxPoC" Margin="2" IsEditable="True" Watermark="Type for Locode.." TextBoxBase.TextChanged="ComboBox_TextChanged" ItemsSource="{Binding LocodePoCList, Mode=TwoWay}" SelectedItem="{Binding PoC, Mode=TwoWay}" />
|
|
||||||
<Image Name="imagePoCState" Grid.Column="1" Source="../Resources/bullet_ball_grey.png" />
|
|
||||||
</-->
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="3" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0" />
|
|
||||||
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" IsReadOnly="True" Margin="2" VerticalContentAlignment="Center" />
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" Margin="0,0,10,0" />
|
|
||||||
<TextBox Name="textBoxIMO" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" Text="{Binding IMO, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="3" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
|
|
||||||
<TextBox Name="textBoxENI" Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Text="{Binding ENI, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="3" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" Value="{Binding ETAToPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" />
|
|
||||||
<xctk:DateTimePicker Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="2" Value="{Binding ETDFromPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
|
||||||
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
|
||||||
<xctk:DateTimePicker Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="3" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
|
||||||
<Label HorizontalAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textTicketNo}" Margin="0,0,10,0" />
|
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="3" Content="{x:Static p:Resources.textCreated}" Margin="0,0,10,0" />
|
|
||||||
<Label Name="labelCreated" Grid.Column="4" Grid.Row="4" Margin="2, 0, 0, 0" />
|
|
||||||
<Button Name="buttonFormblattNeu" Grid.Column="4" Grid.Row="7" Margin="2" Click="buttonFormblattNeu_Click" >
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="Formblatt neu"></TextBlock>
|
|
||||||
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<TextBox Name="textBoxTicketNo" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2" Text="{Binding TicketNo, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" VerticalContentAlignment="Center" MaxLength="50"/>
|
|
||||||
|
|
||||||
<Label Grid.Column="0" Grid.Row="6" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelBSMDStatusInternal" Content="{Binding BSMDStatusInternal, StringFormat={}{0}}" VerticalContentAlignment="Center" FontWeight="Bold" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0" />
|
||||||
<Button IsEnabled="True" Name="buttonStorno" Grid.Column="1" Grid.Row="6" Margin="2" Click="buttonStorno_Click" Content="{x:Static p:Resources.textCancelDeclaration}" Background="Red"/>
|
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" IsReadOnly="True" Margin="2" VerticalContentAlignment="Center" />
|
||||||
<Button IsEnabled="True" Name="buttonCopy" Grid.Column="2" Grid.Row="6" Margin="2" Click="buttonCopy_Click" Content="{x:Static p:Resources.textCopyData}"/>
|
|
||||||
<Button IsEnabled="True" Name="buttonSendPDF" Grid.Column="3" Grid.Row="6" Margin="2" Click="buttonSendPDF_Click">
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" Margin="0,0,10,0"/>
|
||||||
<StackPanel Orientation="Horizontal">
|
<enictrl:LocodeControl Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" IsEnabled="False" />
|
||||||
<TextBlock Text="{x:Static p:Resources.textCreatePDF}"></TextBlock>
|
|
||||||
<Image Source="../Resources/document_pdf.png" Margin="10,0,5,0" Height="16"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" Margin="0,0,10,0" />
|
||||||
</StackPanel>
|
<TextBox Name="textBoxIMO" Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="1" Text="{Binding IMO, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
||||||
</Button>
|
|
||||||
<Button Name="buttonQueryHIS" Grid.Column="4" Grid.Row="6" Margin="2" Click="buttonQueryHIS_Click" Content="{x:Static p:Resources.textQueryHIS}"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
|
||||||
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="6">
|
<TextBox Name="textBoxENI" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding ENI, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" IsReadOnly="True" VerticalContentAlignment="Center"/>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4" Value="{Binding ETAToPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" />
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="5" Value="{Binding ETDFromPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="6" Value="{Binding ATAPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
|
||||||
|
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Value="{Binding ATDPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00"/>
|
||||||
|
|
||||||
|
<Label HorizontalAlignment="Right" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Margin="0,0,10,0" />
|
||||||
|
<TextBox Name="textBoxTicketNo" Grid.Column="1" Grid.Row="8" Grid.ColumnSpan="2" Text="{Binding TicketNo, Mode=TwoWay, Converter={util:TrimStringConverter}}" Margin="2" VerticalContentAlignment="Center" MaxLength="50"/>
|
||||||
|
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" Margin="0,0,10,0" />
|
||||||
|
<Label Name="labelCreated" Grid.Column="1" Grid.Row="9" Margin="2, 0, 0, 0" />
|
||||||
|
|
||||||
|
<Label Grid.Column="2" Grid.Row="9" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelBSMDStatusInternal" Content="{Binding BSMDStatusInternal, StringFormat={}{0}}" VerticalContentAlignment="Center" FontWeight="Bold" />
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="11">
|
||||||
<Button Name="buttonRefresh" Margin="2" Click="buttonRefresh_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipRefresh}">
|
<Button Name="buttonRefresh" Margin="2" Click="buttonRefresh_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipRefresh}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Image Source="../Resources/nav_refresh_blue.png" Margin="0,0,5,0" Height="24"/>
|
<Image Source="../Resources/nav_refresh_blue.png" Margin="0,0,5,0" Height="24"/>
|
||||||
@ -114,15 +124,45 @@
|
|||||||
</Button>
|
</Button>
|
||||||
-->
|
-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Label Grid.Column="0" Grid.Row="7" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelCancelled" VerticalContentAlignment="Center" FontWeight="Bold" />
|
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="11" Visibility="Hidden" Name="stackPanelLock">
|
||||||
<Label Grid.Column="1" Grid.Row="7" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelHIS" VerticalContentAlignment="Center" Content="{x:Static p:Resources.textSendToHIS}" />
|
<Image Source="../Resources/lock.png" Margin="0,0,5,0" Height="24" />
|
||||||
<ComboBox Grid.Column="2" Grid.Row="7" Margin="2" Name="comboBoxInitialHis" VerticalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedValue="{Binding Path=InitialHIS}" />
|
<TextBlock Name="textBlockLockUserName" VerticalAlignment="Center" />
|
||||||
<Button Grid.Column="3" Grid.Row="7" Margin="2" Name="buttonExcelImport" Click="buttonExcelImport_Click">
|
</StackPanel>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Grid.Row="13" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelHIS" VerticalContentAlignment="Center" Content="{x:Static p:Resources.textSendToHIS}" />
|
||||||
|
<ComboBox Grid.Column="1" Grid.Row="13" Margin="2" Name="comboBoxInitialHis" VerticalContentAlignment="Center" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedValue="{Binding Path=InitialHIS}" />
|
||||||
|
|
||||||
|
<Button IsEnabled="True" Name="buttonSendAll" Grid.Column="1" Grid.Row="14" Content="{x:Static p:Resources.textSendAll}" Margin="2" Click="buttonSendAll_Click" />
|
||||||
|
|
||||||
|
<Button Grid.Column="1" Grid.Row="16" Margin="2" Name="buttonExcelImport" Click="buttonExcelImport_Click">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{x:Static p:Resources.textExcelImport}"></TextBlock>
|
<TextBlock Text="{x:Static p:Resources.textExcelImport}"></TextBlock>
|
||||||
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Button IsEnabled="True" Name="buttonSendPDF" Grid.Column="1" Grid.Row="17" Margin="2" Click="buttonSendPDF_Click">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{x:Static p:Resources.textCreatePDF}"></TextBlock>
|
||||||
|
<Image Source="../Resources/document_pdf.png" Margin="10,0,5,0" Height="16"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button Name="buttonQueryHIS" Grid.Column="1" Grid.Row="18" Margin="2" Click="buttonQueryHIS_Click" Content="{x:Static p:Resources.textQueryHIS}"/>
|
||||||
|
<Button IsEnabled="True" Name="buttonCopy" Grid.Column="1" Grid.Row="19" Margin="2" Click="buttonCopy_Click" Content="{x:Static p:Resources.textCopyData}"/>
|
||||||
|
|
||||||
|
<Button Name="buttonFormblattNeu" Grid.Column="1" Grid.Row="20" Margin="2" Click="buttonFormblattNeu_Click" >
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Formblatt neu"></TextBlock>
|
||||||
|
<Image Source="../Resources/excel.png" Margin="10,0,5,0" Height="16"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button IsEnabled="True" Name="buttonStorno" Grid.Column="1" Grid.Row="22" Margin="2" Click="buttonStorno_Click" Content="{x:Static p:Resources.textCancelDeclaration}" Background="Red"/>
|
||||||
|
<Label Grid.Column="2" Grid.Row="21" Margin="0,0,10,0" HorizontalContentAlignment="Right" Name="labelCancelled" VerticalContentAlignment="Center" FontWeight="Bold" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<Button Grid.Column="4" Grid.Row="7" Margin="2" Name="buttonExcelExport" Click="buttonExcelExport_Click">
|
<Button Grid.Column="4" Grid.Row="7" Margin="2" Name="buttonExcelExport" Click="buttonExcelExport_Click">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@ -131,14 +171,64 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
-->
|
-->
|
||||||
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="4" Visibility="Hidden" Name="stackPanelLock">
|
|
||||||
<Image Source="../Resources/lock.png" Margin="0,0,5,0" Height="24" />
|
|
||||||
<TextBlock Name="textBlockLockUserName" VerticalAlignment="Center" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
<!-- Data Grid -->
|
<!-- Data Grid -->
|
||||||
<DataGrid Grid.Row="9" Grid.ColumnSpan="6" Margin="0,8,0,0" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
|
<DataGrid Grid.Row="0" Grid.ColumnSpan="1" Grid.Column="1" Margin="2" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
|
||||||
SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown">
|
SelectionMode="Extended" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown">
|
||||||
|
<DataGrid.Resources>
|
||||||
|
|
||||||
|
<Style TargetType="{x:Type DataGridColumnHeadersPresenter}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
|
||||||
|
<Grid Background="Transparent" Grid.IsSharedSizeScope="True">
|
||||||
|
<!-- 3 header rows: 0 = main title, 1 = group headers, 2 = real column headers -->
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- One ColumnDefinition per DataGridTextColumn (or shared‐size groups) -->
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[0].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[1].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[2].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[3].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[4].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[5].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[6].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[7].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[8].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[9].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[10].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[11].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[12].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[13].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[14].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<ColumnDefinition Width="{Binding Columns[15].ActualWidth, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
|
<!-- …add as many as you need… -->
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- Row 0: A single big header across all columns -->
|
||||||
|
<!--TextBlock Grid.Row="0" Grid.ColumnSpan="4" Text="Main Application" HorizontalAlignment="Center" FontWeight="Bold"/ -->
|
||||||
|
|
||||||
|
<!-- Row 1: your “banded” group headers -->
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="5" Grid.ColumnSpan="2" Text="{x:Static p:Resources.textENIStatus}" HorizontalAlignment="Stretch" TextAlignment="Center" Padding="0,2,0,4" Background="AntiqueWhite" />
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="9" Text="{x:Static p:Resources.textNSWStatus}" HorizontalAlignment="Stretch" TextAlignment="Center" Padding="0,2,0,4" Background="AliceBlue"/>
|
||||||
|
|
||||||
|
<!-- Row 2: the real column headers -->
|
||||||
|
<!-- This invisible filler ensures the layout lines up -->
|
||||||
|
<DataGridColumnHeader x:Name="PART_FillerColumnHeader" Grid.Row="1" Grid.ColumnSpan="14" IsHitTestVisible="False"/>
|
||||||
|
<!-- And here the ItemsPresenter will place each DataGridColumnHeader -->
|
||||||
|
<ItemsPresenter Grid.Row="1" Grid.ColumnSpan="16"/>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Resources>
|
||||||
<DataGrid.RowStyle>
|
<DataGrid.RowStyle>
|
||||||
<Style TargetType="DataGridRow">
|
<Style TargetType="DataGridRow">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@ -166,18 +256,18 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
|
|
||||||
<DataGridTemplateColumn Header=" " Width="SizeToCells" IsReadOnly="True">
|
<DataGridTemplateColumn Header=" " Width="SizeToCells" IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<!--Image Source="{Binding src:Util.ImageDict[ENINotificationDetailGroup]}" /-->
|
<!--Image Source="{Binding src:Util.ImageDict[ENINotificationDetailGroup]}" /-->
|
||||||
<!--Image Source="{Binding Source={x:Static src:Util.ImageDict}, Path=[ENINotificationDetailGroup]}"></-->
|
<!--Image Source="{Binding Source={x:Static src:Util.ImageDict}, Path=[ENINotificationDetailGroup]}"></-->
|
||||||
<Image Source="{Binding ENINotificationIconString, Converter={util:NullImageConverter}}" />
|
<Image Source="{Binding ENINotificationIconString, Converter={util:NullImageConverter}}" Height="24" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textNotificationClass}" Binding="{Binding MessageNotificationClassDisplay}"
|
<DataGridTextColumn Header="{x:Static p:Resources.textNotificationClass}" Binding="{Binding MessageNotificationClassDisplay}" IsReadOnly="True" Width="0.075*" FontWeight="Bold">
|
||||||
IsReadOnly="True" Width="0.075*" FontWeight="Bold">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
@ -185,6 +275,75 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textStatus}" Binding="{Binding BSMDStatusOverviewDisplay}" IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textChangedBy}" Binding="{Binding ChangedBy}" IsReadOnly="True" Width="0.2*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.15*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textErrors}" IsReadOnly="True" Width="0.1*" Binding="{Binding ErrorCount}">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
|
<Setter Property="FontWeight" Value="DemiBold" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textViolations}" IsReadOnly="True" Width="0.1*" Binding="{Binding ViolationCount}">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||||
|
<Setter Property="FontWeight" Value="DemiBold" />
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="HIS" Binding="{Binding HISOverviewDisplay}" IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textReceivedAt}" Binding="{Binding ReceivedAt}" IsReadOnly="True" Width="0.15*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
|
<DataGridTextColumn Header="{x:Static p:Resources.textSentBy}" Binding="{Binding SentBy}" IsReadOnly="True" Width="0.1*">
|
||||||
|
<DataGridTextColumn.ElementStyle>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</DataGridTextColumn.ElementStyle>
|
||||||
|
</DataGridTextColumn>
|
||||||
|
|
||||||
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -257,6 +416,7 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
|
|
||||||
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
<DataGridTemplateColumn Header="" Width="SizeToCells" IsReadOnly="True">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -269,41 +429,7 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textChanged}" Binding="{Binding Changed}" IsReadOnly="True" Width="0.15*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textReceivedAt}" Binding="{Binding ReceivedAt}" IsReadOnly="True" Width="0.15*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textStatus}" Binding="{Binding InternalStatus}" IsReadOnly="True" Width="0.1*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="HIS" Binding="{Binding HIS}" IsReadOnly="True" Width="0.1*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textSentBy}" Binding="{Binding SentBy}" IsReadOnly="True" Width="0.1*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textStatusInfo}" Binding="{Binding StatusInfo}" IsReadOnly="True" Width="0.2*">
|
<DataGridTextColumn Header="{x:Static p:Resources.textStatusInfo}" Binding="{Binding StatusInfo}" IsReadOnly="True" Width="0.2*">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
@ -311,13 +437,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="{x:Static p:Resources.textChangedBy}" Binding="{Binding ChangedBy}" IsReadOnly="True" Width="0.2*">
|
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -22,6 +22,7 @@ using System.Diagnostics;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using static bsmd.database.Message;
|
using static bsmd.database.Message;
|
||||||
using PdfSharp.Fonts;
|
using PdfSharp.Fonts;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -30,6 +31,9 @@ namespace ENI2.DetailViewControls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class OverViewDetailControl : DetailBaseControl
|
public partial class OverViewDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region Fields
|
||||||
|
|
||||||
private Message _message = null;
|
private Message _message = null;
|
||||||
private Message _ataMessage;
|
private Message _ataMessage;
|
||||||
private Message _atdMessage;
|
private Message _atdMessage;
|
||||||
@ -39,12 +43,20 @@ namespace ENI2.DetailViewControls
|
|||||||
private readonly object _collectionLock = new object();
|
private readonly object _collectionLock = new object();
|
||||||
// private MessageSendStatusDialog mssd = null;
|
// private MessageSendStatusDialog mssd = null;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Construction
|
||||||
|
|
||||||
public OverViewDetailControl()
|
public OverViewDetailControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Loaded += OverViewDetailControl_Loaded;
|
this.Loaded += OverViewDetailControl_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Initialize
|
||||||
|
|
||||||
private void OverViewDetailControl_Loaded(object sender, RoutedEventArgs e)
|
private void OverViewDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// die Controls nach Änderungen monitoren
|
// die Controls nach Änderungen monitoren
|
||||||
@ -61,18 +73,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.RegisterDateTimePickerChange(this.dateTimePickerETD, Message.NotificationClass.NOA_NOD);
|
this.RegisterDateTimePickerChange(this.dateTimePickerETD, Message.NotificationClass.NOA_NOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CoreLocode_LocodeChanged(object sender, PropertyChangedEventArgs e)
|
|
||||||
{
|
|
||||||
this.OnNotificationClassChanged(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CoreTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
|
||||||
{
|
|
||||||
this.OnNotificationClassChanged(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Initialize
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
bool iAmAdmin = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsAdmin;
|
bool iAmAdmin = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsAdmin;
|
||||||
@ -318,6 +318,8 @@ namespace ENI2.DetailViewControls
|
|||||||
BindingOperations.EnableCollectionSynchronization(this.Messages, _collectionLock);
|
BindingOperations.EnableCollectionSynchronization(this.Messages, _collectionLock);
|
||||||
this.dataGridMessages.ItemsSource = this.Messages;
|
this.dataGridMessages.ItemsSource = this.Messages;
|
||||||
|
|
||||||
|
this.OnRequestValidate(false);
|
||||||
|
|
||||||
base.Initialize(); // wenn Meldeklassen erst bei der Init. erzeugt werden, fehlen die Handler, die hier erneut festgelegt werden
|
base.Initialize(); // wenn Meldeklassen erst bei der Init. erzeugt werden, fehlen die Handler, die hier erneut festgelegt werden
|
||||||
this._initialized = true;
|
this._initialized = true;
|
||||||
}
|
}
|
||||||
@ -431,9 +433,16 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
MessageBoxResult result = MessageBox.Show(Properties.Resources.textConfirmSend, Properties.Resources.textConfirm, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
MessageBoxResult result = MessageBox.Show(Properties.Resources.textConfirmSend, Properties.Resources.textConfirm, MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
if (result == MessageBoxResult.Yes)
|
if (result == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
this.SendMessages(this.dataGridMessages.SelectedItems.Cast<Message>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SendMessages(IEnumerable<Message> messages)
|
||||||
{
|
{
|
||||||
bool somethingsNotSaved = false;
|
bool somethingsNotSaved = false;
|
||||||
foreach (Message selectedMessage in this.dataGridMessages.SelectedItems)
|
|
||||||
|
foreach (Message selectedMessage in messages)
|
||||||
{
|
{
|
||||||
if (selectedMessage.IsDirty) somethingsNotSaved = true;
|
if (selectedMessage.IsDirty) somethingsNotSaved = true;
|
||||||
}
|
}
|
||||||
@ -445,7 +454,7 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Message> watchList = new List<Message>();
|
List<Message> watchList = new List<Message>();
|
||||||
foreach (Message selectedMessage in this.dataGridMessages.SelectedItems)
|
foreach (Message selectedMessage in messages)
|
||||||
{
|
{
|
||||||
if (selectedMessage.Reset) selectedMessage.Reset = false; // "nochmal" Versenden ist möglich
|
if (selectedMessage.Reset) selectedMessage.Reset = false; // "nochmal" Versenden ist möglich
|
||||||
selectedMessage.InternalStatus = Message.BSMDStatus.TOSEND;
|
selectedMessage.InternalStatus = Message.BSMDStatus.TOSEND;
|
||||||
@ -468,7 +477,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.OnRequestSendValidation();
|
this.OnRequestSendValidation();
|
||||||
this.dataGridMessages.Items.Refresh();
|
this.dataGridMessages.Items.Refresh();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (this.mssd == null)
|
if (this.mssd == null)
|
||||||
{
|
{
|
||||||
@ -490,7 +498,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.mssd.AddMessages(watchList);
|
this.mssd.AddMessages(watchList);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void contextResetMessage(object sender, RoutedEventArgs e)
|
private void contextResetMessage(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@ -623,6 +630,16 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#region event handler
|
#region event handler
|
||||||
|
|
||||||
|
private void CoreLocode_LocodeChanged(object sender, PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
this.OnNotificationClassChanged(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CoreTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
this.OnNotificationClassChanged(null);
|
||||||
|
}
|
||||||
|
|
||||||
private void _checkStatusTimer_Elapsed(object sender, ElapsedEventArgs e)
|
private void _checkStatusTimer_Elapsed(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
bool? statusFlag = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoreQueryStatusFlag(this.Core.Id.Value);
|
bool? statusFlag = DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).GetMessageCoreQueryStatusFlag(this.Core.Id.Value);
|
||||||
@ -731,7 +748,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private void buttonValidate_Click(object sender, RoutedEventArgs e)
|
private void buttonValidate_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
this.OnRequestValidate();
|
this.OnRequestValidate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -761,7 +778,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.OnRequestReload(this.Core.Id.Value);
|
this.OnRequestReload(this.Core.Id.Value);
|
||||||
|
|
||||||
// validate all selected import classes (Finger with "selection")
|
// validate all selected import classes (Finger with "selection")
|
||||||
this.OnRequestValidate();
|
this.OnRequestValidate(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -815,6 +832,55 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void buttonSendAll_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
SelectImportClassesDialog sicd = new SelectImportClassesDialog();
|
||||||
|
List<Message.NotificationClass> readyToSendMessages = new List<Message.NotificationClass>();
|
||||||
|
|
||||||
|
foreach (Message message in this.Messages)
|
||||||
|
{
|
||||||
|
// Evaluate a number of criteria for messages that should not be preselected for sending
|
||||||
|
if (((message.ViolationCount ?? 0) > 0) || ((message.ErrorCount ?? 0) > 0)) continue; // these need more work
|
||||||
|
if (Message.IsListClass(message.MessageNotificationClass) && (message.Elements.Count == 0)) continue; // avoid suspend on empty list classes
|
||||||
|
if ((message.MessageNotificationClass == Message.NotificationClass.HAZA) && !XtraSendLogic.ShouldSendMessage(message)) continue;
|
||||||
|
if ((message.MessageNotificationClass == Message.NotificationClass.HAZD) && !XtraSendLogic.ShouldSendMessage(message)) continue;
|
||||||
|
if (message.MessageNotificationClass == Message.NotificationClass.BPOL)
|
||||||
|
{
|
||||||
|
if (message.Elements.Count > 0)
|
||||||
|
{
|
||||||
|
if (message.Elements[0] is BPOL bpol)
|
||||||
|
{
|
||||||
|
if (bpol.PortOfItineraries.Count == 0) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
readyToSendMessages.Add(message.MessageNotificationClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
sicd.Messages = this.Messages;
|
||||||
|
sicd.PreselectedClasses.AddRange(readyToSendMessages);
|
||||||
|
sicd.IsTransit = this.Core.IsTransit;
|
||||||
|
sicd.IsImportMode = false;
|
||||||
|
|
||||||
|
if ((sicd.ShowDialog() ?? false) && (sicd.SelectedClasses.Count > 0))
|
||||||
|
{
|
||||||
|
// now send all selected messages
|
||||||
|
List<Message> toSendMessages = new List<Message>();
|
||||||
|
foreach(NotificationClass notificationClass in sicd.SelectedClasses)
|
||||||
|
{
|
||||||
|
Message selectedMessage = this.Messages.Find(x => x.MessageNotificationClass == notificationClass);
|
||||||
|
if (selectedMessage != null)
|
||||||
|
{
|
||||||
|
toSendMessages.Add(selectedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toSendMessages.Count > 0)
|
||||||
|
{
|
||||||
|
this.SendMessages(toSendMessages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="600" d:DesignWidth="800">
|
d:DesignHeight="600" d:DesignWidth="800">
|
||||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
|
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
|
||||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
<ScrollViewer>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="300" />
|
<RowDefinition Height="300" />
|
||||||
@ -92,8 +92,9 @@
|
|||||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" Margin="0,0,10,0" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" Margin="0,0,10,0" />
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textWasteDisposalServiceProvider}" Margin="0,0,10,0" />
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCountry}" Name="label_AgentCountry" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCountry}" Name="label_AgentCountry" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textAgentTemplate}" Name="labelAgentTemplate" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textAgentTemplate}" Name="labelAgentTemplate" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textTitle}" Name="labelAgentTemplateTitle" Margin="0,0,10,0" Visibility="Hidden" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textTitle}" Name="labelAgentTemplateTitle" Margin="0,0,10,0" Visibility="Hidden" />
|
||||||
@ -104,10 +105,11 @@
|
|||||||
<TextBox Grid.Row="3" Grid.Column="3" Name="textBox_AgentCity" MaxLength="99" Margin="2" Text="{Binding AgentCity, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="3" Grid.Column="3" Name="textBox_AgentCity" MaxLength="99" Margin="2" Text="{Binding AgentCity, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="1" Name="textBox_AgentCountry" MaxLength="99" Margin="2" Text="{Binding AgentCountry, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" />
|
<TextBox Grid.Row="3" Grid.Column="1" Name="textBox_AgentCountry" MaxLength="99" Margin="2" Text="{Binding AgentCountry, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" />
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="5" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="6" Grid.Column="3" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="5" Grid.Column="3" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="6" Grid.Column="1" Name="textBox_AgentPhone" MaxLength="99" Margin="2" Text="{Binding AgentPhone, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="6" Grid.Column="1" Name="textBox_AgentPhone" MaxLength="99" Margin="2" Text="{Binding AgentPhone, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="7" Grid.Column="3" Name="textBox_AgentFax" MaxLength="99" Margin="2" Text="{Binding AgentFax, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="6" Grid.Column="3" Name="textBox_AgentFax" MaxLength="99" Margin="2" Text="{Binding AgentFax, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="7" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="7" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
|
<TextBox Grid.Row="7" Grid.Column="3" Name="textBox_WasteDisposalServiceProvider" MaxLength="99" Margin="2" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
|
|
||||||
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
||||||
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
||||||
|
|||||||
@ -25,6 +25,7 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
private NOA_NOD _noa_nod;
|
private NOA_NOD _noa_nod;
|
||||||
private AGNT _agnt;
|
private AGNT _agnt;
|
||||||
|
private WAS _was;
|
||||||
private static List<AGNT_Template> _agntTemplates = null;
|
private static List<AGNT_Template> _agntTemplates = null;
|
||||||
private AGNT_Template _currentTemplate;
|
private AGNT_Template _currentTemplate;
|
||||||
private AGNT_Template _undoTemplate;
|
private AGNT_Template _undoTemplate;
|
||||||
@ -95,6 +96,16 @@ namespace ENI2.DetailViewControls
|
|||||||
_agnt = new AGNT();
|
_agnt = new AGNT();
|
||||||
this.ControlMessages.Add(aMessage);
|
this.ControlMessages.Add(aMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(aMessage.MessageNotificationClass == Message.NotificationClass.WAS)
|
||||||
|
{
|
||||||
|
if (aMessage.Elements.Count > 0)
|
||||||
|
_was = aMessage.Elements[0] as WAS;
|
||||||
|
else
|
||||||
|
_was = new WAS();
|
||||||
|
this.ControlMessages.Add(aMessage);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dateTimePicker_ETAToKielCanal.IsEnabled = this.Core.IsTransit;
|
this.dateTimePicker_ETAToKielCanal.IsEnabled = this.Core.IsTransit;
|
||||||
@ -123,6 +134,8 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dateTimePicker_ETDFromLastPort.DataContext = _noa_nod;
|
this.dateTimePicker_ETDFromLastPort.DataContext = _noa_nod;
|
||||||
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
|
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
|
||||||
|
|
||||||
|
this.textBox_WasteDisposalServiceProvider.DataContext = _was;
|
||||||
|
|
||||||
this.checkBox_IsAnchored.IsEnabled = this.Core.IsDK;
|
this.checkBox_IsAnchored.IsEnabled = this.Core.IsDK;
|
||||||
|
|
||||||
if(_agntTemplates == null)
|
if(_agntTemplates == null)
|
||||||
@ -337,6 +350,9 @@ namespace ENI2.DetailViewControls
|
|||||||
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentStreetAndNumber.Text = this._undoTemplate.AgentStreetAndNumber;
|
this.textBox_AgentStreetAndNumber.Text = this._undoTemplate.AgentStreetAndNumber;
|
||||||
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.textBox_WasteDisposalServiceProvider.Text = this._undoTemplate.WasteDisposalServiceProviderName;
|
||||||
|
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
|
||||||
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
|
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
|
||||||
}
|
}
|
||||||
@ -345,6 +361,13 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
if (this._currentTemplate == null) return;
|
if (this._currentTemplate == null) return;
|
||||||
|
|
||||||
|
// confirm overwrite of waste disposal service provider
|
||||||
|
if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0)
|
||||||
|
{
|
||||||
|
string message = string.Format(Properties.Resources.textConfirmWSDPOverwrite, this.textBox_WasteDisposalServiceProvider.Text, this._currentTemplate.WasteDisposalServiceProviderName);
|
||||||
|
if (MessageBox.Show(message, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) { return; }
|
||||||
|
}
|
||||||
|
|
||||||
this._undoTemplate = createFromCurrentText(null, null);
|
this._undoTemplate = createFromCurrentText(null, null);
|
||||||
|
|
||||||
this.textBox_AgentCity.Text = this._currentTemplate.AgentCity;
|
this.textBox_AgentCity.Text = this._currentTemplate.AgentCity;
|
||||||
@ -356,7 +379,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.textBox_AgentEMail.Text = this._currentTemplate.AgentEMail;
|
this.textBox_AgentEMail.Text = this._currentTemplate.AgentEMail;
|
||||||
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentFax.Text = this._currentTemplate.AgentFax;
|
this.textBox_AgentFax.Text = this._currentTemplate.AgentFax;
|
||||||
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentFax.GetBindingExpression (TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentFirstName.Text = this._currentTemplate.AgentFirstName;
|
this.textBox_AgentFirstName.Text = this._currentTemplate.AgentFirstName;
|
||||||
this.textBox_AgentFirstName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentFirstName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentLastName.Text = this._currentTemplate.AgentLastName;
|
this.textBox_AgentLastName.Text = this._currentTemplate.AgentLastName;
|
||||||
@ -367,6 +390,9 @@ namespace ENI2.DetailViewControls
|
|||||||
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
|
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
|
||||||
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
|
||||||
|
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
|
||||||
this.buttonUndoTemplate.IsEnabled = true;
|
this.buttonUndoTemplate.IsEnabled = true;
|
||||||
this.buttonSetTemplate.IsEnabled = false;
|
this.buttonSetTemplate.IsEnabled = false;
|
||||||
@ -392,6 +418,7 @@ namespace ENI2.DetailViewControls
|
|||||||
at.AgentPhone = this.textBox_AgentPhone.Text;
|
at.AgentPhone = this.textBox_AgentPhone.Text;
|
||||||
at.AgentPostalCode = this.textBox_AgentPostalCode.Text;
|
at.AgentPostalCode = this.textBox_AgentPostalCode.Text;
|
||||||
at.AgentStreetAndNumber = textBox_AgentStreetAndNumber.Text;
|
at.AgentStreetAndNumber = textBox_AgentStreetAndNumber.Text;
|
||||||
|
at.WasteDisposalServiceProviderName = textBox_WasteDisposalServiceProvider.Text;
|
||||||
|
|
||||||
return at;
|
return at;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,6 @@
|
|||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textAccurateDetailsGiven}" Name="label_AccurateDetailsGiven" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textAccurateDetailsGiven}" Name="label_AccurateDetailsGiven" Margin="0,0,10,0"/>
|
||||||
<!--TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static p:Resources.textAccurateDetailsGiven}" Name="label_ETAToPortOfCall" Margin="0,0,10,0" TextWrapping="Wrap" FontSize="10"/-->
|
<!--TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static p:Resources.textAccurateDetailsGiven}" Name="label_ETAToPortOfCall" Margin="0,0,10,0" TextWrapping="Wrap" FontSize="10"/-->
|
||||||
@ -56,38 +55,9 @@
|
|||||||
<enictrl:LocodeControl Grid.Row="2" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
<enictrl:LocodeControl Grid.Row="2" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
||||||
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlNextWastePort" LocodeValue="{Binding NextWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
<enictrl:LocodeControl Grid.Row="3" Grid.Column="1" x:Name="locodeCtrlNextWastePort" LocodeValue="{Binding NextWasteDisposalPort, Mode=TwoWay}" LocodeSource="SSN" />
|
||||||
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" Margin="2" />
|
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" Margin="2" />
|
||||||
<Label Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right" Content="{x:Static p:Resources.textAgentTemplate}" Margin="0,0,10,0" />
|
|
||||||
<ComboBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" Name="comboBox_WSDPTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="Remark" SelectionChanged="comboBox_WSDPTemplate_SelectionChanged" />
|
<Button Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
||||||
<Grid Grid.Row="6" Grid.Column="3" Grid.ColumnSpan="1" Name="gridTemplateControls" Visibility="Visible">
|
<Button Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<!-- Name -->
|
|
||||||
<ColumnDefinition Width="26"/>
|
|
||||||
<!-- Save button -->
|
|
||||||
<ColumnDefinition Width="26"/>
|
|
||||||
<!-- Delete button -->
|
|
||||||
<ColumnDefinition Width="52"/>
|
|
||||||
<!-- Undo button -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBox Grid.Column="0" Margin="2" Name="textBoxTemplateTitle" VerticalContentAlignment="Center"/>
|
|
||||||
<Button Name="buttonSaveTemplate" Grid.Column="1" Grid.Row="0" Margin="2" Click="buttonSaveTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Save template">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/floppy_disk_blue.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonDeleteTemplate" Grid.Column="2" Grid.Row="0" Margin="2" Click="buttonDeleteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonUndoTemplate" Grid.Column="3" Grid.Row="0" Margin="22,2,2,2" Click="buttonUndoTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Undo last overwrite" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/undo.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
<Button Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
|
||||||
<Button Grid.Row="7" Grid.Column="2" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<enictrl:ENIDataGrid x:Name="dataGridWaste" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid x:Name="dataGridWaste" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="1" CanUserAddRows="False">
|
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="1" CanUserAddRows="False">
|
||||||
|
|||||||
@ -13,8 +13,6 @@ using ExcelDataReader;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ENI2.DetailViewControls
|
namespace ENI2.DetailViewControls
|
||||||
{
|
{
|
||||||
@ -24,14 +22,14 @@ namespace ENI2.DetailViewControls
|
|||||||
public partial class WasteDetailControl : DetailBaseControl
|
public partial class WasteDetailControl : DetailBaseControl
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region Fields
|
||||||
|
|
||||||
private Message _wasMessage;
|
private Message _wasMessage;
|
||||||
private WAS _was;
|
private WAS _was;
|
||||||
private Message _wasRcptMessage;
|
private Message _wasRcptMessage;
|
||||||
private WAS_RCPT _selectedWAS_RCPT;
|
private WAS_RCPT _selectedWAS_RCPT;
|
||||||
|
|
||||||
private static List<WasteDisposalServiceProvider_Template> _wsdpTemplates = null;
|
#endregion
|
||||||
private WasteDisposalServiceProvider_Template _currentTemplate;
|
|
||||||
private string _undoTemplate;
|
|
||||||
|
|
||||||
public WasteDetailControl()
|
public WasteDetailControl()
|
||||||
{
|
{
|
||||||
@ -177,14 +175,6 @@ namespace ENI2.DetailViewControls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region init WSDP provider
|
|
||||||
|
|
||||||
await InitTemplates();
|
|
||||||
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int SelectedTabIndex
|
public override int SelectedTabIndex
|
||||||
@ -227,7 +217,7 @@ namespace ENI2.DetailViewControls
|
|||||||
dataGridWasteReceipt_SelectionChanged(this, null);
|
dataGridWasteReceipt_SelectionChanged(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
await InitTemplates(); // templates might have changed in the dialog
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj)
|
private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj)
|
||||||
@ -273,7 +263,7 @@ namespace ENI2.DetailViewControls
|
|||||||
this.dataGridWasteReceipt.Items.Refresh();
|
this.dataGridWasteReceipt.Items.Refresh();
|
||||||
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
|
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
|
||||||
dataGridWasteReceipt_SelectionChanged(this, null);
|
dataGridWasteReceipt_SelectionChanged(this, null);
|
||||||
await InitTemplates(); // templates might have changed in the dialog
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e)
|
||||||
@ -591,101 +581,6 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Waste disposal Service Provider templates event handler
|
|
||||||
|
|
||||||
private async Task InitTemplates()
|
|
||||||
{
|
|
||||||
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
|
|
||||||
_wsdpTemplates.Sort();
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = null;
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
Trace.WriteLine($"{_wsdpTemplates.Count} WSDP templates loaded");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void comboBox_WSDPTemplate_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
Trace.WriteLine("WSDP combo selection changed");
|
|
||||||
if(this.comboBox_WSDPTemplate.SelectedItem is WasteDisposalServiceProvider_Template wdsp_t)
|
|
||||||
{
|
|
||||||
this.textBoxTemplateTitle.Text = wdsp_t.Remark;
|
|
||||||
this.buttonDeleteTemplate.IsEnabled = true;
|
|
||||||
this._currentTemplate = wdsp_t;
|
|
||||||
this._undoTemplate = this.textBoxWasteDisposalServiceProviders.Text.Trim();
|
|
||||||
this.buttonUndoTemplate.IsEnabled = this._undoTemplate.Length > 0;
|
|
||||||
this.textBoxWasteDisposalServiceProviders.Text = wdsp_t.WasteDisposalServiceProviderName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void buttonSaveTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
string currentWSDPProviderName = this.textBoxWasteDisposalServiceProviders.Text.Trim();
|
|
||||||
string currentRemark = this.textBoxTemplateTitle.Text.Trim();
|
|
||||||
|
|
||||||
if ((currentWSDPProviderName.Length == 0) || (currentRemark.Length == 0)) return;
|
|
||||||
|
|
||||||
WasteDisposalServiceProvider_Template existingTemplate = null;
|
|
||||||
foreach(WasteDisposalServiceProvider_Template wdsp_template in _wsdpTemplates)
|
|
||||||
{
|
|
||||||
// bei gefundenem Match wird ggf. der Remark überschrieben
|
|
||||||
if (wdsp_template.Remark.Equals(currentRemark))
|
|
||||||
{
|
|
||||||
existingTemplate = wdsp_template;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(existingTemplate != null)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("A template with this name already exists, overwrite?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
|
|
||||||
return;
|
|
||||||
|
|
||||||
existingTemplate.WasteDisposalServiceProviderName = currentWSDPProviderName;
|
|
||||||
await DBManagerAsync.SaveAsync(existingTemplate);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
WasteDisposalServiceProvider_Template newTemplate = new WasteDisposalServiceProvider_Template();
|
|
||||||
newTemplate.WasteDisposalServiceProviderName = currentWSDPProviderName;
|
|
||||||
newTemplate.Remark = currentRemark;
|
|
||||||
await DBManagerAsync.SaveAsync(newTemplate);
|
|
||||||
|
|
||||||
comboBox_WSDPTemplate.ItemsSource = null;
|
|
||||||
_wsdpTemplates.Add(newTemplate);
|
|
||||||
_wsdpTemplates.Sort();
|
|
||||||
comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
MessageBox.Show("Template saved", "OK", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonDeleteTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if(_currentTemplate != null)
|
|
||||||
{
|
|
||||||
if (MessageBox.Show("Delete this template?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
this.comboBox_WSDPTemplate.SelectedItem = null;
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = null;
|
|
||||||
DBManager.Instance.Delete(_currentTemplate);
|
|
||||||
_wsdpTemplates.Remove(_currentTemplate);
|
|
||||||
this.textBoxTemplateTitle.Text = null;
|
|
||||||
this.buttonDeleteTemplate.IsEnabled = false;
|
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buttonUndoTemplate_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if(this._undoTemplate != null)
|
|
||||||
{
|
|
||||||
this.textBoxWasteDisposalServiceProviders.Text = this._undoTemplate;
|
|
||||||
this.buttonUndoTemplate.IsEnabled = false;
|
|
||||||
this._undoTemplate = null;
|
|
||||||
this.comboBox_WSDPTemplate.SelectedItem = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Copy WAS to WAS_RCPT handler
|
#region Copy WAS to WAS_RCPT handler
|
||||||
|
|||||||
@ -36,8 +36,8 @@
|
|||||||
<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>2</ApplicationRevision>
|
<ApplicationRevision>8</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.9.2</ApplicationVersion>
|
<ApplicationVersion>7.2.10.8</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
@ -140,29 +140,29 @@
|
|||||||
<Reference Include="log4net, Version=3.1.0.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=3.1.0.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\log4net.3.1.0\lib\net462\log4net.dll</HintPath>
|
<HintPath>packages\log4net.3.1.0\lib\net462\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.9.0.6\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.9.0.7\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Bcl.Cryptography.9.0.6\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
<HintPath>packages\Microsoft.Bcl.Cryptography.9.0.7\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=9.0.0.6, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=9.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Extensions.DependencyInjection.9.0.6\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
<HintPath>packages\Microsoft.Extensions.DependencyInjection.9.0.7\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=9.0.0.6, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=9.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.6\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.7\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging, Version=9.0.0.6, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging, Version=9.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Extensions.Logging.9.0.6\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
|
<HintPath>packages\Microsoft.Extensions.Logging.9.0.7\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.6, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.9.0.6\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.9.0.7\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Options, Version=9.0.0.6, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Options, Version=9.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Extensions.Options.9.0.6\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
|
<HintPath>packages\Microsoft.Extensions.Options.9.0.7\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Extensions.Primitives, Version=9.0.0.6, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Extensions.Primitives, Version=9.0.0.7, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Extensions.Primitives.9.0.6\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
<HintPath>packages\Microsoft.Extensions.Primitives.9.0.7\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
|
<HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
|
||||||
@ -214,12 +214,12 @@
|
|||||||
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
<HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=9.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Diagnostics.DiagnosticSource.9.0.6\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
<HintPath>packages\System.Diagnostics.DiagnosticSource.9.0.7\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Formats.Asn1, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Formats.Asn1, Version=9.0.0.7, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Formats.Asn1.9.0.6\lib\net462\System.Formats.Asn1.dll</HintPath>
|
<HintPath>packages\System.Formats.Asn1.9.0.7\lib\net462\System.Formats.Asn1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
@ -234,8 +234,8 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
<Reference Include="System.Security.Cryptography.Pkcs, Version=9.0.0.6, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Security.Cryptography.Pkcs, Version=9.0.0.7, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Security.Cryptography.Pkcs.9.0.6\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
<HintPath>packages\System.Security.Cryptography.Pkcs.9.0.7\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.ServiceModel.Web" />
|
<Reference Include="System.ServiceModel.Web" />
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace ENI2.EditControls
|
|||||||
OKClicked += EditWasteReceiptDialog_OKClicked;
|
OKClicked += EditWasteReceiptDialog_OKClicked;
|
||||||
this.AddVisible = true;
|
this.AddVisible = true;
|
||||||
|
|
||||||
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
|
_wsdpTemplates = await DBManagerAsync.GetWasteDisposalServiceProviderTemplatesAsync();
|
||||||
_wsdpTemplates.Sort();
|
_wsdpTemplates.Sort();
|
||||||
Trace.WriteLine($"{_wsdpTemplates.Count} WSDP templates loaded");
|
Trace.WriteLine($"{_wsdpTemplates.Count} WSDP templates loaded");
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||||
xmlns:p="clr-namespace:ENI2.Properties"
|
xmlns:p="clr-namespace:ENI2.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{x:Static p:Resources.textSelectImportClasses}" Height="600" Width="250" Background="AliceBlue">
|
Title="{x:Static p:Resources.textSelectImportClasses}" Height="660" Width="250" Background="AliceBlue">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*" />
|
<RowDefinition Height="1*" />
|
||||||
|
|||||||
@ -1,14 +1,13 @@
|
|||||||
// Copyright (c) 2017-today schick Informatik
|
// Copyright (c) 2017-today schick Informatik
|
||||||
// Description: Select classes for import
|
// Description: Select classes for import via Excel or for sending them once completed
|
||||||
// Returns: Array of selected classes as property
|
// Returns: Array of selected classes as property
|
||||||
|
|
||||||
|
using bsmd.database;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
using bsmd.database;
|
|
||||||
|
|
||||||
namespace ENI2.EditControls
|
namespace ENI2.EditControls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -17,7 +16,8 @@ namespace ENI2.EditControls
|
|||||||
public partial class SelectImportClassesDialog : ENI2.Controls.EditWindowBase
|
public partial class SelectImportClassesDialog : ENI2.Controls.EditWindowBase
|
||||||
{
|
{
|
||||||
private readonly List<SelectClass> _selectClasses = new List<SelectClass>();
|
private readonly List<SelectClass> _selectClasses = new List<SelectClass>();
|
||||||
private readonly List<bsmd.database.Message.NotificationClass> _selectedClasses = new List<Message.NotificationClass>();
|
private readonly List<Message.NotificationClass> _selectedClasses = new List<Message.NotificationClass>();
|
||||||
|
private readonly List<Message.NotificationClass> _preselectedClasses = new List<Message.NotificationClass>();
|
||||||
|
|
||||||
public SelectImportClassesDialog()
|
public SelectImportClassesDialog()
|
||||||
{
|
{
|
||||||
@ -25,33 +25,61 @@ namespace ENI2.EditControls
|
|||||||
this.Loaded += SelectImportClassesDialog_Loaded;
|
this.Loaded += SelectImportClassesDialog_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of all message classes that are available for selection
|
||||||
|
/// </summary>
|
||||||
public List<Message.NotificationClass> SelectedClasses
|
public List<Message.NotificationClass> SelectedClasses
|
||||||
{
|
{
|
||||||
get { return _selectedClasses; }
|
get { return _selectedClasses; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Classes that should be checked already when the dialog is opened (relevant for send mode)
|
||||||
|
/// </summary>
|
||||||
|
public List<Message.NotificationClass > PreselectedClasses
|
||||||
|
{
|
||||||
|
get { return _preselectedClasses; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// These messages are needed to derive message classes from, already sorted in the right manner
|
/// These messages are needed to derive message classes from, already sorted in the right manner
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<Message> Messages { get; set; }
|
public List<Message> Messages { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Flag to reduce selection amount in case of transit
|
||||||
|
/// </summary>
|
||||||
public bool IsTransit { get; set; }
|
public bool IsTransit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Flag if dialog is used in import mode (default true). Set false for send all mode.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsImportMode { get; set; } = true;
|
||||||
|
|
||||||
private void SelectImportClassesDialog_Loaded(object sender, RoutedEventArgs e)
|
private void SelectImportClassesDialog_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
foreach (Message aMessage in this.Messages)
|
foreach (Message aMessage in this.Messages)
|
||||||
{
|
{
|
||||||
|
// these are of no interest
|
||||||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.VISIT) ||
|
if ((aMessage.MessageNotificationClass == Message.NotificationClass.VISIT) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
|
||||||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.STO))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// these are neither imported nor sent by the Send all function
|
||||||
|
|
||||||
|
if ((aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
||||||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
|
// filter out messages not relevant for transit
|
||||||
|
if (IsTransit && (
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.STO)
|
(aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) ||
|
||||||
) continue;
|
|
||||||
|
|
||||||
if (IsTransit &&
|
|
||||||
((aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) ||
|
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.BPOL) ||
|
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.INFO) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.INFO) ||
|
||||||
(aMessage.MessageNotificationClass == Message.NotificationClass.LADG) ||
|
(aMessage.MessageNotificationClass == Message.NotificationClass.LADG) ||
|
||||||
@ -65,12 +93,13 @@ namespace ENI2.EditControls
|
|||||||
)) continue;
|
)) continue;
|
||||||
|
|
||||||
SelectClass sc = new SelectClass();
|
SelectClass sc = new SelectClass();
|
||||||
sc.Name = Enum.GetName(typeof(bsmd.database.Message.NotificationClass), aMessage.MessageNotificationClass);
|
sc.Name = Enum.GetName(typeof(Message.NotificationClass), aMessage.MessageNotificationClass);
|
||||||
sc.Class = aMessage.MessageNotificationClass;
|
sc.Class = aMessage.MessageNotificationClass;
|
||||||
sc.IsSelected = false;
|
sc.IsSelected = this._preselectedClasses.Contains(sc.Class);
|
||||||
_selectClasses.Add(sc);
|
_selectClasses.Add(sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.checkListBoxClasses.ItemsSource = _selectClasses;
|
this.checkListBoxClasses.ItemsSource = _selectClasses;
|
||||||
this.OKClicked += SelectImportClassesDialog_OKClicked;
|
this.OKClicked += SelectImportClassesDialog_OKClicked;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ namespace ENI2.Excel
|
|||||||
if (portName.IsNullOrEmpty())
|
if (portName.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
_log.WarnFormat("unknown Locode {0}", val);
|
_log.WarnFormat("unknown Locode {0}", val);
|
||||||
val = "";
|
val = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
@ -1239,7 +1239,8 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
if ((reader.Mode == ExcelReader.CountryMode.DE) && waste.IsDashWasteCode)
|
if ((reader.Mode == ExcelReader.CountryMode.DE) && waste.IsDashWasteCode)
|
||||||
{
|
{
|
||||||
waste.WasteDescription = "-";
|
// waste.WasteDescription = "-";
|
||||||
|
// NOP
|
||||||
}
|
}
|
||||||
else if (reader.Mode == ExcelReader.CountryMode.DK)
|
else if (reader.Mode == ExcelReader.CountryMode.DK)
|
||||||
{
|
{
|
||||||
@ -1279,18 +1280,19 @@ namespace ENI2.Excel
|
|||||||
if (waste.WasteType == 2309) waste.WasteType = 507;
|
if (waste.WasteType == 2309) waste.WasteType = 507;
|
||||||
if (waste.WasteType == 3000) waste.WasteType = 401;
|
if (waste.WasteType == 3000) waste.WasteType = 401;
|
||||||
|
|
||||||
waste.WasteDisposalAmount_MTQ = reader.ReadNumberDefaultZero(wasteAmount);
|
waste.WasteDisposalAmount_MTQ = reader.ReadNumber(wasteAmount);
|
||||||
waste.WasteCapacity_MTQ = reader.ReadNumberDefaultZero(wasteCapacity);
|
if (!waste.WasteDisposalAmount_MTQ.HasValue && reader.ReadText(wasteAmount).IsNullOrEmpty()) waste.WasteDisposalAmount_MTQ = 0;
|
||||||
waste.WasteAmountRetained_MTQ = reader.ReadNumberDefaultZero(wasteRetained);
|
waste.WasteCapacity_MTQ = reader.ReadNumber(wasteCapacity);
|
||||||
|
if (!waste.WasteCapacity_MTQ.HasValue && reader.ReadText(wasteCapacity).IsNullOrEmpty()) waste.WasteCapacity_MTQ = 0;
|
||||||
|
waste.WasteAmountRetained_MTQ = reader.ReadNumber(wasteRetained);
|
||||||
|
if (!waste.WasteAmountRetained_MTQ.HasValue && reader.ReadText(wasteRetained).IsNullOrEmpty()) waste.WasteAmountRetained_MTQ = 0;
|
||||||
|
|
||||||
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
|
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
|
||||||
|
|
||||||
if (waste.WasteDisposalPort.IsNullOrEmpty())
|
if ((waste.WasteDisposalPort == null) && reader.ReadText(wastePort).IsNullOrEmpty()) waste.WasteDisposalPort = "ZZUKN";
|
||||||
{
|
|
||||||
waste.WasteDisposalPort = "ZZUKN";
|
|
||||||
}
|
|
||||||
|
|
||||||
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumberDefaultZero(amountGen);
|
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumber(amountGen);
|
||||||
|
if (!waste.WasteAmountGeneratedTillNextPort_MTQ.HasValue && reader.ReadText(amountGen).IsNullOrEmpty()) waste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
||||||
|
|
||||||
if (!waste.WasteType.HasValue || (waste.WasteType > 999))
|
if (!waste.WasteType.HasValue || (waste.WasteType > 999))
|
||||||
{
|
{
|
||||||
@ -1298,7 +1300,8 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
was.AddMissingWaste();
|
was.AddMissingWaste(false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1368,7 +1371,7 @@ namespace ENI2.Excel
|
|||||||
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
|
wr.WasteCode.Equals("204") || wr.WasteCode.Equals("510") || wr.WasteCode.Equals("511"))
|
||||||
wr.WasteDescription = "-";
|
wr.WasteDescription = "-";
|
||||||
}
|
}
|
||||||
wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount) ?? (double?)0; // Default ist 0, nicht nix ;-)
|
wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount); // ?? (double?)0; // Default ist 0, nicht nix ;-) // Update: wir wollen doch einen Fehler
|
||||||
}
|
}
|
||||||
|
|
||||||
// only add message when an identification number was given
|
// only add message when an identification number was given
|
||||||
@ -1418,10 +1421,10 @@ namespace ENI2.Excel
|
|||||||
int i = 1;
|
int i = 1;
|
||||||
foreach (LastTenPortFacilitiesCalled ltpfc in sec.LastTenPortFacilitesCalled)
|
foreach (LastTenPortFacilitiesCalled ltpfc in sec.LastTenPortFacilitesCalled)
|
||||||
{
|
{
|
||||||
if (!(mdh.GetSublistElementWithIdentifier((i + 1).ToString()) is PortOfCallLast30Days poc30d))
|
if (!(mdh.GetSublistElementWithIdentifier((i).ToString()) is PortOfCallLast30Days poc30d))
|
||||||
{
|
{
|
||||||
poc30d = new PortOfCallLast30Days();
|
poc30d = new PortOfCallLast30Days();
|
||||||
poc30d.Identifier = (i + 1).ToString();
|
poc30d.Identifier = (i).ToString();
|
||||||
poc30d.MDH = mdh;
|
poc30d.MDH = mdh;
|
||||||
mdh.PortOfCallLast30Days.Add(poc30d);
|
mdh.PortOfCallLast30Days.Add(poc30d);
|
||||||
}
|
}
|
||||||
@ -1435,15 +1438,15 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
else // "normal mode", aus den Zellen lesen
|
else // "normal mode", aus den Zellen lesen
|
||||||
{
|
{
|
||||||
|
|
||||||
|
string sheetTitle = "1. VOYAGE";
|
||||||
|
// 4.8.25: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
||||||
|
if (reader.HasWorksheetNamed(sheetTitle))
|
||||||
|
{
|
||||||
|
|
||||||
// POC last 30 days
|
// POC last 30 days
|
||||||
for (int i = 0; i < mdh.NumberOfExcelRows; i++)
|
for (int i = 0; i < mdh.NumberOfExcelRows; i++)
|
||||||
{
|
{
|
||||||
string portName = string.Format("MDH.PortOfCallLast30DaysPort_{0}", i + 1);
|
|
||||||
string portCountry = string.Format("MDH.PortOfCallLast30DaysCountry_{0}", i + 1);
|
|
||||||
string locode = string.Format("MDH.PortOfCallLast30DaysLocode_{0}", i + 1);
|
|
||||||
string crewJoined = string.Format("MDH.PortOfCallLast30DaysCrewMembersJoined_{0}", i + 1);
|
|
||||||
string crewName = string.Format("MDH.PortOfCallLast30DaysCrewJoinedShipName_{0}", i + 1);
|
|
||||||
string depDate = string.Format("MDH.PortOfCallLast30DaysDateOfDeparture_{0}", i + 1);
|
|
||||||
|
|
||||||
if (!(mdh.GetSublistElementWithIdentifier((i + 1).ToString()) is PortOfCallLast30Days poc30d))
|
if (!(mdh.GetSublistElementWithIdentifier((i + 1).ToString()) is PortOfCallLast30Days poc30d))
|
||||||
{
|
{
|
||||||
@ -1453,16 +1456,17 @@ namespace ENI2.Excel
|
|||||||
mdh.PortOfCallLast30Days.Add(poc30d);
|
mdh.PortOfCallLast30Days.Add(poc30d);
|
||||||
}
|
}
|
||||||
|
|
||||||
string pName = reader.ReadText(portName);
|
string pName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", 82 + i));
|
||||||
string pCountry = reader.ReadText(portCountry);
|
string pCountry = reader.ReadCellAsText(sheetTitle, string.Format("E{0}", 82 + i));
|
||||||
|
|
||||||
poc30d.PortOfCallLast30DaysDateOfDeparture = reader.ReadDate(depDate);
|
poc30d.PortOfCallLast30DaysDateOfDeparture = reader.ReadCellAsDateTime(sheetTitle, string.Format("G{0}", 82 + i));
|
||||||
poc30d.PortOfCallLast30DaysLocode = reader.ReadLoCode(locode);
|
poc30d.PortOfCallLast30DaysLocode = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", 82 + i));
|
||||||
|
if (LocodeDB.PortNameFromLocode(poc30d.PortOfCallLast30DaysLocode).IsNullOrEmpty()) poc30d.PortOfCallLast30DaysLocode = "";
|
||||||
|
|
||||||
// Verbesserungsvorschlag Jul/21: CrewMembersJoined Häkchen abhängig von den Namen in der Spalte
|
// Verbesserungsvorschlag Jul/21: CrewMembersJoined Häkchen abhängig von den Namen in der Spalte
|
||||||
bool? PortOfCallLast30DaysCrewMembersJoinedFlag = reader.ReadBoolean(crewJoined);
|
bool? PortOfCallLast30DaysCrewMembersJoinedFlag = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", 82 + i));
|
||||||
|
|
||||||
string crewNameString = reader.ReadText(crewName);
|
string crewNameString = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 82 + i));
|
||||||
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty();
|
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty();
|
||||||
|
|
||||||
// if crew members joined is set explicitly to true and the name is empty, still set the field to true
|
// if crew members joined is set explicitly to true and the name is empty, still set the field to true
|
||||||
@ -1491,10 +1495,11 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Leer/def. Zeilen entfernen
|
// Leer/def. Zeilen entfernen
|
||||||
if (!poc30d.PortOfCallLast30DaysDateOfDeparture.HasValue && (poc30d.PortOfCallLast30DaysLocode == null))
|
if (!poc30d.PortOfCallLast30DaysDateOfDeparture.HasValue && (poc30d.PortOfCallLast30DaysLocode.IsNullOrEmpty()))
|
||||||
mdh.PortOfCallLast30Days.Remove(poc30d);
|
mdh.PortOfCallLast30Days.Remove(poc30d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion PoC last 30 days
|
#endregion PoC last 30 days
|
||||||
|
|
||||||
@ -1605,6 +1610,9 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
|
|
||||||
SEC sec = secMessage.Elements[0] as SEC;
|
SEC sec = secMessage.Elements[0] as SEC;
|
||||||
|
|
||||||
|
((ISublistContainer)sec).DeleteElements();
|
||||||
|
|
||||||
ScanMessage(sec, reader);
|
ScanMessage(sec, reader);
|
||||||
|
|
||||||
reader.ReadBoolean("SEC.AreMatterToReport"); // das berücksichtigen wir derzeit nicht in der DB (implizit)
|
reader.ReadBoolean("SEC.AreMatterToReport"); // das berücksichtigen wir derzeit nicht in der DB (implizit)
|
||||||
@ -1655,33 +1663,32 @@ namespace ENI2.Excel
|
|||||||
if (!sec.KielCanalPassagePlannedIncomming.HasValue && !sec.KielCanalPassagePlannedOutgoing.HasValue)
|
if (!sec.KielCanalPassagePlannedIncomming.HasValue && !sec.KielCanalPassagePlannedOutgoing.HasValue)
|
||||||
sec.KielCanalPassagePlanned = false;
|
sec.KielCanalPassagePlanned = false;
|
||||||
|
|
||||||
// Last10PortFacilitesCalled
|
|
||||||
for (int i = 1; i <= 10; i++)
|
|
||||||
{
|
|
||||||
string portName = string.Format("SEC.PortFacilityPortName_{0}", i);
|
|
||||||
string portCountry = string.Format("SEC.PortFacilityPortCountry_{0}", i);
|
|
||||||
string portLocode = string.Format("SEC.PortFacilityPortLoCode_{0}", i);
|
|
||||||
string portDateOfArrival = string.Format("SEC.PortFacilityDateOfArrival_{0}", i);
|
|
||||||
string portDateOfDeparture = string.Format("SEC.PortFacilityDateOfDeparture_{0}", i);
|
|
||||||
string portShipSecLevel = string.Format("SEC.PortFacilityShipSecurityLevel_{0}", i);
|
|
||||||
string portGISISCode = string.Format("SEC.PortFacilityGISISCode_{0}", i);
|
|
||||||
string portSecMatters = string.Format("SEC.PortFacilitySecurityMattersToReport_{0}", i);
|
|
||||||
|
|
||||||
if (!(sec.GetPortFacilityWithIdentifier(i.ToString()) is LastTenPortFacilitiesCalled l10fc))
|
|
||||||
|
string sheetTitle = "1. VOYAGE";
|
||||||
|
// 4.8.25: Changed this area to work like reading from a Dakosy Sheet (by values in rows, not cell names)
|
||||||
|
if (reader.HasWorksheetNamed(sheetTitle))
|
||||||
|
{
|
||||||
|
// Last10PortFacilitesCalled
|
||||||
|
for (int i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!(sec.GetPortFacilityWithIdentifier((i + 1).ToString()) is LastTenPortFacilitiesCalled l10fc))
|
||||||
{
|
{
|
||||||
l10fc = new LastTenPortFacilitiesCalled();
|
l10fc = new LastTenPortFacilitiesCalled();
|
||||||
l10fc.Identifier = i.ToString();
|
l10fc.Identifier = (i + 1).ToString();
|
||||||
l10fc.SEC = sec;
|
l10fc.SEC = sec;
|
||||||
sec.LastTenPortFacilitesCalled.Add(l10fc);
|
sec.LastTenPortFacilitesCalled.Add(l10fc);
|
||||||
}
|
}
|
||||||
|
|
||||||
l10fc.PortFacilityPortName = reader.ReadText(portName);
|
l10fc.PortFacilityPortName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", 54 + i), 99);
|
||||||
l10fc.PortFacilityPortCountry = reader.ReadText(portCountry);
|
l10fc.PortFacilityPortCountry = reader.ReadCellAsText(sheetTitle, string.Format("E{0}", 54 + i), 99);
|
||||||
l10fc.PortFacilityPortLoCode = reader.ReadLoCode(portLocode);
|
l10fc.PortFacilityPortLoCode = reader.ReadCellAsText(sheetTitle, string.Format("F{0}", 54 + i), 5);
|
||||||
l10fc.PortFacilityDateOfArrival = reader.ReadDate(portDateOfArrival);
|
if (LocodeDB.PortNameFromLocode(l10fc.PortFacilityPortLoCode).IsNullOrEmpty()) l10fc.PortFacilityPortLoCode = "";
|
||||||
l10fc.PortFacilityDateOfDeparture = reader.ReadDate(portDateOfDeparture);
|
l10fc.PortFacilityDateOfArrival = reader.ReadCellAsDateTime(sheetTitle, string.Format("G{0}", 54 + i));
|
||||||
|
l10fc.PortFacilityDateOfDeparture = reader.ReadCellAsDateTime(sheetTitle, string.Format("H{0}", 54 + i));
|
||||||
|
|
||||||
string sLevel = reader.ReadText(portShipSecLevel);
|
string sLevel = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 54 + i), 1);
|
||||||
if (!sLevel.IsNullOrEmpty())
|
if (!sLevel.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1;
|
if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1;
|
||||||
@ -1689,7 +1696,7 @@ namespace ENI2.Excel
|
|||||||
if (sLevel.Contains('3')) l10fc.PortFacilityShipSecurityLevel = 3;
|
if (sLevel.Contains('3')) l10fc.PortFacilityShipSecurityLevel = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
l10fc.PortFacilityGISISCode = reader.ReadTextNoWhitespace(portGISISCode);
|
l10fc.PortFacilityGISISCode = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", 54 + i), 4);
|
||||||
|
|
||||||
if (l10fc.PortFacilityGISISCode.IsNullOrEmpty() || l10fc.PortFacilityGISISCode == "0")
|
if (l10fc.PortFacilityGISISCode.IsNullOrEmpty() || l10fc.PortFacilityGISISCode == "0")
|
||||||
l10fc.PortFacilityGISISCode = "0000";
|
l10fc.PortFacilityGISISCode = "0000";
|
||||||
@ -1698,7 +1705,7 @@ namespace ENI2.Excel
|
|||||||
while (l10fc.PortFacilityGISISCode.Length < 4) l10fc.PortFacilityGISISCode = "0" + l10fc.PortFacilityGISISCode;
|
while (l10fc.PortFacilityGISISCode.Length < 4) l10fc.PortFacilityGISISCode = "0" + l10fc.PortFacilityGISISCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
l10fc.PortFacilitySecurityMattersToReport = reader.ReadText(portSecMatters);
|
l10fc.PortFacilitySecurityMattersToReport = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", 54 + i), 255);
|
||||||
|
|
||||||
// keinen "leeren" Hafen anlegen, wenn der Eintrag leer war (trifft anscheinend bei Neubauten zu, siehe E-Mail Christin vom 20./22.6.17
|
// keinen "leeren" Hafen anlegen, wenn der Eintrag leer war (trifft anscheinend bei Neubauten zu, siehe E-Mail Christin vom 20./22.6.17
|
||||||
if (l10fc.PortFacilityPortName.IsNullOrEmpty() && l10fc.PortFacilityPortLoCode.IsNullOrEmpty() && l10fc.PortFacilityPortCountry.IsNullOrEmpty())
|
if (l10fc.PortFacilityPortName.IsNullOrEmpty() && l10fc.PortFacilityPortLoCode.IsNullOrEmpty() && l10fc.PortFacilityPortCountry.IsNullOrEmpty())
|
||||||
@ -1706,46 +1713,39 @@ namespace ENI2.Excel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ship2ShipActivities
|
// Ship2ShipActivities
|
||||||
for (int i = 1; i <= 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
string s2sName = string.Format("SEC.ShipToShipActivityLocationName_{0}", i);
|
|
||||||
string s2sLocode = string.Format("SEC.ShipToShipActivityLocationLoCode_{0}", i);
|
|
||||||
string s2sLatitude = string.Format("SEC.ShipToShipActivityLocationCoordinatesLatitude_{0}", i);
|
|
||||||
string s2sLongitude = string.Format("SEC.ShipToShipActivityLocationCoordinatesLongitude_{0}", i);
|
|
||||||
string s2sFromDate = string.Format("SEC.ShipToShipActivityDateFrom_{0}", i);
|
|
||||||
string s2sToDate = string.Format("SEC.ShipToShipActivityDateTo_{0}", i);
|
|
||||||
string s2sSec = string.Format("SEC.ShipToShipActivitySecurityMattersToReport_{0}", i);
|
|
||||||
string s2sActivityString = string.Format("SEC.ShipToShipActivityType_{0}", i);
|
|
||||||
|
|
||||||
|
if (!(sec.GetShipToShipWithIdentifier((i + 1).ToString()) is ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2sActivity))
|
||||||
if (!(sec.GetShipToShipWithIdentifier(i.ToString()) is ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2sActivity))
|
|
||||||
{
|
{
|
||||||
s2sActivity = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
s2sActivity = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
|
||||||
s2sActivity.Identifier = i.ToString();
|
s2sActivity.Identifier = (i + 1).ToString();
|
||||||
s2sActivity.SEC = sec;
|
s2sActivity.SEC = sec;
|
||||||
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(s2sActivity);
|
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(s2sActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
s2sActivity.ShipToShipActivityLocationName = reader.ReadText(s2sName);
|
s2sActivity.ShipToShipActivityLocationName = reader.ReadCellAsText(sheetTitle, string.Format("C{0}", 68 + i), 255);
|
||||||
if (s2sActivity.ShipToShipActivityLocationName.IsNullOrEmpty())
|
if (s2sActivity.ShipToShipActivityLocationName.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Remove(s2sActivity);
|
sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Remove(s2sActivity);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
s2sActivity.ShipToShipActivityLocationLoCode = reader.ReadLoCode(s2sLocode);
|
s2sActivity.ShipToShipActivityLocationLoCode = reader.ReadCellAsText(sheetTitle, string.Format("E{0}", 68 + i), 5);
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = (int?)reader.ReadNumber(s2sLatitude);
|
if (LocodeDB.PortNameFromLocode(s2sActivity.ShipToShipActivityLocationLoCode).IsNullOrEmpty()) s2sActivity.ShipToShipActivityLocationLoCode = "";
|
||||||
|
|
||||||
|
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = (int?) reader.ReadCellAsDecimal(sheetTitle, string.Format("F{0}", 68 + i));
|
||||||
// keine "0" (d.h. fehlerhafte Koordinaten) ins ANSW übergeben falls im Sheet nichts ist aber der Reader das aus irgendeinem Grund liest
|
// keine "0" (d.h. fehlerhafte Koordinaten) ins ANSW übergeben falls im Sheet nichts ist aber der Reader das aus irgendeinem Grund liest
|
||||||
if (s2sActivity.ShipToShipActivityLocationCoordinatesLatitude == 0)
|
if (s2sActivity.ShipToShipActivityLocationCoordinatesLatitude == 0)
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = null;
|
s2sActivity.ShipToShipActivityLocationCoordinatesLatitude = null;
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = (int?)reader.ReadNumber(s2sLongitude);
|
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = (int?)reader.ReadCellAsDecimal(sheetTitle, string.Format("G{0}", 68 + i));
|
||||||
if (s2sActivity.ShipToShipActivityLocationCoordinatesLongitude == 0)
|
if (s2sActivity.ShipToShipActivityLocationCoordinatesLongitude == 0)
|
||||||
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = null;
|
s2sActivity.ShipToShipActivityLocationCoordinatesLongitude = null;
|
||||||
s2sActivity.ShipToShipActivityDateFrom = reader.ReadDate(s2sFromDate);
|
s2sActivity.ShipToShipActivityDateFrom = reader.ReadCellAsDateTime(sheetTitle, string.Format("H{0}", 68 + i));
|
||||||
s2sActivity.ShipToShipActivityDateTo = reader.ReadDate(s2sToDate);
|
s2sActivity.ShipToShipActivityDateTo = reader.ReadCellAsDateTime(sheetTitle, string.Format("I{0}", 68 + i));
|
||||||
s2sActivity.ShipToShipActivityTypeCode = (int?)reader.ReadNumber(s2sActivityString);
|
s2sActivity.ShipToShipActivityTypeCode = (int?)reader.ReadCellAsDecimal(sheetTitle, string.Format("J{0}", 68 + i));
|
||||||
reader.ReadShip2ShipActivityType(s2sActivityString); // 24.8.21 nicht Code dem Klartext zuordnen, nur das Feld kolorieren
|
s2sActivity.ShipToShipActivitySecurityMattersToReport = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", 68 + i), 255);
|
||||||
s2sActivity.ShipToShipActivitySecurityMattersToReport = reader.ReadText(s2sSec);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
52
ENI2/Properties/Resources.Designer.cs
generated
52
ENI2/Properties/Resources.Designer.cs
generated
@ -2173,6 +2173,20 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to The existing value for the waste disposal service provider will be overwritten.
|
||||||
|
///
|
||||||
|
///Current entry: {0}
|
||||||
|
///New entry: {1}
|
||||||
|
///
|
||||||
|
///Proceed?.
|
||||||
|
/// </summary>
|
||||||
|
public static string textConfirmWSDPOverwrite {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textConfirmWSDPOverwrite", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Construction characteristics.
|
/// Looks up a localized string similar to Construction characteristics.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -2947,6 +2961,15 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to ENI-Status.
|
||||||
|
/// </summary>
|
||||||
|
public static string textENIStatus {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textENIStatus", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to entries.
|
/// Looks up a localized string similar to entries.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -4324,6 +4347,15 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to NSW-Status.
|
||||||
|
/// </summary>
|
||||||
|
public static string textNSWStatus {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textNSWStatus", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Number of deaths.
|
/// Looks up a localized string similar to Number of deaths.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -5288,7 +5320,7 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Select classes to import.
|
/// Looks up a localized string similar to Select message classes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string textSelectImportClasses {
|
public static string textSelectImportClasses {
|
||||||
get {
|
get {
|
||||||
@ -5305,6 +5337,15 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Send all.
|
||||||
|
/// </summary>
|
||||||
|
public static string textSendAll {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textSendAll", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Send date.
|
/// Looks up a localized string similar to Send date.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -6340,6 +6381,15 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Waste disposal service provider.
|
||||||
|
/// </summary>
|
||||||
|
public static string textWasteDisposalServiceProvider {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textWasteDisposalServiceProvider", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Waste disposal service providers.
|
/// Looks up a localized string similar to Waste disposal service providers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1757,7 +1757,7 @@
|
|||||||
<value>Select all</value>
|
<value>Select all</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textSelectImportClasses" xml:space="preserve">
|
<data name="textSelectImportClasses" xml:space="preserve">
|
||||||
<value>Select classes to import</value>
|
<value>Select message classes</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="textSelectNone" xml:space="preserve">
|
<data name="textSelectNone" xml:space="preserve">
|
||||||
<value>Select none</value>
|
<value>Select none</value>
|
||||||
@ -2245,4 +2245,24 @@
|
|||||||
<data name="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="pencil" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textWasteDisposalServiceProvider" xml:space="preserve">
|
||||||
|
<value>Waste disposal service provider</value>
|
||||||
|
</data>
|
||||||
|
<data name="textSendAll" xml:space="preserve">
|
||||||
|
<value>Send all</value>
|
||||||
|
</data>
|
||||||
|
<data name="textENIStatus" xml:space="preserve">
|
||||||
|
<value>ENI-Status</value>
|
||||||
|
</data>
|
||||||
|
<data name="textNSWStatus" xml:space="preserve">
|
||||||
|
<value>NSW-Status</value>
|
||||||
|
</data>
|
||||||
|
<data name="textConfirmWSDPOverwrite" xml:space="preserve">
|
||||||
|
<value>The existing value for the waste disposal service provider will be overwritten.
|
||||||
|
|
||||||
|
Current entry: {0}
|
||||||
|
New entry: {1}
|
||||||
|
|
||||||
|
Proceed?</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@ -88,13 +88,14 @@
|
|||||||
<TabItem Header="{x:Static p:Resources.textTab22}">
|
<TabItem Header="{x:Static p:Resources.textTab22}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="120"/>
|
<ColumnDefinition Width="190"/>
|
||||||
<ColumnDefinition Width=".3*" />
|
<ColumnDefinition Width=".3*" />
|
||||||
<ColumnDefinition Width=".3*" />
|
<ColumnDefinition Width=".3*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="36" />
|
<RowDefinition Height="36" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
|
<RowDefinition Height="1" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
@ -125,20 +126,18 @@
|
|||||||
<Label HorizontalContentAlignment="Right" Grid.Row="10" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
<Label HorizontalContentAlignment="Right" Grid.Row="10" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="11" Grid.Column="0" Content="{x:Static p:Resources.textLastName}" Name="label_AgentLastName" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="11" Grid.Column="0" Content="{x:Static p:Resources.textLastName}" Name="label_AgentLastName" Margin="0,0,10,0"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="12" Grid.Column="0" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="12" Grid.Column="0" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
||||||
|
<Label HorizontalContentAlignment="Right" Grid.Row="13" Grid.Column="0" Content="{x:Static p:Resources.textWasteDisposalServiceProvider}" Name="label_WasteDisposalServiceProvider" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
||||||
<Grid Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right">
|
<Grid Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="26" />
|
<ColumnDefinition Width="26" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Name="buttonSetTemplate" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Apply template" HorizontalContentAlignment="Right" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="2" Grid.Column="1" Name="gridTemplateControls" Visibility="Visible">
|
<Grid Grid.Row="1" Grid.Column="2" Name="gridTemplateControls" Visibility="Visible">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="26" />
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<ColumnDefinition Width="26"/>
|
<ColumnDefinition Width="26"/>
|
||||||
@ -148,18 +147,23 @@
|
|||||||
<ColumnDefinition Width="52"/>
|
<ColumnDefinition Width="52"/>
|
||||||
<!-- Undo button -->
|
<!-- Undo button -->
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox Grid.Column="0" Margin="2" Name="textBoxTemplateTitle" VerticalContentAlignment="Center"/>
|
<Button Name="buttonSetTemplate" Grid.Column="0" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Apply template" HorizontalContentAlignment="Right" IsEnabled="False">
|
||||||
<Button Name="buttonSaveTemplate" Grid.Column="1" Grid.Row="0" Margin="2" Click="buttonSaveTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Save template">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
<TextBox Grid.Column="1" Margin="2" Name="textBoxTemplateTitle" VerticalContentAlignment="Center"/>
|
||||||
|
<Button Name="buttonSaveTemplate" Grid.Column="2" Grid.Row="0" Margin="2" Click="buttonSaveTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Save template">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Image Source="../Resources/floppy_disk_blue.png" Margin="0,0,0,0" Height="20" Width="20" />
|
<Image Source="../Resources/floppy_disk_blue.png" Margin="0,0,0,0" Height="20" Width="20" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="buttonDeleteTemplate" Grid.Column="2" Grid.Row="0" Margin="2" Click="buttonDeleteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
<Button Name="buttonDeleteTemplate" Grid.Column="3" Grid.Row="0" Margin="2" Click="buttonDeleteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="buttonUndoTemplate" Grid.Column="3" Grid.Row="0" Margin="22,2,2,2" Click="buttonUndoTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Undo last overwrite" IsEnabled="False">
|
<Button Name="buttonUndoTemplate" Grid.Column="4" Grid.Row="0" Margin="22,2,2,2" Click="buttonUndoTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Undo last overwrite" IsEnabled="False">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Image Source="../Resources/undo.png" Margin="0,0,0,0" Height="20" Width="20" />
|
<Image Source="../Resources/undo.png" Margin="0,0,0,0" Height="20" Width="20" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -176,11 +180,12 @@
|
|||||||
<TextBox Grid.Row="10" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="10" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="11" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="11" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
<TextBox Grid.Row="12" Grid.Column="1" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
<TextBox Grid.Row="12" Grid.Column="1" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
|
<TextBox Grid.Row="13" Grid.Column="1" Name="textBox_WasteDisposalServiceProvider" MaxLength="99" Margin="2" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||||
|
|
||||||
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text24Invoice}" Grid.Column="0" Grid.Row="13" Grid.ColumnSpan="3"/>
|
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text24Invoice}" Grid.Column="0" Grid.Row="14" Grid.ColumnSpan="3"/>
|
||||||
<Label HorizontalContentAlignment="Right" Grid.Row="14" Grid.Column="0" Content="{x:Static p:Resources.textSERVTemplate}" Name="label_MaerskSeaGo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
<Label HorizontalContentAlignment="Right" Grid.Row="15" Grid.Column="0" Content="{x:Static p:Resources.textSERVTemplate}" Name="label_MaerskSeaGo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||||
<ComboBox Grid.Row="14" Grid.Column="1" x:Name="comboBoxGroup" DisplayMemberPath="ServiceName" Margin="2" SelectionChanged="comboBoxGroup_SelectionChanged" ContextMenu="{DynamicResource ClearContextMenu}" />
|
<ComboBox Grid.Row="15" Grid.Column="1" x:Name="comboBoxGroup" DisplayMemberPath="ServiceName" Margin="2" SelectionChanged="comboBoxGroup_SelectionChanged" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||||
<Grid Grid.Row="14" Grid.Column="2">
|
<Grid Grid.Row="15" Grid.Column="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="26" />
|
<ColumnDefinition Width="26" />
|
||||||
<ColumnDefinition Width="26" />
|
<ColumnDefinition Width="26" />
|
||||||
@ -212,7 +217,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="15" Grid.Column="0" Grid.ColumnSpan="3">
|
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="16" Grid.Column="0" Grid.ColumnSpan="3">
|
||||||
<enictrl:ENIDataGrid x:Name="dataGridSERV" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
<enictrl:ENIDataGrid x:Name="dataGridSERV" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
@ -312,7 +317,7 @@
|
|||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="56" />
|
<RowDefinition Height="56" />
|
||||||
<RowDefinition Height="56" />
|
<RowDefinition Height="28" />
|
||||||
<RowDefinition Height="530" />
|
<RowDefinition Height="530" />
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
|
|
||||||
@ -338,7 +343,7 @@
|
|||||||
</DatePicker.BlackoutDates>
|
</DatePicker.BlackoutDates>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Grid.RowSpan="1" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" Margin="2" />
|
<TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Grid.RowSpan="1" Name="textBoxWasteDisposalServiceProviders" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" Margin="2" />
|
||||||
<Label Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right" Content="{x:Static p:Resources.textAgentTemplate}" Margin="0,0,10,0" />
|
<!-- Label Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right" Content="{x:Static p:Resources.textAgentTemplate}" Margin="0,0,10,0" / -->
|
||||||
<Grid Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" x:Name="gridWasteControls">
|
<Grid Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" x:Name="gridWasteControls">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width=".25*" />
|
<ColumnDefinition Width=".25*" />
|
||||||
@ -347,39 +352,13 @@
|
|||||||
<ColumnDefinition Width=".25*" />
|
<ColumnDefinition Width=".25*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="28" />
|
<!-- RowDefinition Height="28" / -->
|
||||||
<RowDefinition Height="28" />
|
<RowDefinition Height="28" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ComboBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Name="comboBox_WSDPTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="Remark" SelectionChanged="comboBox_WSDPTemplate_SelectionChanged" />
|
<ComboBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Name="comboBox_WSDPTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="Remark" SelectionChanged="comboBox_WSDPTemplate_SelectionChanged" />
|
||||||
<Grid Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Name="gridWasteTemplateControls" Visibility="Visible">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<!-- Name -->
|
|
||||||
<ColumnDefinition Width="26"/>
|
|
||||||
<!-- Save button -->
|
|
||||||
<ColumnDefinition Width="26"/>
|
|
||||||
<!-- Delete button -->
|
|
||||||
<ColumnDefinition Width="52"/>
|
|
||||||
<!-- Undo button -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBox Grid.Column="0" Margin="2" Name="textBoxWasteTemplateTitle" VerticalContentAlignment="Center"/>
|
|
||||||
<Button Name="buttonSaveWasteTemplate" Grid.Column="1" Grid.Row="0" Margin="2" Click="buttonSaveWasteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Save template">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/floppy_disk_blue.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonDeleteWasteTemplate" Grid.Column="2" Grid.Row="0" Margin="2" Click="buttonDeleteWasteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Name="buttonUndoWasteTemplate" Grid.Column="3" Grid.Row="0" Margin="22,2,2,2" Click="buttonUndoWasteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Undo last overwrite" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Image Source="../Resources/undo.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
||||||
<Button Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
<Button Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -128,6 +128,7 @@ namespace ENI2.SheetDisplayControls
|
|||||||
this.textBox_AgentPhone.DataContext = this._agnt;
|
this.textBox_AgentPhone.DataContext = this._agnt;
|
||||||
this.textBox_AgentPostalCode.DataContext = this._agnt;
|
this.textBox_AgentPostalCode.DataContext = this._agnt;
|
||||||
this.textBox_AgentStreetAndNumber.DataContext = this._agnt;
|
this.textBox_AgentStreetAndNumber.DataContext = this._agnt;
|
||||||
|
this.textBox_WasteDisposalServiceProvider.DataContext = this._was;
|
||||||
if (_agntTemplates == null)
|
if (_agntTemplates == null)
|
||||||
{
|
{
|
||||||
_agntTemplates = await DBManagerAsync.GetAGNTTemplatesAsync(); // inital full load
|
_agntTemplates = await DBManagerAsync.GetAGNTTemplatesAsync(); // inital full load
|
||||||
@ -338,6 +339,14 @@ namespace ENI2.SheetDisplayControls
|
|||||||
{
|
{
|
||||||
if (this._currentTemplate == null) return;
|
if (this._currentTemplate == null) return;
|
||||||
|
|
||||||
|
// confirm overwrite of waste disposal service provider
|
||||||
|
if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0)
|
||||||
|
{
|
||||||
|
string message = string.Format(Properties.Resources.textConfirmWSDPOverwrite, this.textBox_WasteDisposalServiceProvider.Text, this._currentTemplate.WasteDisposalServiceProviderName);
|
||||||
|
if (MessageBox.Show(message, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No)
|
||||||
|
== MessageBoxResult.No) { return; }
|
||||||
|
}
|
||||||
|
|
||||||
this._undoTemplate = createFromCurrentText(null, null);
|
this._undoTemplate = createFromCurrentText(null, null);
|
||||||
|
|
||||||
this.textBox_AgentCity.Text = this._currentTemplate.AgentCity;
|
this.textBox_AgentCity.Text = this._currentTemplate.AgentCity;
|
||||||
@ -349,7 +358,7 @@ namespace ENI2.SheetDisplayControls
|
|||||||
this.textBox_AgentEMail.Text = this._currentTemplate.AgentEMail;
|
this.textBox_AgentEMail.Text = this._currentTemplate.AgentEMail;
|
||||||
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentFax.Text = this._currentTemplate.AgentFax;
|
this.textBox_AgentFax.Text = this._currentTemplate.AgentFax;
|
||||||
this.textBox_AgentEMail.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentFax.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentFirstName.Text = this._currentTemplate.AgentFirstName;
|
this.textBox_AgentFirstName.Text = this._currentTemplate.AgentFirstName;
|
||||||
this.textBox_AgentFirstName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentFirstName.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentLastName.Text = this._currentTemplate.AgentLastName;
|
this.textBox_AgentLastName.Text = this._currentTemplate.AgentLastName;
|
||||||
@ -360,6 +369,9 @@ namespace ENI2.SheetDisplayControls
|
|||||||
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
|
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
|
||||||
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
|
||||||
|
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
|
||||||
this.buttonUndoTemplate.IsEnabled = true;
|
this.buttonUndoTemplate.IsEnabled = true;
|
||||||
this.buttonSetTemplate.IsEnabled = false;
|
this.buttonSetTemplate.IsEnabled = false;
|
||||||
@ -447,6 +459,9 @@ namespace ENI2.SheetDisplayControls
|
|||||||
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
this.textBox_AgentStreetAndNumber.Text = this._undoTemplate.AgentStreetAndNumber;
|
this.textBox_AgentStreetAndNumber.Text = this._undoTemplate.AgentStreetAndNumber;
|
||||||
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.textBox_WasteDisposalServiceProvider.Text = this._undoTemplate.WasteDisposalServiceProviderName;
|
||||||
|
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
this.SublistElementChanged(Message.NotificationClass.WAS);
|
||||||
|
|
||||||
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
|
this.buttonUndoTemplate.IsEnabled = false; // can't undo after undo
|
||||||
}
|
}
|
||||||
@ -468,6 +483,7 @@ namespace ENI2.SheetDisplayControls
|
|||||||
at.AgentPhone = this.textBox_AgentPhone.Text;
|
at.AgentPhone = this.textBox_AgentPhone.Text;
|
||||||
at.AgentPostalCode = this.textBox_AgentPostalCode.Text;
|
at.AgentPostalCode = this.textBox_AgentPostalCode.Text;
|
||||||
at.AgentStreetAndNumber = textBox_AgentStreetAndNumber.Text;
|
at.AgentStreetAndNumber = textBox_AgentStreetAndNumber.Text;
|
||||||
|
at.WasteDisposalServiceProviderName = textBox_WasteDisposalServiceProvider.Text;
|
||||||
|
|
||||||
return at;
|
return at;
|
||||||
}
|
}
|
||||||
@ -723,7 +739,7 @@ namespace ENI2.SheetDisplayControls
|
|||||||
|
|
||||||
private async Task InitTemplates()
|
private async Task InitTemplates()
|
||||||
{
|
{
|
||||||
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
|
_wsdpTemplates = await DBManagerAsync.GetWasteDisposalServiceProviderTemplatesAsync();
|
||||||
_wsdpTemplates.Sort();
|
_wsdpTemplates.Sort();
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = null;
|
this.comboBox_WSDPTemplate.ItemsSource = null;
|
||||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="{x:Type enictrl:ClosableTabItem}">
|
<Style TargetType="{x:Type enictrl:ClosableTabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type enictrl:ClosableTabItem}">
|
<ControlTemplate TargetType="{x:Type enictrl:ClosableTabItem}">
|
||||||
|
|||||||
@ -3,26 +3,26 @@
|
|||||||
<package id="ExcelDataReader" version="3.7.0" targetFramework="net48" />
|
<package id="ExcelDataReader" version="3.7.0" targetFramework="net48" />
|
||||||
<package id="Extended.Wpf.Toolkit" version="4.7.25104.5739" targetFramework="net48" />
|
<package id="Extended.Wpf.Toolkit" version="4.7.25104.5739" targetFramework="net48" />
|
||||||
<package id="log4net" version="3.1.0" targetFramework="net48" />
|
<package id="log4net" version="3.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Bcl.Cryptography" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Bcl.Cryptography" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Extensions.DependencyInjection" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Extensions.Logging" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Extensions.Logging" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Extensions.Options" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Extensions.Options" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Extensions.Primitives" version="9.0.6" targetFramework="net48" />
|
<package id="Microsoft.Extensions.Primitives" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1001" targetFramework="net48" />
|
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1001" targetFramework="net48" />
|
||||||
<package id="PDFsharp" version="6.2.0" targetFramework="net48" />
|
<package id="PDFsharp" version="6.2.0" targetFramework="net48" />
|
||||||
<package id="PDFsharp-MigraDoc" version="6.2.0" targetFramework="net48" />
|
<package id="PDFsharp-MigraDoc" version="6.2.0" targetFramework="net48" />
|
||||||
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.119.0" targetFramework="net48" />
|
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.119.0" targetFramework="net48" />
|
||||||
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
|
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
|
||||||
<package id="System.Data.SQLite.Core" version="1.0.119.0" targetFramework="net48" />
|
<package id="System.Data.SQLite.Core" version="1.0.119.0" targetFramework="net48" />
|
||||||
<package id="System.Diagnostics.DiagnosticSource" version="9.0.6" targetFramework="net48" />
|
<package id="System.Diagnostics.DiagnosticSource" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="System.Formats.Asn1" version="9.0.6" targetFramework="net48" />
|
<package id="System.Formats.Asn1" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
|
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
|
||||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
|
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
|
||||||
<package id="System.Security.Cryptography.Pkcs" version="9.0.6" targetFramework="net48" />
|
<package id="System.Security.Cryptography.Pkcs" version="9.0.7" targetFramework="net48" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
|
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
|
||||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
||||||
@ -5,8 +5,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Runtime.Serialization;
|
|
||||||
|
|
||||||
|
|
||||||
namespace bsmd.database
|
namespace bsmd.database
|
||||||
{
|
{
|
||||||
@ -56,6 +54,9 @@ namespace bsmd.database
|
|||||||
[MaxLength(99)]
|
[MaxLength(99)]
|
||||||
public string AgentEMail { get; set; }
|
public string AgentEMail { get; set; }
|
||||||
|
|
||||||
|
[MaxLength(99)]
|
||||||
|
public string WasteDisposalServiceProviderName { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region DatabaseEntity implementation
|
#region DatabaseEntity implementation
|
||||||
@ -86,6 +87,8 @@ namespace bsmd.database
|
|||||||
else scmd.Parameters.AddWithValue("@P10", DBNull.Value);
|
else scmd.Parameters.AddWithValue("@P10", DBNull.Value);
|
||||||
if (this.AgentEMail != null) scmd.Parameters.AddWithValue("@P11", this.AgentEMail);
|
if (this.AgentEMail != null) scmd.Parameters.AddWithValue("@P11", this.AgentEMail);
|
||||||
else scmd.Parameters.AddWithValue("@P11", DBNull.Value);
|
else scmd.Parameters.AddWithValue("@P11", DBNull.Value);
|
||||||
|
if (this.WasteDisposalServiceProviderName != null) scmd.Parameters.AddWithValue("@P12", this.WasteDisposalServiceProviderName);
|
||||||
|
else scmd.Parameters.AddWithValue("@P12", DBNull.Value);
|
||||||
|
|
||||||
if (this.IsNew)
|
if (this.IsNew)
|
||||||
{
|
{
|
||||||
@ -93,13 +96,13 @@ namespace bsmd.database
|
|||||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||||
cmd.CommandText = string.Format("INSERT INTO {0} (Id, Title, AgentCompanyName, AgentStreetAndNumber, " +
|
cmd.CommandText = string.Format("INSERT INTO {0} (Id, Title, AgentCompanyName, AgentStreetAndNumber, " +
|
||||||
"AgentPostalCode, AgentCity, AgentCountry, AgentLastName, AgentFirstName, AgentPhone, AgentFax, " +
|
"AgentPostalCode, AgentCity, AgentCountry, AgentLastName, AgentFirstName, AgentPhone, AgentFax, " +
|
||||||
"AgentEMail) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)", this.Tablename);
|
"AgentEMail, WasteDisposalServiceProviderName) VALUES (@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12)", this.Tablename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmd.CommandText = string.Format("UPDATE {0} SET Title = @P1, AgentCompanyName = @P2, AgentStreetAndNumber = @P3, AgentPostalCode = @P4, AgentCity = @P5, " +
|
cmd.CommandText = string.Format("UPDATE {0} SET Title = @P1, AgentCompanyName = @P2, AgentStreetAndNumber = @P3, AgentPostalCode = @P4, AgentCity = @P5, " +
|
||||||
"AgentCountry = @P6, AgentLastName = @P7, AgentFirstName = @P8, AgentPhone = @P9, AgentFax = @P10, " +
|
"AgentCountry = @P6, AgentLastName = @P7, AgentFirstName = @P8, AgentPhone = @P9, AgentFax = @P10, " +
|
||||||
"AgentEMail = @P11 WHERE Id = @ID", this.Tablename);
|
"AgentEMail = @P11, WasteDisposalServiceProviderName = @P12 WHERE Id = @ID", this.Tablename);
|
||||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,7 +110,7 @@ namespace bsmd.database
|
|||||||
public override void PrepareLoadCommand(System.Data.IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
|
public override void PrepareLoadCommand(System.Data.IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
|
||||||
{
|
{
|
||||||
string query = string.Format("SELECT Id, Title, AgentCompanyName, AgentStreetAndNumber, AgentPostalCode, AgentCity, AgentCountry, " +
|
string query = string.Format("SELECT Id, Title, AgentCompanyName, AgentStreetAndNumber, AgentPostalCode, AgentCity, AgentCountry, " +
|
||||||
"AgentLastName, AgentFirstName, AgentPhone, AgentFax, AgentEMail FROM {0} ", this.Tablename);
|
"AgentLastName, AgentFirstName, AgentPhone, AgentFax, AgentEMail, WasteDisposalServiceProviderName FROM {0} ", this.Tablename);
|
||||||
|
|
||||||
switch (filter)
|
switch (filter)
|
||||||
{
|
{
|
||||||
@ -138,6 +141,7 @@ namespace bsmd.database
|
|||||||
if (!reader.IsDBNull(9)) agnt_t.AgentPhone = reader.GetString(9);
|
if (!reader.IsDBNull(9)) agnt_t.AgentPhone = reader.GetString(9);
|
||||||
if (!reader.IsDBNull(10)) agnt_t.AgentFax = reader.GetString(10);
|
if (!reader.IsDBNull(10)) agnt_t.AgentFax = reader.GetString(10);
|
||||||
if (!reader.IsDBNull(11)) agnt_t.AgentEMail = reader.GetString(11);
|
if (!reader.IsDBNull(11)) agnt_t.AgentEMail = reader.GetString(11);
|
||||||
|
if (!reader.IsDBNull(12)) agnt_t.WasteDisposalServiceProviderName = reader.GetString(12);
|
||||||
|
|
||||||
result.Add(agnt_t);
|
result.Add(agnt_t);
|
||||||
}
|
}
|
||||||
@ -172,6 +176,7 @@ namespace bsmd.database
|
|||||||
if (!reader.IsDBNull(9)) agnt_t.AgentPhone = reader.GetString(9);
|
if (!reader.IsDBNull(9)) agnt_t.AgentPhone = reader.GetString(9);
|
||||||
if (!reader.IsDBNull(10)) agnt_t.AgentFax = reader.GetString(10);
|
if (!reader.IsDBNull(10)) agnt_t.AgentFax = reader.GetString(10);
|
||||||
if (!reader.IsDBNull(11)) agnt_t.AgentEMail = reader.GetString(11);
|
if (!reader.IsDBNull(11)) agnt_t.AgentEMail = reader.GetString(11);
|
||||||
|
if (!reader.IsDBNull(12)) agnt_t.WasteDisposalServiceProviderName = reader.GetString(12);
|
||||||
}
|
}
|
||||||
return agnt_t;
|
return agnt_t;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,7 +122,7 @@ namespace bsmd.database
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static async Task<List<WasteDisposalServiceProvider_Template>> GetWastDisposalServiceProviderTemplatesAsync()
|
public static async Task<List<WasteDisposalServiceProvider_Template>> GetWasteDisposalServiceProviderTemplatesAsync()
|
||||||
{
|
{
|
||||||
SqlCommand cmd = new SqlCommand();
|
SqlCommand cmd = new SqlCommand();
|
||||||
WasteDisposalServiceProvider_Template wdsp_t = new WasteDisposalServiceProvider_Template();
|
WasteDisposalServiceProvider_Template wdsp_t = new WasteDisposalServiceProvider_Template();
|
||||||
|
|||||||
@ -269,6 +269,15 @@ namespace bsmd.database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public BSMDStatus InternalStatus { get; set; }
|
public BSMDStatus InternalStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Display helper property for overview status
|
||||||
|
/// </summary>
|
||||||
|
public string BSMDStatusOverviewDisplay {
|
||||||
|
get {
|
||||||
|
return (InternalStatus != BSMDStatus.UNDEFINED) ? InternalStatus.ToString() : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Vorheriger Status (z.B. für nach der Report-Generierung), wird nicht immer gesetzt
|
/// Vorheriger Status (z.B. für nach der Report-Generierung), wird nicht immer gesetzt
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -284,6 +293,17 @@ namespace bsmd.database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public NSWProvider HIS { get; set; }
|
public NSWProvider HIS { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Display helper property for overview HIS
|
||||||
|
/// </summary>
|
||||||
|
public string HISOverviewDisplay
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (HIS != NSWProvider.UNDEFINED) ? HIS.ToString() : string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fehlerliste (Rückgabe vom NSW)
|
/// Fehlerliste (Rückgabe vom NSW)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -406,6 +426,16 @@ namespace bsmd.database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? FileSequenceNumber { get; set; }
|
public int? FileSequenceNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of violations during last validation
|
||||||
|
/// </summary>
|
||||||
|
public int? ViolationCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of errors during last validation
|
||||||
|
/// </summary>
|
||||||
|
public int? ErrorCount { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDatabaseEntity implementation
|
#region IDatabaseEntity implementation
|
||||||
|
|||||||
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
[assembly: AssemblyCompany("schick Informatik")]
|
[assembly: AssemblyCompany("schick Informatik")]
|
||||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||||
[assembly: AssemblyInformationalVersion("7.2.9")]
|
[assembly: AssemblyInformationalVersion("7.2.10")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014-2025 schick Informatik")]
|
[assembly: AssemblyCopyright("Copyright © 2014-2025 schick Informatik")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("7.2.9.*")]
|
[assembly: AssemblyVersion("7.2.10.*")]
|
||||||
|
|
||||||
|
|||||||
@ -502,7 +502,7 @@ namespace bsmd.database
|
|||||||
/// Convenience Methode, die fehlende Waste Einträge ergänzt. Verbesserte Version, aus ENI-2 herüberkopiert, damit es auch im
|
/// Convenience Methode, die fehlende Waste Einträge ergänzt. Verbesserte Version, aus ENI-2 herüberkopiert, damit es auch im
|
||||||
/// Excel_Reader nutzbar wird
|
/// Excel_Reader nutzbar wird
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void AddMissingWaste()
|
public void AddMissingWaste(bool fixExisting = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (string wasteCodeString in WAS.WasteCodes)
|
foreach (string wasteCodeString in WAS.WasteCodes)
|
||||||
@ -537,6 +537,8 @@ namespace bsmd.database
|
|||||||
this.Waste.Add(newWaste);
|
this.Waste.Add(newWaste);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (fixExisting)
|
||||||
{
|
{
|
||||||
if (!foundWaste.WasteAmountGeneratedTillNextPort_MTQ.HasValue) foundWaste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
if (!foundWaste.WasteAmountGeneratedTillNextPort_MTQ.HasValue) foundWaste.WasteAmountGeneratedTillNextPort_MTQ = 0;
|
||||||
if (!foundWaste.WasteAmountRetained_MTQ.HasValue) foundWaste.WasteAmountRetained_MTQ = 0;
|
if (!foundWaste.WasteAmountRetained_MTQ.HasValue) foundWaste.WasteAmountRetained_MTQ = 0;
|
||||||
@ -547,6 +549,7 @@ namespace bsmd.database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
1) copyprod.cmd ausführen (damit app.config richtig überschrieben wird)
|
1) copyprod.cmd ausführen (damit app.config und Logo richtig überschrieben wird)
|
||||||
|
|
||||||
|
|
||||||
2) Prüfen ob das ENI App logo richtig ist
|
2) Prüfen ob das ENI App logo richtig ist
|
||||||
3) VS: Publish: Folder Location und Url richtig auswählen
|
3) VS: Publish: Folder Location und Url richtig auswählen
|
||||||
4) Signing: "Sign the ClickOnce manifests": Hier für Prod das Zertifikat
|
4) Signing: "Sign the ClickOnce manifests": Hier kann inzwischen dasselbe Zertifikat wie für die Testversion verwendet werden
|
||||||
Schiffsmelder CA auswählen, das am 11.2.25 abläuft.
|
|
||||||
Auswahl über "Select from Store.."
|
|
||||||
|
|
||||||
|
|
||||||
5) Release Build einstellen
|
5) Release Build einstellen
|
||||||
6) komplett neu bauen (clean!)
|
6) komplett neu bauen (clean!)
|
||||||
@ -15,3 +12,5 @@ Auswahl über "Select from Store.."
|
|||||||
8) MainWindow.xaml: "ENI 2 Testversion" -> "ENI 2"
|
8) MainWindow.xaml: "ENI 2 Testversion" -> "ENI 2"
|
||||||
9) ENI2 Project Properties -> Application -> Assembly Name: "ENI2Test" -> "ENI2"
|
9) ENI2 Project Properties -> Application -> Assembly Name: "ENI2Test" -> "ENI2"
|
||||||
10) Wo Ressourcen verwendet werden in XAML Referenz umbiegen: "/ENI2Test;" -> "/ENI2;"
|
10) Wo Ressourcen verwendet werden in XAML Referenz umbiegen: "/ENI2Test;" -> "/ENI2;"
|
||||||
|
|
||||||
|
11) Beim publishen die Export-Verzeichnisse im Publish Dialog des Projekts anpassen
|
||||||
Loading…
Reference in New Issue
Block a user