Zwischenstand 3.8.1.0 zur Sicherung. Neu AboutDialog, kleinere Korrekturen und Arbeit am PDF Erzeugung für einzelne Meldeklassen

This commit is contained in:
Daniel Schick 2017-11-02 20:29:27 +00:00
parent e6c38968d1
commit e93e065443
45 changed files with 494 additions and 145 deletions

View File

@ -6,12 +6,14 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Controls;
using System.Windows;
using System.Windows.Data;
using bsmd.database;
using ENI2.DetailViewControls;
using ENI2.Util;
using System.Windows;
using System.Windows.Data;
using ENI2.EditControls;
namespace ENI2
{
@ -375,6 +377,24 @@ namespace ENI2
}
}
}
// Show error and violation dialog
if(this._vErrors.Count > 0)
{
ErrorListDialog eld = new ErrorListDialog();
eld.IsModal = false;
eld.Errors = this._vErrors;
eld.Show();
}
if(this._vViolations.Count > 0)
{
ViolationListDialog vld = new ViolationListDialog();
vld.IsModal = false;
vld.Violations = this._vViolations;
vld.Show();
}
}
#endregion

View File

@ -87,17 +87,17 @@
<Button IsEnabled="False" Name="buttonSendPDF" Grid.Column="3" Grid.Row="6" Margin="2" Click="buttonSendPDF_Click" Content="{x:Static p:Resources.textCreatePDF}"/>
<Button Name="buttonQueryHIS" Grid.Column="4" Grid.Row="6" Margin="2" Click="buttonQueryHIS_Click" Content="{x:Static p:Resources.textQueryHIS}"/>
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="6">
<Button Name="buttonRefresh" Margin="2" Click="buttonRefresh_Click" BorderThickness="0" Background="Transparent">
<Button Name="buttonRefresh" Margin="2" Click="buttonRefresh_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipRefresh}">
<StackPanel Orientation="Horizontal">
<Image Source="../Resources/nav_refresh_blue.png" Margin="0,0,5,0" Height="24"/>
<TextBlock Text="{x:Static p:Resources.textRefresh}" VerticalAlignment="Center"/>
<!--TextBlock Text="{x:Static p:Resources.textRefresh}" VerticalAlignment="Center"/-->
</StackPanel>
</Button>
<Button Name="buttonInfoCore" Margin="2" Click="buttonInfoCore_Click" BorderThickness="0" Background="Transparent">
<Button Name="buttonInfoCore" Margin="2" Click="buttonInfoCore_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipDetails}">
<Image Source="../Resources/document_view.png" Margin="0,0,5,0" Height="24" />
</Button>
<Button Name="buttonValidate" Margin="2" Click="buttonValidate_Click" BorderThickness="0" Background="Transparent">
<Button Name="buttonValidate" Margin="2" Click="buttonValidate_Click" BorderThickness="0" Background="Transparent" ToolTip="{x:Static p:Resources.textTooltipValidation}">
<Image Source="../Resources/hand_point.png" Margin="0,0,5,0" Height="24" />
</Button>
<!--

View File

@ -235,6 +235,12 @@ namespace ENI2.DetailViewControls
vioItem.Click += new RoutedEventHandler(this.buttonWarnings_Click);
this.dataGridMessages.ContextMenu.Items.Add(vioItem);
MenuItem pdfItem = new MenuItem();
pdfItem.Header = Properties.Resources.textCreatePDF;
pdfItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/document_pdf.png")) };
pdfItem.Click += new RoutedEventHandler(this.buttonCreatePDF_Click);
this.dataGridMessages.ContextMenu.Items.Add(pdfItem);
#endregion
#region init ATA
@ -593,6 +599,20 @@ namespace ENI2.DetailViewControls
}
}
private void buttonCreatePDF_Click(object sender, RoutedEventArgs e)
{
if (this.dataGridMessages.SelectedItems.Count > 0)
{
Message selectedMessage = this.dataGridMessages.SelectedItems[0] as Message;
selectedMessage.InternalStatus = Message.BSMDStatus.REPORT;
selectedMessage.ReportingPartyId = App.UserId; // wichtig damit der richtige die Mail mit dem PDF bekommt
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedMessage);
this.Core.ReportStatus = MessageCore.ReportStatusEnum.SINGLE;
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(this.Core);
this.dataGridMessages.Items.Refresh();
}
}
private void buttonSystemErrors_Click(object sender, RoutedEventArgs e)
{
if (this.dataGridMessages.SelectedItems.Count > 0)

View File

@ -127,7 +127,7 @@
<DataGridTextColumn Header="{x:Static p:Resources.textLocationLocode}" Binding="{Binding ShipToShipActivityLocationLoCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDateFrom}" Binding="{Binding ShipToShipActivityDateFrom, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDateTo}" Binding="{Binding ShipToShipActivityDateTo, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textActivityType}" Binding="{Binding ShipToShipActivityType, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textActivityType}" Binding="{Binding ShipToShipActivityTypeCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textSecurityMatters}" Binding="{Binding ShipToShipActivitySecurityMattersToReport, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textLatitudeDecimal}" Binding="{Binding ShipToShipActivityLocationCoordinatesLatitude, StringFormat={}{0:N0}}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textLongitudeDecimal}" Binding="{Binding ShipToShipActivityLocationCoordinatesLongitude, StringFormat={}{0:N0}}" IsReadOnly="True" Width="0.1*" />

View File

@ -35,8 +35,8 @@
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>3.8.0.%2a</ApplicationVersion>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>3.8.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
@ -228,6 +228,9 @@
<Compile Include="DetailViewControls\WasteDetailControl.xaml.cs">
<DependentUpon>WasteDetailControl.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\AboutDialog.xaml.cs">
<DependentUpon>AboutDialog.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\CoreStatusInfoDialog.xaml.cs">
<DependentUpon>CoreStatusInfoDialog.xaml</DependentUpon>
</Compile>
@ -424,6 +427,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EditControls\AboutDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="EditControls\CoreStatusInfoDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -623,7 +630,7 @@
<None Include="Resources\trafficlight_red.png" />
<None Include="Resources\trafficlight_yellow.png" />
<None Include="Resources\user_edit.png" />
<None Include="Resources\delete2.png" />
<Resource Include="Resources\delete2.png" />
<None Include="Resources\mail_new.png" />
<Resource Include="Resources\document_view.png" />
<Resource Include="Resources\mail_forward.png" />
@ -639,6 +646,12 @@
<Resource Include="Resources\logic_or.png" />
<Resource Include="Resources\logic_xor.png" />
<Resource Include="Resources\refresh.png" />
<Resource Include="Resources\bullet_ball_blue.ico" />
<Resource Include="Resources\bullet_ball_green.ico" />
<Resource Include="Resources\bullet_ball_grey.ico" />
<Resource Include="Resources\bullet_ball_red.ico" />
<Resource Include="Resources\bullet_ball_yellow.ico" />
<Resource Include="Resources\document_pdf.png" />
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

View File

@ -0,0 +1,39 @@
<Window x:Class="ENI2.EditControls.AboutDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textAboutENI2}" Height="330" Width="300" WindowStyle="ToolWindow" ResizeMode="NoResize" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>
<Image Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" Source="../Resources/EUREPORT.png" />
<Image Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" Source="../Resources/logo_transparent_babyblau.png" />
<TextBlock Grid.Row ="1" Grid.ColumnSpan="2" Name="textProductName" FontWeight="Bold" Margin="10,0,0,0"/>
<TextBlock Grid.Row ="2" Grid.ColumnSpan="2" Name="textProductVersion" FontWeight="DemiBold" Margin="10,0,0,0"/>
<TextBlock Grid.Row ="3" Grid.ColumnSpan="2" Margin="10,0,0,0">
<Hyperlink NavigateUri="http://www.textbausteine.net/" Name="textProductCopyright" RequestNavigate="textProductCopyright_RequestNavigate">
<TextBlock x:Name="hyperlinkText" />
</Hyperlink>
</TextBlock>
<TextBlock Grid.Row="4" Text="Components" Margin="10,0,0,0"/>
<TextBox Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" TextWrapping="Wrap" Name="textProductComponents" IsReadOnly="True" Margin="10,2,2,2"/>
<Button Name="buttonOK" Grid.Row="7" Grid.Column="1" Content="OK" Margin="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="10,0,10,0" Background="Transparent" Click="buttonOK_Click"/>
</Grid>
</Window>

View File

@ -0,0 +1,44 @@
// Copyright (c) 2017 schick Informatik
// Description:
//
using System.Diagnostics;
using System.Reflection;
using System.Windows;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for AboutDialog.xaml
/// </summary>
public partial class AboutDialog : Window
{
public AboutDialog()
{
InitializeComponent();
Loaded += AboutDialog_Loaded;
}
private void AboutDialog_Loaded(object sender, RoutedEventArgs e)
{
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
textProductVersion.Text = "V. " + versionInfo.ProductVersion;
textProductName.Text = versionInfo.ProductName;
hyperlinkText.Text = versionInfo.LegalCopyright;
textProductComponents.Text = "Xceed.Wpf Toolkit Community Ed.,\nlog4net\n";
}
private void textProductCopyright_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
e.Handled = true;
}
private void buttonOK_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
}
}

View File

@ -8,7 +8,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textCoreStatus}" Height="280" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" >
Title="{x:Static p:Resources.textCoreStatus}" Height="316" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
@ -17,9 +17,9 @@
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="40" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
@ -28,11 +28,11 @@
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textCancellable}" />
<CheckBox Name="checkBoxCancellable" Grid.Row="1" Grid.Column="1" VerticalContentAlignment="Center" Margin="2" />
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textBlockedClasses}" />
<TextBlock Name="textBlockBlocked" Grid.Row="2" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center"/>
<TextBlock Name="textBlockBlocked" Grid.Row="2" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Stretch" Margin="2" TextWrapping="Wrap"/>
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textOwnClasses}" />
<TextBlock Name="textBlockOwn" Grid.Row="3" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
<TextBlock Name="textBlockOwn" Grid.Row="3" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Stretch" Margin="2" TextWrapping="Wrap"/>
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textFreeClasses}" />
<TextBlock Name="textBlockFree" Grid.Row="4" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
<TextBlock Name="textBlockFree" Grid.Row="4" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Stretch" Margin="2" TextWrapping="Wrap"/>
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textErrorCode}" />
<TextBlock Name="textBlockErrorCode" Grid.Row="5" Grid.Column="1" FontWeight="DemiBold" VerticalAlignment="Center" />
<Label Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textErrorMessage}" />

View File

@ -19,7 +19,7 @@
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCode}" />
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textDescription}" />
<ComboBox Grid.Row="0" Grid.Column="1" Width="auto" Name="comboBoxCode" Margin="2" TextBlock.TextAlignment="Center" SelectionChanged="comboBoxCode_Selected"/>
<ComboBox Grid.Row="0" Grid.Column="1" Width="auto" Name="comboBoxCode" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" TextBlock.TextAlignment="Center" SelectionChanged="comboBoxCode_Selected"/>
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxDescription" Margin="2" MinLines="2" TextWrapping="Wrap" AcceptsReturn="True" MaxLength="100" />
</Grid>

View File

@ -30,7 +30,7 @@ namespace ENI2.EditControls
public void CopyValuesToEntity()
{
this.CallPurpose.CallPurposeCode = this.comboBoxCode.SelectedIndex;
this.CallPurpose.CallPurposeCode = (int) this.comboBoxCode.SelectedValue;
this.CallPurpose.CallPurposeDescription = this.textBoxDescription.Text;
}
@ -39,10 +39,10 @@ namespace ENI2.EditControls
this.OKClicked += EditCallPurposeDialog_OKClicked;
this.AddVisible = true;
this.comboBoxCode.ItemsSource = Util.GlobalStructures.EdiCodes;
this.comboBoxCode.ItemsSource = Util.GlobalStructures.Edifact8025;
if((this.CallPurpose != null) && (this.CallPurpose.CallPurposeCode != 0))
{
this.comboBoxCode.SelectedIndex = this.CallPurpose.CallPurposeCode;
this.comboBoxCode.SelectedValue = this.CallPurpose.CallPurposeCode;
this.textBoxDescription.Text = this.CallPurpose.CallPurposeDescription;
}
}
@ -54,9 +54,11 @@ namespace ENI2.EditControls
private void comboBoxCode_Selected(object sender, RoutedEventArgs e)
{
if (this.comboBoxCode.SelectedIndex != this.CallPurpose.CallPurposeCode)
if (this.comboBoxCode.SelectedValue == null) return;
if ((int) this.comboBoxCode.SelectedValue != this.CallPurpose.CallPurposeCode)
{
this.textBoxDescription.Text = Util.GlobalStructures.edifact8025Codes[this.comboBoxCode.SelectedIndex];
this.textBoxDescription.Text = Util.GlobalStructures.Edifact8025[(int) this.comboBoxCode.SelectedValue];
this.textBoxDescription.Focus();
// this.OnOkClicked(); // doch nicht gleich zu
}

View File

@ -9,7 +9,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textEditRules}" Height="410" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/mail_forward.png">
Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/mail_forward.png">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32" />

View File

@ -8,7 +8,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textShip2ShipActivity}" Height="400" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
Title="{x:Static p:Resources.textShip2ShipActivity}" Height="316" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
@ -16,7 +16,7 @@
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="84" />
<!--RowDefinition Height="84" /-->
<RowDefinition Height="84" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@ -32,7 +32,7 @@
<Label Name="labelDateFrom" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textDateFrom}" />
<Label Name="labelDateto" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textDateTo}" />
<Label Name="labelActivityType" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textActivityType}" />
<Label Name="labelSecurityMatters" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textSecurityMatters}" />
<Label Name="labelSecurityMatters" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textSecurityMatters}" />
<TextBox Name="textBoxLocationName" Grid.Row="0" Grid.Column="1" Margin="2" VerticalContentAlignment="Center"/>
<enictrl:LocodeControl x:Name="locodeLocation" Grid.Row="0" Grid.Column="3" />
@ -40,8 +40,8 @@
<xctk:DoubleUpDown Name="doubleUpDownLongitudeDegrees" Grid.Row="1" Grid.Column="3" Margin="2" FormatString="N3" ShowButtonSpinner="False" TextAlignment="Left"/>
<DatePicker Name="datePickerFrom" Grid.Row="2" Grid.Column="1" Margin="2" />
<DatePicker Name="datePickerTo" Grid.Row="2" Grid.Column="3" Margin="2" />
<ComboBox Name="comboBoxActivityType" Grid.Row="4" Grid.Column="1" Margin="2" />
<TextBox Name="textBoxActivityType" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Margin="2" MaxLength="255" />
<TextBox Name="textBoxSecurityMatters" Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Margin="2" MaxLength="255" />
<ComboBox Name="comboBoxActivityType" Grid.Row="4" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
<!--TextBox Name="textBoxActivityType" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Margin="2" MaxLength="255" /-->
<TextBox Name="textBoxSecurityMatters" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Margin="2" MaxLength="255" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -33,11 +33,12 @@ namespace ENI2.EditControls
this.doubleUpDownLongitudeDegrees.Value = bsmd.database.Util.NSWToDecimalDegrees(this.ShipToShipActivity.ShipToShipActivityLocationCoordinatesLongitude ?? 0);
this.datePickerFrom.SelectedDate = this.ShipToShipActivity.ShipToShipActivityDateFrom;
this.datePickerTo.SelectedDate = this.ShipToShipActivity.ShipToShipActivityDateTo;
this.textBoxActivityType.Text = this.ShipToShipActivity.ShipToShipActivityType;
//this.textBoxActivityType.Text = this.ShipToShipActivity.ShipToShipActivityType;
this.textBoxSecurityMatters.Text = this.ShipToShipActivity.ShipToShipActivitySecurityMattersToReport;
this.comboBoxActivityType.ItemsSource = Util.GlobalStructures.EdiCodes;
this.comboBoxActivityType.ItemsSource = Util.GlobalStructures.Edifact8025;
this.comboBoxActivityType.SelectionChanged += ComboBoxActivityType_SelectionChanged;
this.comboBoxActivityType.SelectedValue = this.ShipToShipActivity.ShipToShipActivityTypeCode;
this.AddVisible = true;
this.OKClicked += EditShip2ShipActivitiesDialog_OKClicked; ;
@ -45,10 +46,12 @@ namespace ENI2.EditControls
private void ComboBoxActivityType_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
/*
if(this.comboBoxActivityType.SelectedIndex >= 0)
{
this.textBoxActivityType.Text = Util.GlobalStructures.edifact8025Codes[this.comboBoxActivityType.SelectedIndex];
}
*/
}
public void CopyValuesToEntity()
@ -59,7 +62,8 @@ namespace ENI2.EditControls
this.ShipToShipActivity.ShipToShipActivityLocationCoordinatesLongitude = bsmd.database.Util.DecimalDegreesToNSW(this.doubleUpDownLongitudeDegrees.Value ?? 0);
this.ShipToShipActivity.ShipToShipActivityDateFrom = this.datePickerFrom.SelectedDate;
this.ShipToShipActivity.ShipToShipActivityDateTo = this.datePickerTo.SelectedDate;
this.ShipToShipActivity.ShipToShipActivityType = this.textBoxActivityType.Text.Trim(); ;
// this.ShipToShipActivity.ShipToShipActivityType = this.textBoxActivityType.Text.Trim();
this.ShipToShipActivity.ShipToShipActivityTypeCode = (int) this.comboBoxActivityType.SelectedValue;
this.ShipToShipActivity.ShipToShipActivitySecurityMattersToReport = this.textBoxSecurityMatters.Text.Trim();
}

View File

@ -8,16 +8,16 @@
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue">
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_red.ico">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="220" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<enictrl:ENIDataGrid Grid.Row="0" Grid.Column="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0" x:Name="dataGridErrors">
<enictrl:ENIDataGrid Grid.Row="0" Grid.Column="0" SelectionMode="Single" AutoGenerateColumns="False" Margin="5,5,5,0" x:Name="dataGridErrors">
<DataGrid.Columns>
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding ErrorCode}" IsReadOnly="True" Width="0.3*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding ErrorText}" IsReadOnly="True" Width="0.7*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding ErrorCode}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textProperty}" Binding="{Binding PropertyName}" IsReadOnly="True" Width="0.3*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding ErrorText}" IsReadOnly="True" Width="0.6*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</Grid>

View File

@ -70,11 +70,12 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" x:Name="logoImage" HorizontalAlignment="Left" Height="75" Width="75" Source="Resources/EUREPORT.png" Stretch="Fill" MouseUp="logoImage_MouseUp" Margin="2"/>
<Button Grid.Column="1" x:Name="buttonNewId" Content="{x:Static p:Resources.textNewVisitTransitId}" HorizontalAlignment="Left" VerticalAlignment="Center" Click="buttonNewTransitIdClick" Background="Transparent" Margin="2"/>
<Button Grid.Column="2" x:Name="buttonNewWithId" Content="{x:Static p:Resources.textNewWithId}" HorizontalAlignment="Left" VerticalAlignment="Center" Click="buttonNewWithIdClick" Background="Transparent" Margin="2"/>
<RadioButton Grid.Column="3" x:Name="buttonNotifications" Content="{x:Static p:Resources.textNotifications}" HorizontalAlignment="Left" VerticalAlignment="Center" Width="auto" Click="radioButton_Click" Background="Transparent" Margin="2" IsChecked="True" />
<RadioButton Grid.Column="4" x:Name="buttonUserAdmin" Content="{x:Static p:Resources.textUserAdministration}" HorizontalAlignment="Left" VerticalAlignment="Center" Width="auto" Click="radioButton_Click" Background="Transparent" Visibility="Hidden" Margin="2"/>
<RadioButton Grid.Column="5" x:Name="buttonEditRules" Content="{x:Static p:Resources.textEditRules}" HorizontalAlignment="Left" VerticalAlignment="Center" Width="auto" Click="radioButton_Click" Background="Transparent" Visibility="Hidden" Margin="2" />
<Button Grid.Column="1" x:Name="buttonNewId" Content="{x:Static p:Resources.textNewVisitTransitId}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="buttonNewTransitIdClick" Background="Transparent" Margin="2"/>
<Button Grid.Column="2" x:Name="buttonNewWithId" Content="{x:Static p:Resources.textNewWithId}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="buttonNewWithIdClick" Background="Transparent" Margin="2"/>
<RadioButton Grid.Column="3" x:Name="buttonNotifications" Content="{x:Static p:Resources.textNotifications}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="auto" Click="radioButton_Click" Background="Transparent" Margin="2,5,0,0" IsChecked="True" />
<RadioButton Grid.Column="4" x:Name="buttonUserAdmin" Content="{x:Static p:Resources.textUserAdministration}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="auto" Click="radioButton_Click" Background="Transparent" Visibility="Hidden" Margin="2,5,0,0"/>
<RadioButton Grid.Column="5" x:Name="buttonEditRules" Content="{x:Static p:Resources.textEditRules}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="auto" Click="radioButton_Click" Background="Transparent" Visibility="Hidden" Margin="2,5,0,0" />
<Button Grid.Column="6" x:Name="buttonAbout" Content="?" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent" Margin="2" Padding="5,0,5,0" Click="buttonAbout_Click"/>
</Grid>
<Grid DockPanel.Dock="Bottom" Height="22" Background="#FFE8F6FF">

View File

@ -189,13 +189,21 @@ namespace ENI2
else Process.Start("http://www.eureport.de/");
}
private void buttonAbout_Click(object sender, RoutedEventArgs e)
{
AboutDialog ad = new AboutDialog();
ad.Show();
}
private void radioButton_Click(object sender, RoutedEventArgs e)
{
this.rootContainer.Children.Clear();
bool newButtonsVisible = false;
if(sender == this.buttonNotifications)
{
this.rootContainer.Children.Add(this.mainFrame);
newButtonsVisible = true;
}
else if(sender == this.buttonUserAdmin)
{
@ -217,6 +225,9 @@ namespace ENI2
}
this.rootContainer.Children.Add(ruleControl);
}
this.buttonNewId.Visibility = newButtonsVisible ? Visibility.Visible : Visibility.Hidden;
this.buttonNewWithId.Visibility = newButtonsVisible ? Visibility.Visible : Visibility.Hidden;
}
#endregion

View File

@ -120,6 +120,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon bullet_ball_blue {
get {
object obj = ResourceManager.GetObject("bullet_ball_blue", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -130,6 +140,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon bullet_ball_green1 {
get {
object obj = ResourceManager.GetObject("bullet_ball_green1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -140,6 +160,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon bullet_ball_grey1 {
get {
object obj = ResourceManager.GetObject("bullet_ball_grey1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -150,6 +180,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon bullet_ball_red1 {
get {
object obj = ResourceManager.GetObject("bullet_ball_red1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -160,6 +200,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon bullet_ball_yellow1 {
get {
object obj = ResourceManager.GetObject("bullet_ball_yellow1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -210,6 +260,16 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap document_pdf {
get {
object obj = ResourceManager.GetObject("document_pdf", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -620,6 +680,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to About ENI-2.
/// </summary>
public static string textAboutENI2 {
get {
return ResourceManager.GetString("textAboutENI2", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Accurate and correct details given?.
/// </summary>
@ -3302,6 +3371,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Property.
/// </summary>
public static string textProperty {
get {
return ResourceManager.GetString("textProperty", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PSC 72h.
/// </summary>
@ -3995,6 +4073,33 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Show message core database fields (Detail).
/// </summary>
public static string textTooltipDetails {
get {
return ResourceManager.GetString("textTooltipDetails", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Reload data (Refresh).
/// </summary>
public static string textTooltipRefresh {
get {
return ResourceManager.GetString("textTooltipRefresh", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Perform declaration validation.
/// </summary>
public static string textTooltipValidation {
get {
return ResourceManager.GetString("textTooltipValidation", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Total number of ill passengers greater than normal / expected?.
/// </summary>

View File

@ -1549,4 +1549,37 @@
<data name="textOwnClasses" xml:space="preserve">
<value>Own classes</value>
</data>
<data name="textTooltipDetails" xml:space="preserve">
<value>Show message core database fields (Detail)</value>
</data>
<data name="textTooltipRefresh" xml:space="preserve">
<value>Reload data (Refresh)</value>
</data>
<data name="textTooltipValidation" xml:space="preserve">
<value>Perform declaration validation</value>
</data>
<data name="bullet_ball_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_ball_blue.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bullet_ball_green1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_ball_green.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bullet_ball_grey1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_ball_grey.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bullet_ball_red1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_ball_red.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bullet_ball_yellow1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_ball_yellow.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="textAboutENI2" xml:space="preserve">
<value>About ENI-2</value>
</data>
<data name="textProperty" xml:space="preserve">
<value>Property</value>
</data>
<data name="document_pdf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\document_pdf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

View File

@ -52,7 +52,7 @@
<Label Grid.Column="2" Grid.Row="0" Content="To:" HorizontalAlignment="Left" />
<DatePicker Grid.Column="3" Grid.Row="0" Name="dateTimePickerETATo" VerticalContentAlignment="Center" SelectedDateChanged="etaValueChanged" ContextMenu="{DynamicResource ClearContextMenu}"/>
</Grid>
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" Margin="2"/>
<TextBox Grid.Column="3" Grid.Row="2" Name="textBoxTicketNr" VerticalContentAlignment="Center" Margin="2"/>
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Content="Clear" Name="buttonClearInput" Click="Button_Click" Margin="2"/>
<Button Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Content="Search" Name="buttonSuche" Click="buttonSuche_Click" Margin="2"/>

View File

@ -35,7 +35,7 @@
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<!-- This ContentPresenter automatically binds to the Content of the Window -->
<ContentPresenter />
<ContentPresenter Grid.Row="0"/>
<!-- TODO das hier lokalisieren! -->
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="5" HorizontalAlignment="Right">
<Button Width="80" Content="Add" Name="buttonAdd" Margin="0,0,10,0" Visibility="Hidden" />

View File

@ -12,7 +12,6 @@ namespace ENI2.Util
{
static class GlobalStructures
{
private static List<string> itemList = null;
public static string[] GenderList =
{
@ -33,32 +32,30 @@ namespace ENI2.Util
public static byte[] ShipSecurityLevels = { 1, 2, 3 };
public static string[] edifact8025Codes =
{
"",
"Cargo operations",
"Passenger movement",
"Taking bunkers",
"Changing crew",
"Goodwill visit",
"Taking supplies",
"Repair",
"Laid-up",
"Awaiting orders",
"Miscellaneous",
"Crew movement",
"Cruise, leisure and recreation",
"Under government order",
"Quarantine inspection",
"Refuge",
"Unloading cargo",
"Loading cargo",
"Repair in dry dock",
"Repair in wet dock",
"Cargo tank cleaning",
"Means of transport customs clearance",
"De-gassing",
"Waste disposal"
public static Dictionary<int, string> Edifact8025 = new Dictionary<int, string> {
{1, "Cargo operations" },
{2, "Passenger movement" },
{3, "Taking bunkers" },
{4, "Changing crew" },
{5, "Goodwill visit" },
{6, "Taking supplies" },
{7, "Repair" },
{8, "Laid-up" },
{9, "Awaiting orders" },
{10, "Miscellaneous" },
{11, "Crew movement" },
{12, "Cruise, leisure and recreation" },
{13, "Under government order" },
{14, "Quarantine inspection" },
{15, "Refuge" },
{16, "Unloading cargo" },
{17, "Loading cargo" },
{18, "Repair in dry dock" },
{19, "Repair in wet dock" },
{20, "Cargo tank cleaning" },
{21, "Means of transport customs clearance" },
{22, "De-gassing" },
{23, "Waste disposal" }
};
public static string[] vesselClasses =
@ -81,21 +78,6 @@ namespace ENI2.Util
get { return packingGroups; }
}
public static List<string> EdiCodes
{
get
{
if (itemList == null)
{
itemList = new List<string>();
itemList.Add("");
for (int i = 1; i < Util.GlobalStructures.edifact8025Codes.Length; i++)
itemList.Add(string.Format("{0} - {1}", i, Util.GlobalStructures.edifact8025Codes[i]));
}
return itemList;
}
}
static bool IsNullable<T>(T obj)
{
if (obj == null) return true; // obvious

Binary file not shown.

View File

@ -110,7 +110,12 @@ namespace SendNSWMessageService
_log.Debug("Visit/Transit not found, sending VISIT/TRANSIT message");
if (message.HIS == Message.NSWProvider.UNDEFINED)
message.HIS = core.InitialHIS;
if (core.DefaultReportingPartyId.HasValue) message.ReportingPartyId = core.DefaultReportingPartyId;
if (core.DefaultReportingPartyId.HasValue)
{
message.ReportingPartyId = core.DefaultReportingPartyId; // Referenz umbiegen
if (DBManager.Instance.GetReportingPartyDict().ContainsKey(core.DefaultReportingPartyId.Value)) // geladenes Objekt ersetzen
message.ReportingParty = DBManager.Instance.GetReportingPartyDict()[core.DefaultReportingPartyId.Value];
}
toSendMessageList.Add(message);
}
}
@ -217,6 +222,36 @@ namespace SendNSWMessageService
}
}
if(!didSendSomething) // bisher nichts passiert, aber auf "TO_SEND", ist das ein Storno?
{
if (core.Cancelled ?? false)
{
switch(core.InitialHIS)
{
case Message.NSWProvider.DUDR:
coreSendSucceeded = bsmd.hisnord.Request.CreateSendFile(core, null, false) ?? false;
didSendSomething = true;
break;
case Message.NSWProvider.DUDR_TEST:
coreSendSucceeded = bsmd.hisnord.Request.CreateSendFile(core, null, true) ?? false;
didSendSomething = true;
break;
case Message.NSWProvider.DBH:
break;
case Message.NSWProvider.DBH_TEST:
break;
default:
_log.WarnFormat("Cancelling for HIS {0} is not supported", core.InitialHIS);
break;
}
}
}
if (didSendSomething)
{
// falls nur eine Nachricht gescheitert ist geht der Core auf SEND_FAILED, sonst FAILURE

View File

@ -466,7 +466,7 @@ namespace bsmd.ReportGenerator
for (int i = 0; i < mdh.PortOfCallLast30Days.Count; i++)
{
Row row = table.AddRow();
BSMDDocument.SetPoCLast30Days((i + 1), mdh.PortOfCallLast30Days[i], row);
BSMDDocument.SetPoCLast30Days((i + 1), ((PortOfCallLast30Days) mdh.PortOfCallLast30Days[i]), row);
}
}
}
@ -571,7 +571,7 @@ namespace bsmd.ReportGenerator
for(int i=0;i<sec.LastTenPortFacilitesCalled.Count;i++) {
Row row = table.AddRow();
BSMDDocument.SetLast10PortFacility((i + 1), sec.LastTenPortFacilitesCalled[i], row);
BSMDDocument.SetLast10PortFacility((i + 1), ((LastTenPortFacilitiesCalled) sec.LastTenPortFacilitesCalled[i]), row);
}
}
}

View File

@ -71,6 +71,14 @@ namespace bsmd.ReportGenerator
this.CreateReport(reportCore);
}
// new ENI-2 Mode
reportCores = DBManager.Instance.GetMessageCoresByReportStatus(MessageCore.ReportStatusEnum.SINGLE);
foreach(MessageCore reportCore in reportCores)
{
this.CreateSingleReport(reportCore);
}
DBManager.Instance.Disconnect();
}
@ -110,21 +118,7 @@ namespace bsmd.ReportGenerator
bool isReportUpdate = reportCore.ReportStatus != MessageCore.ReportStatusEnum.COMPLETE;
coverInfos.Add("Type", reportCore.HerbergReportType);
// Schiffsname aus der STAT meldung fischen
foreach (Message msg in messages)
{
if (msg.MessageNotificationClass == Message.NotificationClass.STAT)
{
if (msg.Elements.Count > 0)
{
STAT stat = msg.Elements[0] as STAT;
if (stat != null)
{
coverInfos.Add("Ship", stat.ShipName);
}
}
}
}
coverInfos.Add("Ship", DBManager.Instance.GetShipNameFromCore(reportCore));
coverInfos.Add("E-Mail Ship", reportCore.HerbergEmailContactReportingVessel);
coverInfos.Add("IMO", reportCore.IMO);
DateTime eta = reportCore.ETA ?? (reportCore.ETAKielCanal ?? new DateTime(0));
@ -170,7 +164,7 @@ namespace bsmd.ReportGenerator
List<string> attachments = new List<string>();
attachments.Add(fullPath);
// 10.7.15: Check PAS/CREW messages to create extra csv files and add them as well
#region 10.7.15: Check PAS/CREW messages to create extra csv files and add them as well
Message pas = messages.Find(x => x.MessageNotificationClass == Message.NotificationClass.PAS);
string passengerCSV = null;
@ -188,6 +182,8 @@ namespace bsmd.ReportGenerator
attachments.Add(crewCSV);
}
#endregion
BSMDMail.SendNSWReportWithAttachments(subject, attachments, null);
// reset report status
reportCore.ReportStatus = MessageCore.ReportStatusEnum.NONE;
@ -217,6 +213,20 @@ namespace bsmd.ReportGenerator
}
}
internal void CreateSingleReport(MessageCore reportCore)
{
List<Message> messages = DBManager.Instance.GetMessagesForCore(reportCore, DBManager.MessageLoad.ALL);
messages.Sort(new ANSWMessageComparer());
Dictionary<string, string> coverInfos = new Dictionary<string, string>();
string subject = string.Format("NEW EU-NOAD message IMO {0}", reportCore.IMO);
// reset report status
reportCore.ReportStatus = MessageCore.ReportStatusEnum.NONE;
DBManager.Instance.Save(reportCore);
}
#endregion
}

View File

@ -41,8 +41,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MigraDoc.DocumentObjectModel">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.7" targetFramework="net45" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="PDFsharp-MigraDoc-GDI" version="1.32.4334.0" targetFramework="net45" />
</packages>

View File

@ -1088,15 +1088,30 @@ namespace bsmd.database
{
if (core == null) return;
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "SELECT NOA_NOD.ETAToPortOfCall, NOA_NOD.ETDFromPortOfCall FROM NOA_NOD JOIN MessageHeader ON NOA_NOD.MessageHeaderId = MessageHeader.Id WHERE MessageHeader.MessageCoreId = @ID";
cmd.CommandText = "SELECT NOA_NOD.ETAToPortOfCall, NOA_NOD.ETAToKielCanal, NOA_NOD.ETDFromPortOfCall, NOA_NOD.ETDFromKielCanal FROM NOA_NOD JOIN MessageHeader ON NOA_NOD.MessageHeaderId = MessageHeader.Id WHERE MessageHeader.MessageCoreId = @ID";
cmd.Parameters.AddWithValue("@ID", core.Id);
SqlDataReader reader = this.PerformCommand(cmd);
if (reader.Read())
{
if (core.IsTransit)
{
if (!reader.IsDBNull(1)) core.ETA_NOA_NOD = reader.GetDateTime(1);
if (!reader.IsDBNull(3)) core.ETD_NOA_NOD = reader.GetDateTime(3);
}
else
{
if (!reader.IsDBNull(0)) core.ETA_NOA_NOD = reader.GetDateTime(0);
if (!reader.IsDBNull(1)) core.ETD_NOA_NOD = reader.GetDateTime(1);
if (!reader.IsDBNull(2)) core.ETD_NOA_NOD = reader.GetDateTime(2);
}
}
reader.Close();
if (!core.ETA_NOA_NOD.HasValue && !core.IsTransit)
core.ETA_NOA_NOD = core.ETA;
if (!core.ETA_NOA_NOD.HasValue && core.IsTransit)
core.ETA_NOA_NOD = core.ETAKielCanal;
}
internal void LoadATA(MessageCore core)

View File

@ -161,7 +161,8 @@ namespace bsmd.database
ERROR,
SUSPENDED = 8,
IN_USE,
UPDATED
UPDATED,
REPORT // nur für diese Meldeklasse einen PDF Report erzeugen (geht danach wieder auf PREPARE)
}
/// <summary>

View File

@ -66,7 +66,8 @@ namespace bsmd.database
COMPLETE, // Report mit vollst. Ausgabe aller Felder
HE_REVISION, // eine neue EU-NOAD Rev. wurde empfangen (TBD)
HE_REPORTTYPE, // ein neuer EU-NOAD ReportType wurde empfangen (TBD)
RECEIPT // einfache Empfangsbestätigung (TBD)
RECEIPT, // einfache Empfangsbestätigung (TBD)
SINGLE // Report nur für einzelne Meldeklasse erstellen
}
@ -520,9 +521,12 @@ namespace bsmd.database
}
break;
case SearchFilterType.FILTER_TICKETNO:
{
sb.Append(" TicketNo like @TICKETNO ");
((SqlCommand)cmd).Parameters.AddWithValue("@TICKETNO", searchDict[key]);
break;
}
}
if (!moreThanOne) moreThanOne = true;
}
}

View File

@ -1,7 +1,7 @@
using System.Reflection;
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("3.8.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
[assembly: AssemblyInformationalVersion("3.8.1")]
[assembly: AssemblyCopyright("Copyright © 2014-2017 schick Informatik")]
[assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("3.8.0.*")]
[assembly: AssemblyVersion("3.8.1.*")]

View File

@ -56,6 +56,10 @@ namespace bsmd.database
[ShowReport]
[Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public int? ShipToShipActivityTypeCode { get; set; }
[ShowReport]
[MaxLength(255)]
[ENI2Validation]
public string ShipToShipActivityType { get; set; }
@ -86,12 +90,14 @@ namespace bsmd.database
scmd.Parameters.AddWithNullableValue("@P8", this.ShipToShipActivityType);
scmd.Parameters.AddWithNullableValue("@P9", this.ShipToShipActivitySecurityMattersToReport);
scmd.Parameters.AddWithNullableValue("@P10", this.Identifier);
scmd.Parameters.AddWithNullableValue("@P11", this.ShipToShipActivityTypeCode);
if (this.IsNew)
{
scmd.CommandText = string.Format("INSERT INTO {0} (SEC_Id, ShipToShipActivityLocationName, ShipToShipActivityLocationLoCode, " +
"ShipToShipActivityLocationCoordinatesLatitude, ShipToShipActivityLocationCoordinatesLongitude, ShipToShipActivityDateFrom, ShipToShipActivityDateTo, " +
"ShipToShipActivityType, ShipToShipActivitySecurityMattersToReport, Identifier) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10)",
"ShipToShipActivityType, ShipToShipActivitySecurityMattersToReport, Identifier, ShipToShipActivityTypeCode) VALUES ( " +
"@P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11)",
this.Tablename);
}
else
@ -99,8 +105,8 @@ namespace bsmd.database
scmd.Parameters.AddWithValue(@"ID", this.Id);
scmd.CommandText = string.Format("UPDATE {0} SET ShipToShipActivityLocationName = @P2, ShipToShipActivityLocationLoCode = @P3, " +
"ShipToShipActivityLocationCoordinatesLatitude = @P4, ShipToShipActivityLocationCoordinatesLongitude = @P5, ShipToShipActivityDateFrom = @P6," +
"ShipToShipActivityDateTo = @P7, ShipToShipActivityType = @P8, ShipToShipActivitySecurityMattersToReport = @P9, Identifier = @P10 " +
" WHERE Id = @ID", this.Tablename);
"ShipToShipActivityDateTo = @P7, ShipToShipActivityType = @P8, ShipToShipActivitySecurityMattersToReport = @P9, Identifier = @P10, " +
"ShipToShipActivityTypeCode = @P11 WHERE Id = @ID", this.Tablename);
}
}
@ -108,7 +114,7 @@ namespace bsmd.database
{
string query = string.Format("SELECT Id, ShipToShipActivityLocationName, ShipToShipActivityLocationLoCode, ShipToShipActivityLocationCoordinatesLatitude, " +
"ShipToShipActivityLocationCoordinatesLongitude, ShipToShipActivityDateFrom, ShipToShipActivityDateTo, ShipToShipActivityType, " +
"ShipToShipActivitySecurityMattersToReport, Identifier FROM {0}", this.Tablename);
"ShipToShipActivitySecurityMattersToReport, ShipToShipActivityTypeCode, Identifier FROM {0}", this.Tablename);
switch (filter)
{
@ -144,7 +150,8 @@ namespace bsmd.database
if (!reader.IsDBNull(6)) sts.ShipToShipActivityDateTo = reader.GetDateTime(6);
if (!reader.IsDBNull(7)) sts.ShipToShipActivityType = reader.GetString(7);
if (!reader.IsDBNull(8)) sts.ShipToShipActivitySecurityMattersToReport = reader.GetString(8);
if (!reader.IsDBNull(9)) sts.Identifier = reader.GetString(9);
if (!reader.IsDBNull(9)) sts.ShipToShipActivityTypeCode = reader.GetInt32(9);
if (!reader.IsDBNull(10)) sts.Identifier = reader.GetString(10);
result.Add(sts);
}
reader.Close();

View File

@ -40,8 +40,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.7" targetFramework="net45" />
</packages>

View File

@ -150,6 +150,9 @@ namespace bsmd.dbh
aMessage.SendSuccess = true;
break;
}
if (aMessage.Reset) aMessage.SendSuccess = false; // Send flag zurücksetzen
}
}

View File

@ -1547,7 +1547,7 @@ namespace bsmd.hisnord
string outputDir = Path.Combine(useTest ? Properties.Settings.Default.TestTransmitterRoot : Properties.Settings.Default.LiveTransmitterRoot,
Properties.Settings.Default.OutputDir);
string filename = string.Format("BSMD_{1}-{2}-{0}.xml", message.MessageNotificationClassDisplay, DateTime.Now.ToString("yyyyMMddHHmmss"), core.Id.Value);
string filename = string.Format("BSMD_{1}-{2}-{0}.xml", (message == null) ? "CANCEL" : message.MessageNotificationClassDisplay, DateTime.Now.ToString("yyyyMMddHHmmss"), core.Id.Value);
_log.InfoFormat("saving {0} to output directory", filename);
string filePath = Path.Combine(outputDir, filename);
@ -1559,6 +1559,7 @@ namespace bsmd.hisnord
if (!coreFilenameDict.ContainsKey(core))
coreFilenameDict[core] = new Dictionary<Message, string>();
if(message != null)
coreFilenameDict[core][message] = filename;
coreUseTestDict[core] = useTest;

View File

@ -148,7 +148,10 @@ namespace bsmd.hisnord
bool isAccepted = (nswResponse.Status == "ACCEPTED");
if (aMessage.Reset && nswResponse.IsReset && isAccepted)
{
_log.InfoFormat("Message {0} RESET confirmed", aMessage.Id);
aMessage.SendSuccess = false;
}
if (nswResponse.IsReset && !aMessage.Reset)
aMessage.Reset = nswResponse.IsReset;