Merge branch 'release/eni_7.13'
This commit is contained in:
commit
769c366c9e
@ -72,6 +72,7 @@ namespace ENI2
|
||||
Dictionary<int, string> cargoHandlingDict = LocalizedLookup.getLADGCargoHandlingStrings(langKey);
|
||||
foreach (int key in cargoHandlingDict.Keys)
|
||||
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
|
||||
LADG.MVSHLocodes.AddRange(LocalizedLookup.getMVSHLocodes());
|
||||
|
||||
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
|
||||
CREW.NationalityDict = LocalizedLookup.getNationalities();
|
||||
|
||||
@ -16,12 +16,8 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<Label Content="Excel:" />
|
||||
<Label Name="labelStatusExcel" Content="?" FontWeight="Bold" />
|
||||
<Label Content="Transmitter:" />
|
||||
<Label Name="labelStatusTransmitter" Content="?" FontWeight="Bold" />
|
||||
<Label Content="Report:" />
|
||||
<Label Name="labelStatusReport" Content="?" FontWeight="Bold" />
|
||||
<Button Name="refreshButton" Content="{x:Static p:Resources.textRefresh}" Margin="4" Background="Transparent" Click="refreshButton_Click"/>
|
||||
</StackPanel>
|
||||
<local:ENIDataGrid Grid.Row="1"
|
||||
|
||||
@ -27,13 +27,14 @@ namespace ENI2.Controls
|
||||
private readonly static ILog _log = LogManager.GetLogger("ServerStatus");
|
||||
private ProgressBar _updateProgressBar;
|
||||
private TextBlock _updateTextBlock;
|
||||
private bool _isUpdating = false;
|
||||
private readonly static Dictionary<Guid, string> coreIdVisitIdMap = new Dictionary<Guid, string>();
|
||||
|
||||
public ServerStatusControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.dataGridStatus.ItemsSource = this.entries;
|
||||
this.Loaded += ServerStatusControl_Loaded;
|
||||
|
||||
}
|
||||
|
||||
private void ServerStatusControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
|
||||
@ -43,6 +44,8 @@ namespace ENI2.Controls
|
||||
|
||||
internal void Update(LockingServiceReference.ServerStatus serverStatus)
|
||||
{
|
||||
if (this._isUpdating) return;
|
||||
_isUpdating = true;
|
||||
int totalNum = serverStatus.IMPFiles.Length + serverStatus.READYFiles.Length + serverStatus.CORRUPTFiles.Length;
|
||||
entries.Clear();
|
||||
BackgroundWorker bgWorker = new BackgroundWorker();
|
||||
@ -95,24 +98,20 @@ namespace ENI2.Controls
|
||||
|
||||
System.Windows.Application.Current.Dispatcher.Invoke(delegate {
|
||||
foreach (StatusEntry se in tmpList)
|
||||
entries.Add(se);
|
||||
entries.Add(se);
|
||||
});
|
||||
};
|
||||
|
||||
bgWorker.RunWorkerCompleted += (o, e) =>
|
||||
{
|
||||
{
|
||||
|
||||
// Enumeration parsen und text ausgeben
|
||||
ServiceControllerStatus excel = (ServiceControllerStatus)serverStatus.Excel;
|
||||
this.labelStatusExcel.Content = excel.ToString();
|
||||
|
||||
ServiceControllerStatus report = (ServiceControllerStatus)serverStatus.Report;
|
||||
this.labelStatusReport.Content = report.ToString();
|
||||
|
||||
ServiceControllerStatus transmitter = (ServiceControllerStatus)serverStatus.Transmitter;
|
||||
this.labelStatusTransmitter.Content = transmitter.ToString();
|
||||
|
||||
this.busyIndicator.IsBusy = false;
|
||||
|
||||
_isUpdating = false;
|
||||
};
|
||||
|
||||
this.busyIndicator.IsBusy = true;
|
||||
@ -147,15 +146,23 @@ namespace ENI2.Controls
|
||||
|
||||
string guidString = m.Groups[2].Value;
|
||||
|
||||
string idString = "";
|
||||
if (!guidIdDict.ContainsKey(guidString))
|
||||
{
|
||||
string idString = "";
|
||||
if (Guid.TryParse(m.Groups[2].Value, out Guid coreId))
|
||||
{
|
||||
MessageCore aCore = DBManager.Instance.GetMessageCoreById(coreId);
|
||||
if (aCore != null)
|
||||
if (!coreIdVisitIdMap.ContainsKey(coreId))
|
||||
{
|
||||
idString = aCore.DisplayId;
|
||||
MessageCore aCore = DBManager.Instance.GetMessageCoreById(coreId);
|
||||
if (aCore != null)
|
||||
{
|
||||
coreIdVisitIdMap[coreId] = aCore.DisplayId;
|
||||
idString = aCore.DisplayId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
idString = coreIdVisitIdMap[coreId];
|
||||
}
|
||||
}
|
||||
guidIdDict[guidString] = idString;
|
||||
|
||||
@ -72,7 +72,7 @@ namespace ENI2.DetailViewControls
|
||||
this.buttonDeleteTemplate.IsEnabled = DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].IsEditor;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
public async override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
@ -127,7 +127,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
if(_agntTemplates == null)
|
||||
{
|
||||
_agntTemplates = DBManager.Instance.GetAGNTTemplates(); // inital full load
|
||||
_agntTemplates = await DBManagerAsync.GetAGNTTemplatesAsync(); // inital full load
|
||||
_agntTemplates.Sort();
|
||||
Trace.WriteLine(string.Format("{0} agent templates loaded", _agntTemplates.Count));
|
||||
}
|
||||
|
||||
@ -60,23 +60,25 @@
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textShippingArea}" Name="label_INFOShippingArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textMaerskSeago}" Name="label_MaerskSeaGo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textPortArea}" Name="label_INFOPortArea" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textRequestedPositionInPortOfCall}" Name="label_INFORequestedBerth" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textBowThrusterPower}" Name="label_INFOBowThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textSternThrusterPower}" Name="label_INFOSternThrusterPower" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textFumigatedBulkCargo}" Name="label_INFOFumigatedBulkCargo" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDeplacementSummerDraught}" Name="label_INFODeplacementSummerDraught" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textSpecialRequirementsOfShipAtBerth}" Name="label_INFOSpecialRequirements" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textConstructionCharacteristics}" Name="label_INFOConstructionCharacteristics" VerticalContentAlignment="Center" Margin="0,0,10,0"/>
|
||||
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="comboBoxShippingArea" Margin="2" SelectedIndex="{Binding ShippingArea, Converter={util:ByteConverter}}" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="3" x:Name="comboBoxGroup" Margin="0,2,4,2" ItemsSource="{StaticResource arrList}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectionChanged="comboBoxGroup_SelectionChanged"/>
|
||||
<ComboBox Grid.Row="0" Grid.Column="3" x:Name="comboBoxGroup" Margin="2,2,4,2" ItemsSource="{StaticResource arrList}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectionChanged="comboBoxGroup_SelectionChanged"/>
|
||||
<Button Grid.Row="1" Grid.Column="3" x:Name="buttonSearchPortArea" Margin="2" Content="Lookup port area" Click="buttonSearchPortArea_Click" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxPortArea" Margin="2" SelectedValue="{Binding PortArea}" SelectedValuePath="Key" DisplayMemberPath="Value" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Name="textRequestedPostionInPortOfCall" Margin="2" Text="{Binding RequestedPositionInPortOfCall, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Name="textBowThrusterPower" Margin="2" Text="{Binding BowThrusterPower, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Name="textSternThrusterPower" Margin="2" Text="{Binding SternThrusterPower, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||
<CheckBox Grid.Row="5" Grid.Column="1" Name="checkBoxFumigatedBulkCargo" VerticalContentAlignment="Center" IsChecked="{Binding FumigatedBulkCargoBool, Mode=TwoWay}" Margin="2"/>
|
||||
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownDisplacementSummerDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Value="{Binding DeplacementSummerDraught_TNE}" Margin="4,2,0,2" FormatString="N1" TextAlignment="Left"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Top" />
|
||||
<TextBox Grid.Row="5" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Top"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Name="servGroupBox" Header="{x:Static p:Resources.textServ}" Grid.Row="2">
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
// Copyright (c) 2017 schick Informatik
|
||||
// Copyright (c) 2017- schick Informatik
|
||||
// Description:
|
||||
//
|
||||
|
||||
// Description: Detailansicht Gruppe Port Notification
|
||||
//
|
||||
@ -6,6 +8,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
@ -26,6 +29,7 @@ namespace ENI2.DetailViewControls
|
||||
private Message _infoMessage;
|
||||
private Message _servMessage;
|
||||
private Message _ladgMessage;
|
||||
private Dictionary<string, string> portAreas = null;
|
||||
|
||||
private static readonly string[] shippingAreas = {
|
||||
Properties.Resources.textShippingAreaNORTHBALTIC,
|
||||
@ -109,11 +113,11 @@ namespace ENI2.DetailViewControls
|
||||
_infoMessage.Elements.Add(info);
|
||||
}
|
||||
|
||||
Dictionary<string, string> portAreas = LocalizedLookup.getPortAreasForLocode(this.Core.PoC);
|
||||
portAreas = LocalizedLookup.getPortAreasForLocode(this.Core.PoC);
|
||||
this.comboBoxPortArea.ItemsSource = portAreas;
|
||||
|
||||
this.comboBoxShippingArea.ItemsSource = shippingAreas;
|
||||
this.infoGroupBox.DataContext = info;
|
||||
this.infoGroupBox.DataContext = info;
|
||||
|
||||
|
||||
|
||||
@ -161,6 +165,7 @@ namespace ENI2.DetailViewControls
|
||||
if (this.Core.IsFlagSet(MessageCore.CoreFlags.HOEGH)) this.comboBoxGroup.SelectedIndex = 4;
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#region datagrid LADG
|
||||
@ -456,6 +461,21 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SelectPortAreaDialog spad = new SelectPortAreaDialog(this.Core.PoC);
|
||||
if(spad.ShowDialog() ?? false)
|
||||
{
|
||||
if(spad.SelectedArea != null)
|
||||
{
|
||||
if (portAreas.ContainsKey(spad.SelectedArea))
|
||||
{
|
||||
var pair = portAreas.SingleOrDefault(p => p.Key == spad.SelectedArea);
|
||||
this.comboBoxPortArea.SelectedItem = pair;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
</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"/>
|
||||
<!--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"/-->
|
||||
@ -54,8 +55,38 @@
|
||||
</DatePicker>
|
||||
<enictrl:LocodeControl Grid.Row="2" Grid.Column="1" x:Name="locodeCtrlLastWastePort" LocodeValue="{Binding LastWasteDisposalPort, 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" />
|
||||
<Button Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="1" Name="buttonAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonAddMissingEntries_Click"/>
|
||||
<Button Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="1" Name="buttonImportFromExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Click="buttonImportFromExcel_Click" />
|
||||
<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" />
|
||||
<Grid Grid.Row="6" Grid.Column="3" Grid.ColumnSpan="1" Name="gridTemplateControls" 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="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>
|
||||
<enictrl:ENIDataGrid x:Name="dataGridWaste" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="1" CanUserAddRows="False">
|
||||
@ -151,10 +182,12 @@
|
||||
</enictrl:ENIDataGrid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Row="0" Grid.Column="0" Name="buttonWasteReceivedAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonWasteReceivedAddMissingEntries_Click"/>
|
||||
<Button Grid.Row="0" Grid.Column="1" Name="buttonCopyFromWAS" Content="{x:Static p:Resources.textCopyFromWAS}" Margin="2" Click="buttonCopyFromWAS_Click"/>
|
||||
</Grid>
|
||||
<enictrl:ENIDataGrid x:Name="dataGridWasteReceived" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="2" CanUserAddRows="False">
|
||||
|
||||
@ -13,6 +13,7 @@ using ExcelDataReader;
|
||||
using System.IO;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace ENI2.DetailViewControls
|
||||
{
|
||||
@ -27,6 +28,10 @@ namespace ENI2.DetailViewControls
|
||||
private Message _wasRcptMessage;
|
||||
private WAS_RCPT _selectedWAS_RCPT;
|
||||
|
||||
private static List<WasteDisposalServiceProvider_Template> _wsdpTemplates = null;
|
||||
private WasteDisposalServiceProvider_Template _currentTemplate;
|
||||
private string _undoTemplate;
|
||||
|
||||
private static readonly string[] _wasteDeliveryList =
|
||||
{
|
||||
"ALL",
|
||||
@ -97,7 +102,7 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
public async override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
@ -178,6 +183,18 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
#region init WSDP provider
|
||||
|
||||
if(_wsdpTemplates == null)
|
||||
{
|
||||
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
|
||||
_wsdpTemplates.Sort();
|
||||
Trace.WriteLine($"{_wsdpTemplates.Count} WSDP templates loaded");
|
||||
}
|
||||
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#region Waste receipt grid event handler
|
||||
@ -578,8 +595,124 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Waste disposal Service Provider templates event handler
|
||||
|
||||
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
|
||||
|
||||
#region Copy WAS to WAS_RCPT handler
|
||||
|
||||
private void buttonCopyFromWAS_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_selectedWAS_RCPT == null) return;
|
||||
|
||||
if(MessageBox.Show(Properties.Resources.textCopyToWASConfirmation, Properties.Resources.textConfirmation,
|
||||
MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||
{
|
||||
foreach(Waste waste in _was.Waste)
|
||||
{
|
||||
if(waste.WasteDisposalAmount_MTQ.HasValue && waste.WasteDisposalAmount_MTQ > 0)
|
||||
{
|
||||
// find matching WAS_RCPT entry
|
||||
foreach(WasteReceived wasteReceived in _selectedWAS_RCPT.WasteReceived)
|
||||
{
|
||||
if(wasteReceived.WasteCode.Equals(waste.WasteType.ToString()))
|
||||
{
|
||||
wasteReceived.AmountWasteReceived_MTQ = waste.WasteDisposalAmount_MTQ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dataGridWasteReceived.Items.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>3</ApplicationRevision>
|
||||
<ApplicationVersion>7.12.0.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>5</ApplicationRevision>
|
||||
<ApplicationVersion>7.13.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
@ -252,6 +252,9 @@
|
||||
<Compile Include="EditControls\NewDGItemDialog.xaml.cs">
|
||||
<DependentUpon>NewDGItemDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditControls\SelectPortAreaDialog.xaml.cs">
|
||||
<DependentUpon>SelectPortAreaDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Excel\DakosyUtil.cs" />
|
||||
<Compile Include="Excel\ExcelBase.cs" />
|
||||
<Compile Include="Excel\ExcelComparer.cs" />
|
||||
@ -697,6 +700,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EditControls\SelectPortAreaDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EditControls\ShowIdDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// Description: CREW Bearbeitungsdialog
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
using bsmd.database;
|
||||
@ -14,7 +15,8 @@ namespace ENI2.EditControls
|
||||
/// Interaction logic for EditCREWDialog.xaml
|
||||
/// </summary>
|
||||
public partial class EditCREWDialog : EditWindowBase
|
||||
{
|
||||
{
|
||||
|
||||
public EditCREWDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -35,15 +37,36 @@ namespace ENI2.EditControls
|
||||
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
|
||||
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
|
||||
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
|
||||
if (this.CREW.CrewMemberDateOfBirth > CREW.CLAMPMAXDATE)
|
||||
{
|
||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMAXDATE;
|
||||
}
|
||||
else if (this.CREW.CrewMemberDateOfBirth < CREW.CLAMPMINDATE)
|
||||
{
|
||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMINDATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
|
||||
}
|
||||
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
|
||||
this.comboBoxIdDocType.SelectedValue = this.CREW.CrewMemberIdentityDocumentType?.ToString();
|
||||
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
|
||||
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
|
||||
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
this.comboBoxIssuingState.SelectedValue = this.CREW.CrewMemberIdentityDocumentIssuingState;
|
||||
if(this.CREW.CrewMemberIdentityDocumentExpiryDate.HasValue)
|
||||
if (this.CREW.CrewMemberIdentityDocumentExpiryDate > CREW.CLAMPMAXDATE)
|
||||
{
|
||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMAXDATE;
|
||||
}
|
||||
else if(this.CREW.CrewMemberDateOfBirth < CREW.CLAMPMINDATE)
|
||||
{
|
||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMINDATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
|
||||
}
|
||||
// this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict; // XXX: TODO
|
||||
// this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
|
||||
// this.textBoxEffects.Text = this.CREW.Effects;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// Description: PAS Bearbeitungsdialog
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
using bsmd.database;
|
||||
@ -14,7 +15,8 @@ namespace ENI2.EditControls
|
||||
/// Interaction logic for EditPasDialog.xaml
|
||||
/// </summary>
|
||||
public partial class EditPASDialog : EditWindowBase
|
||||
{
|
||||
{
|
||||
|
||||
public EditPASDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -34,7 +36,18 @@ namespace ENI2.EditControls
|
||||
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
|
||||
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
|
||||
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
|
||||
if (this.PAS.PassengerDateOfBirth > CREW.CLAMPMAXDATE)
|
||||
{
|
||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMAXDATE;
|
||||
}
|
||||
else if (this.PAS.PassengerDateOfBirth < CREW.CLAMPMINDATE)
|
||||
{
|
||||
this.datePickerDateOfBirth.SelectedDate = CREW.CLAMPMINDATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
|
||||
}
|
||||
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
|
||||
this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType?.ToString();
|
||||
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
|
||||
@ -44,8 +57,20 @@ namespace ENI2.EditControls
|
||||
this.checkBoxTransitPassenger.IsChecked = this.PAS.PassengerInTransit;
|
||||
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
this.comboBoxIssuingState.SelectedValue = this.PAS.PassengerIdentityDocumentIssuingState;
|
||||
if(this.PAS.PassengerIdentityDocumentExpiryDate.HasValue)
|
||||
|
||||
if (this.PAS.PassengerIdentityDocumentExpiryDate > CREW.CLAMPMAXDATE)
|
||||
{
|
||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMAXDATE;
|
||||
}
|
||||
else if (this.PAS.PassengerIdentityDocumentExpiryDate < CREW.CLAMPMINDATE)
|
||||
{
|
||||
this.datePickerExpiryDate.SelectedDate = CREW.CLAMPMINDATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.datePickerExpiryDate.SelectedDate = this.PAS.PassengerIdentityDocumentExpiryDate;
|
||||
}
|
||||
|
||||
// XXX : TODO
|
||||
//this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
//this.comboBoxCountryOfBirth.SelectedValue = this.PAS.PassengerCountryOfBirth;
|
||||
|
||||
@ -18,7 +18,7 @@ namespace ENI2.EditControls
|
||||
public partial class NewDGItemDialog : EditWindowBase
|
||||
{
|
||||
private List<HAZPosTemplate> _data = null;
|
||||
private static object filterLock = new object();
|
||||
private static readonly object filterLock = new object();
|
||||
|
||||
public NewDGItemDialog()
|
||||
{
|
||||
|
||||
53
ENI2/EditControls/SelectPortAreaDialog.xaml
Normal file
53
ENI2/EditControls/SelectPortAreaDialog.xaml
Normal file
@ -0,0 +1,53 @@
|
||||
<enictrl:EditWindowBase x:Class="ENI2.EditControls.SelectPortAreaDialog"
|
||||
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||
xmlns:local="clr-namespace:ENI2.EditControls"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
mc:Ignorable="d"
|
||||
Title="Search port area" Height="400" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="Window_Loaded">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="84" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="90" />
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="1" Content="Select" />
|
||||
<Label Grid.Row="0" x:Name="labelLocode" Content="ZZUKN" />
|
||||
<ListBox Name="listBoxAreas" Grid.Column="1" Grid.Row="1" Margin="2" SelectionChanged="comboBoxType_SelectionChanged" />
|
||||
<xctk:WatermarkTextBox Margin="2" Watermark="{x:Static p:Resources.textSearch}" Name="textBoxSearchDescription" Grid.Row="0" Grid.Column="1" TextChanged="textBoxSearchDescription_TextChanged" />
|
||||
<Label Grid.Row="2" Content="Agency" />
|
||||
<Label Grid.Row="3" Content="Ships" />
|
||||
<Label Grid.Row="4" Content="Berth" />
|
||||
<Label Grid.Row="5" Content="PortArea" />
|
||||
<Label Grid.Row="6" Content="Remark" />
|
||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="2" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
||||
<TextBlock Name="textBlockAgency" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
||||
<TextBlock Name="textBlockShips" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="4" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
||||
<TextBlock Name="textBlockBerth" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
||||
<TextBlock Name="textBlockPortArea" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
<Border BorderThickness="1" Grid.Column="1" Grid.Row="6" Grid.RowSpan="1" BorderBrush="Black" Margin="2">
|
||||
<TextBlock Name="textBlockRemarks" Margin="2,1,2,3" Background="LightGray" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
85
ENI2/EditControls/SelectPortAreaDialog.xaml.cs
Normal file
85
ENI2/EditControls/SelectPortAreaDialog.xaml.cs
Normal file
@ -0,0 +1,85 @@
|
||||
// Copyright (c) 2023- schick Informatik
|
||||
// Description: Helper search window to
|
||||
//
|
||||
|
||||
using bsmd.database;
|
||||
using ENI2.Controls;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace ENI2.EditControls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SelectPortAreaDialog.xaml
|
||||
/// </summary>
|
||||
public partial class SelectPortAreaDialog : EditWindowBase
|
||||
{
|
||||
|
||||
#region Fields
|
||||
|
||||
private readonly string _poc = null;
|
||||
private List<PortAreaInfo> _portAreas;
|
||||
private static readonly object filterLock = new object();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction
|
||||
|
||||
public SelectPortAreaDialog(string poc)
|
||||
{
|
||||
InitializeComponent();
|
||||
_poc = poc;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public string SelectedArea { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_portAreas = LocalizedLookup.getPortAreaInfos()[this._poc];
|
||||
this.labelLocode.Content = this._poc;
|
||||
}
|
||||
|
||||
private void comboBoxType_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (this.listBoxAreas.SelectedItem is PortAreaInfo pai)
|
||||
{
|
||||
this.textBlockAgency.Text = pai.Agency;
|
||||
this.textBlockBerth.Text = pai.Berth;
|
||||
this.textBlockPortArea.Text = pai.PortArea;
|
||||
this.textBlockShips.Text = pai.Ships;
|
||||
this.textBlockRemarks.Text = pai.Remark;
|
||||
this.SelectedArea = pai.PortAreaCode;
|
||||
}
|
||||
}
|
||||
|
||||
private void textBoxSearchDescription_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
|
||||
{
|
||||
string searchText = this.textBoxSearchDescription.Text.Trim();
|
||||
|
||||
lock (filterLock)
|
||||
{
|
||||
IEnumerable<PortAreaInfo> filtered = _portAreas;
|
||||
if (searchText.Length > 0)
|
||||
{
|
||||
filtered = _portAreas.Where(elem => (elem.Remark != null && elem.Remark.ToUpperInvariant().Contains(searchText.ToUpperInvariant())) ||
|
||||
(elem.Agency != null && elem.Agency.ToUpperInvariant().Contains(searchText.ToUpperInvariant())) ||
|
||||
(elem.Berth != null && elem.Berth.ToUpperInvariant().Contains(searchText.ToUpperInvariant())) ||
|
||||
(elem.PortArea != null && elem.PortArea.ToUpperInvariant().Contains(searchText.ToUpperInvariant())));
|
||||
}
|
||||
this.listBoxAreas.ItemsSource = filtered;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@ -49,9 +49,14 @@ namespace ENI2.Excel
|
||||
{
|
||||
message.CreatedBy = "EXCEL";
|
||||
if (message.MessageNotificationClass == Message.NotificationClass.STO)
|
||||
{
|
||||
message.InternalStatus = Message.BSMDStatus.PREPARE;
|
||||
}
|
||||
else
|
||||
{
|
||||
message.InternalStatus = Message.BSMDStatus.EXCEL;
|
||||
message.ChangedBy = ReportingParty.CurrentReportingParty?.Logon;
|
||||
}
|
||||
message.UnsentMessageWarningShown = false;
|
||||
DBManager.Instance.Save(message);
|
||||
message.SaveElements();
|
||||
|
||||
@ -956,9 +956,15 @@ namespace ENI2.Excel
|
||||
|
||||
string portArea = reader.ReadText("INFO.PortArea")?.ToUpper();
|
||||
if (!portArea.IsNullOrEmpty() && DBManager.Instance.GetPortAreaDict().ContainsKey(portArea))
|
||||
{
|
||||
info.PortArea = portArea;
|
||||
}
|
||||
else
|
||||
{
|
||||
info.PortArea = "";
|
||||
if (!portArea.IsNullOrEmpty() && info.RequestedPositionInPortOfCall.IsNullOrEmpty())
|
||||
info.RequestedPositionInPortOfCall = portArea;
|
||||
}
|
||||
|
||||
info.ShippingArea = reader.ReadShippingArea("INFO.ShippingArea"); // enum read func
|
||||
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
|
||||
@ -1440,7 +1446,11 @@ namespace ENI2.Excel
|
||||
string crewNameString = reader.ReadText(crewName);
|
||||
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty();
|
||||
|
||||
if (poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false)
|
||||
// if crew members joined is set explicitly to true and the name is empty, still set the field to true
|
||||
if (!(poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false) && (PortOfCallLast30DaysCrewMembersJoinedFlag ?? false))
|
||||
poc30d.PortOfCallLast30DaysCrewMembersJoined = true;
|
||||
|
||||
if (!crewNameString.IsNullOrEmpty() && (poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false))
|
||||
{
|
||||
// try different separators
|
||||
string[] crew = crewNameString.Split(';');
|
||||
|
||||
@ -16,6 +16,7 @@ namespace ENI2
|
||||
private static readonly SQLiteConnection _con;
|
||||
private const string _locode_DB_NAME = "db.sqlite";
|
||||
private static Dictionary<string, string> _nationalities = null;
|
||||
private static Dictionary<string, List<PortAreaInfo>> _portAreaInfos = null;
|
||||
|
||||
static LocalizedLookup()
|
||||
{
|
||||
@ -188,6 +189,8 @@ namespace ENI2
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Dictionary<string, string> getCargoCodesNST()
|
||||
{
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
@ -288,5 +291,57 @@ namespace ENI2
|
||||
reader.Close();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<string> getMVSHLocodes()
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
|
||||
string query = string.Format("SELECT locode from MVSH_ports");
|
||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||
IDataReader reader = cmd.ExecuteReader();
|
||||
while (reader.Read())
|
||||
{
|
||||
if (reader.IsDBNull(0)) continue;
|
||||
result.Add(reader.GetString(0));
|
||||
}
|
||||
reader.Close();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Dictionary<string, List<PortAreaInfo>> getPortAreaInfos()
|
||||
{
|
||||
if(_portAreaInfos == null)
|
||||
{
|
||||
_portAreaInfos = new Dictionary<string, List<PortAreaInfo>>();
|
||||
string query = @"SELECT Locode, Agentur, Schiffe, Liegeplatz, Hafengebiet, `Hafengebiet-Code`, Bemerkungen from INFO_PortArea_Helper";
|
||||
SQLiteCommand cmd = new SQLiteCommand(query, _con);
|
||||
IDataReader reader = cmd.ExecuteReader();
|
||||
while(reader.Read())
|
||||
{
|
||||
PortAreaInfo pai = new PortAreaInfo();
|
||||
if (reader.IsDBNull(0)) continue;
|
||||
pai.Locode = reader.GetString(0);
|
||||
if (!reader.IsDBNull(1))
|
||||
pai.Agency = reader.GetString(1);
|
||||
if (!reader.IsDBNull(2))
|
||||
pai.Ships = reader.GetString(2);
|
||||
if (!reader.IsDBNull(3))
|
||||
pai.Berth = reader.GetString(3);
|
||||
if (!reader.IsDBNull(4))
|
||||
pai.PortArea = reader.GetString(4);
|
||||
if (!reader.IsDBNull(5))
|
||||
pai.PortAreaCode = reader.GetString(5);
|
||||
if (!reader.IsDBNull(6))
|
||||
pai.Remark = reader.GetString(6);
|
||||
if (!_portAreaInfos.ContainsKey(pai.Locode))
|
||||
{
|
||||
_portAreaInfos[pai.Locode] = new List<PortAreaInfo>();
|
||||
}
|
||||
_portAreaInfos[pai.Locode].Add(pai);
|
||||
}
|
||||
}
|
||||
return _portAreaInfos;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -675,9 +675,10 @@ namespace ENI2
|
||||
this.menuItemValueMappings.Visibility = Visibility.Visible;
|
||||
if (this.userEntity.IsAdmin)
|
||||
{
|
||||
this.menuItemUserAdministration.Visibility = Visibility.Visible;
|
||||
this.menuItemUserAdministration.Visibility = Visibility.Visible;
|
||||
this.sucheControl.AdminMode = true;
|
||||
}
|
||||
}
|
||||
this.menuItemValueMappings.Visibility = this.userEntity.IsEditor ? Visibility.Visible : Visibility.Hidden;
|
||||
break;
|
||||
case ReportingParty.LogonResult.FAILED:
|
||||
this.labelLoginResult.Content = Properties.Resources.textWrongPassword;
|
||||
|
||||
18
ENI2/Properties/Resources.Designer.cs
generated
18
ENI2/Properties/Resources.Designer.cs
generated
@ -1613,6 +1613,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy from WAS.
|
||||
/// </summary>
|
||||
public static string textCopyFromWAS {
|
||||
get {
|
||||
return ResourceManager.GetString("textCopyFromWAS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy IMO to clipboard.
|
||||
/// </summary>
|
||||
@ -1658,6 +1667,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do you want to copy / overwrite disposal amounts using values from WAS?.
|
||||
/// </summary>
|
||||
public static string textCopyToWASConfirmation {
|
||||
get {
|
||||
return ResourceManager.GetString("textCopyToWASConfirmation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy TOWA to TOWD.
|
||||
/// </summary>
|
||||
|
||||
@ -1882,4 +1882,10 @@
|
||||
<data name="textExcelValueMappings" xml:space="preserve">
|
||||
<value>Excel import value mappings</value>
|
||||
</data>
|
||||
<data name="textCopyFromWAS" xml:space="preserve">
|
||||
<value>Copy from WAS</value>
|
||||
</data>
|
||||
<data name="textCopyToWASConfirmation" xml:space="preserve">
|
||||
<value>Do you want to copy / overwrite disposal amounts using values from WAS?</value>
|
||||
</data>
|
||||
</root>
|
||||
4
ENI2/Properties/Settings.Designer.cs
generated
4
ENI2/Properties/Settings.Designer.cs
generated
@ -82,8 +82,8 @@ namespace ENI2.Properties {
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nsw;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;P" +
|
||||
"ersist Security Info=False;Connection Reset=false")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nswtest;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpass" +
|
||||
"wd;Persist Security Info=False;Connection Reset=false")]
|
||||
public string ConnectionString {
|
||||
get {
|
||||
return ((string)(this["ConnectionString"]));
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<Value Profile="(Default)">BSMD ReportGenerator</Value>
|
||||
</Setting>
|
||||
<Setting Name="ConnectionString" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</Value>
|
||||
<Value Profile="(Default)">Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
24
SQL/WSDP_template.7.13.sql
Normal file
24
SQL/WSDP_template.7.13.sql
Normal file
@ -0,0 +1,24 @@
|
||||
PRINT N'Creating [dbo].[WasteDisposalServiceProvider_template]...';
|
||||
|
||||
GO
|
||||
CREATE TABLE [dbo].[WasteDisposalServiceProvider_template] (
|
||||
[Id] UNIQUEIDENTIFIER NOT NULL,
|
||||
[WasteDisposalServiceProviderName] NVARCHAR (100) NULL,
|
||||
[Remark] NVARCHAR (256) NULL,
|
||||
[Created] DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
[Changed] DATETIME NULL,
|
||||
PRIMARY KEY CLUSTERED ([Id] ASC)
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
CREATE TRIGGER WasteDisposalServiceProvider_template_Trigger_Change_Log
|
||||
ON
|
||||
dbo.WasteDisposalServiceProvider_template
|
||||
FOR UPDATE
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
IF NOT UPDATE([Changed])
|
||||
UPDATE WasteDisposalServiceProvider_template SET [Changed] = GETDATE() WHERE Id IN (SELECT Id FROM [inserted])
|
||||
|
||||
GO
|
||||
@ -292,9 +292,7 @@ namespace SendNSWMessageService
|
||||
// external processing for dbh
|
||||
bsmd.dbh.MessageController.SendAndReceive();
|
||||
|
||||
List<MessageCore> coresMarkedForStatusQuery = DBManager.Instance.GetMessageCoresWithNSWStatusFlag();
|
||||
|
||||
foreach (MessageCore core in coresMarkedForStatusQuery)
|
||||
foreach (MessageCore core in DBManager.Instance.GetMessageCoresWithNSWStatusFlag())
|
||||
{
|
||||
core.QueryNSWStatus = false; // reset flag
|
||||
Status aStatus = new Status(core);
|
||||
|
||||
@ -12,7 +12,7 @@ using System.IO;
|
||||
|
||||
namespace bsmd.LockingService
|
||||
{
|
||||
|
||||
|
||||
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
|
||||
public class LockingService : IService
|
||||
{
|
||||
@ -73,13 +73,13 @@ namespace bsmd.LockingService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Unlock(Guid messageCoreId, Guid userId)
|
||||
{
|
||||
{
|
||||
lock(lockDict)
|
||||
{
|
||||
if(lockDict.ContainsKey(messageCoreId))
|
||||
@ -89,19 +89,19 @@ namespace bsmd.LockingService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void LockRefresh(List<Guid> currentLocks, Guid userId)
|
||||
{
|
||||
foreach (Guid messageCoreId in currentLocks)
|
||||
this.Lock(messageCoreId, userId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Log(string msg, string host, Guid userId)
|
||||
{
|
||||
log.Info(string.Format("{0} {1}:{2}", host, userId, msg));
|
||||
}
|
||||
|
||||
|
||||
public List<CoreLock> GetLocks()
|
||||
{
|
||||
List<CoreLock> result = new List<CoreLock>();
|
||||
@ -152,8 +152,8 @@ namespace bsmd.LockingService
|
||||
string impPath = Path.Combine(Properties.Settings.Default.TransmitterRoot, "IMP");
|
||||
if(Directory.Exists(impPath))
|
||||
{
|
||||
foreach(string file in Directory.GetFiles(impPath))
|
||||
serverStatus.IMPFiles.Add(Path.GetFileNameWithoutExtension(file));
|
||||
foreach(string file in Directory.GetFiles(impPath))
|
||||
serverStatus.IMPFiles.Add(Path.GetFileNameWithoutExtension(file));
|
||||
}
|
||||
|
||||
serverStatus.READYFiles = new List<string>();
|
||||
|
||||
@ -25,7 +25,7 @@ namespace bsmd.LockingService.Properties {
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("E:\\svnlager\\BSMD\\nsw\\HIS-NORD\\Transmitter-Tool")]
|
||||
public string TransmitterRoot {
|
||||
get {
|
||||
return ((string)(this["TransmitterRoot"]));
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="TransmitterRoot" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)" />
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@ -58,7 +58,7 @@
|
||||
<applicationSettings>
|
||||
<bsmd.LockingService.Properties.Settings>
|
||||
<setting name="TransmitterRoot" serializeAs="String">
|
||||
<value>E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool</value>>
|
||||
<value>E:\svnlager\BSMD\nsw\HIS-NORD\Transmitter-Tool</value>
|
||||
</setting>
|
||||
</bsmd.LockingService.Properties.Settings>
|
||||
</applicationSettings>
|
||||
|
||||
@ -97,7 +97,7 @@ namespace bsmd.dakosy
|
||||
|
||||
}
|
||||
|
||||
public static void TransmitAll(string remoteDir, string localDir, Direction direction, string sessionName)
|
||||
private static Process StartWinSCPProcess()
|
||||
{
|
||||
Process winscp = new Process();
|
||||
winscp.StartInfo.FileName = Properties.Settings.Default.WINSCPFullPath;
|
||||
@ -107,12 +107,24 @@ namespace bsmd.dakosy
|
||||
winscp.StartInfo.RedirectStandardOutput = true;
|
||||
winscp.StartInfo.RedirectStandardError = true;
|
||||
winscp.StartInfo.CreateNoWindow = true;
|
||||
winscp.Start();
|
||||
winscp.EnableRaisingEvents = true;
|
||||
winscp.OutputDataReceived += (s, e) => { if (!e.Data.IsNullOrEmpty()) _log.Debug(e.Data); };
|
||||
winscp.ErrorDataReceived += (s, e) => { if (!e.Data.IsNullOrEmpty()) _log.Warn(e.Data); };
|
||||
winscp.Start();
|
||||
winscp.BeginErrorReadLine();
|
||||
winscp.BeginOutputReadLine();
|
||||
|
||||
return winscp;
|
||||
}
|
||||
|
||||
public static void TransmitAll(string remoteDir, string localDir, Direction direction, string openCommand)
|
||||
{
|
||||
Process winscp = StartWinSCPProcess();
|
||||
|
||||
// Feed in the scripting commands
|
||||
winscp.StandardInput.WriteLine("option batch abort");
|
||||
winscp.StandardInput.WriteLine("option confirm off");
|
||||
winscp.StandardInput.WriteLine("open " + sessionName);
|
||||
winscp.StandardInput.WriteLine(openCommand);
|
||||
winscp.StandardInput.WriteLine("lcd " + localDir);
|
||||
// winscp.StandardInput.WriteLine("ls");
|
||||
if (remoteDir != null)
|
||||
@ -120,63 +132,30 @@ namespace bsmd.dakosy
|
||||
if(direction == Direction.INCOMING)
|
||||
winscp.StandardInput.WriteLine("get *.xml");
|
||||
if(direction == Direction.OUTGOING)
|
||||
winscp.StandardInput.WriteLine("put *.xml");
|
||||
// move back up since winscp session remembers the last folder
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Collect all output
|
||||
string output = winscp.StandardOutput.ReadToEnd();
|
||||
_log.Debug(output);
|
||||
output = winscp.StandardError.ReadToEnd();
|
||||
if(!output.Trim().IsNullOrEmpty())
|
||||
_log.Warn(output);
|
||||
winscp.StandardInput.WriteLine("put *.xml");
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Wait until WinSCP finishes
|
||||
winscp.WaitForExit();
|
||||
}
|
||||
|
||||
public static void RemoveProcessedFile(string remoteDir, string filename, string sessionName)
|
||||
public static void RemoveProcessedFile(string remoteDir, string filename, string openCommand)
|
||||
{
|
||||
Process winscp = new Process();
|
||||
winscp.StartInfo.FileName = Properties.Settings.Default.WINSCPFullPath;
|
||||
winscp.StartInfo.Arguments = "/xmllog=\"" + Properties.Settings.Default.SFTPLog + "\"";
|
||||
winscp.StartInfo.UseShellExecute = false;
|
||||
winscp.StartInfo.RedirectStandardInput = true;
|
||||
winscp.StartInfo.RedirectStandardOutput = true;
|
||||
winscp.StartInfo.RedirectStandardError = true;
|
||||
winscp.StartInfo.CreateNoWindow = true;
|
||||
winscp.Start();
|
||||
Process winscp = StartWinSCPProcess();
|
||||
|
||||
// Feed in the scripting commands
|
||||
winscp.StandardInput.WriteLine("option batch abort");
|
||||
winscp.StandardInput.WriteLine("option confirm off");
|
||||
winscp.StandardInput.WriteLine("open " + sessionName);
|
||||
winscp.StandardInput.WriteLine(openCommand);
|
||||
|
||||
// winscp.StandardInput.WriteLine("ls");
|
||||
if (remoteDir != null)
|
||||
winscp.StandardInput.WriteLine("cd " + remoteDir);
|
||||
winscp.StandardInput.WriteLine("rm " + filename);
|
||||
if (remoteDir != null)
|
||||
{
|
||||
// move back up since winscp session remembers the last folder
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
winscp.StandardInput.WriteLine("cd ..");
|
||||
}
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Collect all output
|
||||
string output = winscp.StandardOutput.ReadToEnd();
|
||||
_log.Debug(output);
|
||||
output = winscp.StandardError.ReadToEnd();
|
||||
if (!output.Trim().IsNullOrEmpty())
|
||||
_log.Warn(output);
|
||||
winscp.StandardInput.WriteLine("rm " + filename);
|
||||
winscp.StandardInput.Close();
|
||||
|
||||
// Wait until WinSCP finishes
|
||||
winscp.WaitForExit();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,13 +3,14 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
|
||||
namespace bsmd.database
|
||||
{
|
||||
public class AGNT_Template : DatabaseEntity, IComparable
|
||||
public class AGNT_Template : DatabaseEntityAsync, IComparable
|
||||
{
|
||||
#region Construction
|
||||
|
||||
@ -153,6 +154,28 @@ namespace bsmd.database
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected override DatabaseEntityAsync ReadRowFromReader(IDataReader reader)
|
||||
{
|
||||
AGNT_Template agnt_t = null;
|
||||
if(reader != null)
|
||||
{
|
||||
agnt_t = new AGNT_Template();
|
||||
agnt_t.id = reader.GetGuid(0);
|
||||
if (!reader.IsDBNull(1)) agnt_t.AgentTitle = reader.GetString(1);
|
||||
if (!reader.IsDBNull(2)) agnt_t.AgentCompanyName = reader.GetString(2);
|
||||
if (!reader.IsDBNull(3)) agnt_t.AgentStreetAndNumber = reader.GetString(3);
|
||||
if (!reader.IsDBNull(4)) agnt_t.AgentPostalCode = reader.GetString(4);
|
||||
if (!reader.IsDBNull(5)) agnt_t.AgentCity = reader.GetString(5);
|
||||
if (!reader.IsDBNull(6)) agnt_t.AgentCountry = reader.GetString(6);
|
||||
if (!reader.IsDBNull(7)) agnt_t.AgentLastName = reader.GetString(7);
|
||||
if (!reader.IsDBNull(8)) agnt_t.AgentFirstName = reader.GetString(8);
|
||||
if (!reader.IsDBNull(9)) agnt_t.AgentPhone = reader.GetString(9);
|
||||
if (!reader.IsDBNull(10)) agnt_t.AgentFax = reader.GetString(10);
|
||||
if (!reader.IsDBNull(11)) agnt_t.AgentEMail = reader.GetString(11);
|
||||
}
|
||||
return agnt_t;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -18,11 +18,15 @@ namespace bsmd.database
|
||||
public class BRKA : DatabaseEntity, ISublistElement
|
||||
{
|
||||
|
||||
#region Construction
|
||||
|
||||
public BRKA()
|
||||
{
|
||||
this.tablename = "[dbo].[BKRA]";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
@ -124,7 +128,7 @@ namespace bsmd.database
|
||||
{
|
||||
if(this.BunkerFuelQuantity_TNE.HasValue && this.BunkerFuelQuantity_TNE > 10000)
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRA"));
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRA"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,7 +149,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((BRKA)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((BRKA)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -18,11 +18,15 @@ namespace bsmd.database
|
||||
public class BRKD : DatabaseEntity, ISublistElement
|
||||
{
|
||||
|
||||
#region Construction
|
||||
|
||||
public BRKD()
|
||||
{
|
||||
this.tablename = "[dbo].[BKRD]";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
@ -123,7 +127,7 @@ namespace bsmd.database
|
||||
{
|
||||
if (this.BunkerFuelQuantity_TNE.HasValue && this.BunkerFuelQuantity_TNE > 10000)
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRD"));
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Bunker quantity too high?", null, this.Title, this.Identifier, "BKRD"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,7 +148,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((BRKD)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((BRKD)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -17,6 +17,9 @@ namespace bsmd.database
|
||||
public class CREW : DatabaseEntity, ISublistElement, IBulkSaver
|
||||
{
|
||||
|
||||
public static DateTime CLAMPMAXDATE = new DateTime(2198, 12, 31);
|
||||
public static DateTime CLAMPMINDATE = new DateTime(1900, 1, 1);
|
||||
|
||||
public CREW()
|
||||
{
|
||||
this.tablename = "[dbo].[CREW]";
|
||||
@ -297,6 +300,9 @@ namespace bsmd.database
|
||||
{
|
||||
if (this.CrewMemberIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31)))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id doc expiry date set to 31/12/2100", null, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
if ((this.CrewMemberIdentityDocumentExpiryDate >= CLAMPMAXDATE) || (this.CrewMemberIdentityDocumentExpiryDate <= CLAMPMINDATE))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Check id doc expiry date", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
if (this.CrewMemberGender.HasValue)
|
||||
@ -305,8 +311,11 @@ namespace bsmd.database
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
if ((this.CrewMemberDateOfBirth.HasValue) && (this.CrewMemberDateOfBirth.Value > DateTime.Today))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.Tablename));
|
||||
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value > DateTime.Today))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value <= CLAMPMINDATE))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -133,7 +133,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((CallPurpose)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((CallPurpose)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -801,7 +801,7 @@ namespace bsmd.database
|
||||
if ((this._con == null) ||
|
||||
(this._con.State == ConnectionState.Closed))
|
||||
this.Connect(this.ConnectionString);
|
||||
}
|
||||
}
|
||||
|
||||
private void LogNonQueryResult(string query, int queryResult)
|
||||
{
|
||||
|
||||
@ -103,6 +103,24 @@ namespace bsmd.database
|
||||
return (await vm.LoadListAsync(reader)).ConvertAll(x => (ValueMapping)x);
|
||||
}
|
||||
|
||||
public static async Task<List<AGNT_Template>> GetAGNTTemplatesAsync()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand();
|
||||
AGNT_Template at = new AGNT_Template();
|
||||
at.PrepareLoadCommand(cmd, Message.LoadFilter.ALL);
|
||||
SqlDataReader reader = await PerformCommandAsync(cmd);
|
||||
return (await at.LoadListAsync(reader)).ConvertAll(x => (AGNT_Template)x);
|
||||
}
|
||||
|
||||
public static async Task<List<WasteDisposalServiceProvider_Template>> GetWastDisposalServiceProviderTemplatesAsync()
|
||||
{
|
||||
SqlCommand cmd = new SqlCommand();
|
||||
WasteDisposalServiceProvider_Template wdsp_t = new WasteDisposalServiceProvider_Template();
|
||||
wdsp_t.PrepareLoadCommand(cmd, Message.LoadFilter.ALL);
|
||||
SqlDataReader reader = await PerformCommandAsync(cmd);
|
||||
return (await wdsp_t.LoadListAsync(reader)).ConvertAll(x => (WasteDisposalServiceProvider_Template)x);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@ -314,7 +314,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IBCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IBCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -214,7 +214,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IGCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IGCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -627,7 +627,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IMDGPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IMDGPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -262,7 +262,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IMSBCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IMSBCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -234,4 +234,34 @@ namespace bsmd.database
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#region class PortAreaInfo
|
||||
|
||||
/// <summary>
|
||||
/// simple helper class container to map support data from sqlite lookup db
|
||||
/// </summary>
|
||||
public class PortAreaInfo
|
||||
{
|
||||
public string Locode { get; set; }
|
||||
|
||||
public string Agency { get; set; }
|
||||
|
||||
public string Ships { get; set; }
|
||||
|
||||
public string Berth { get; set; }
|
||||
|
||||
public string PortArea { get; set; }
|
||||
|
||||
public string PortAreaCode { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} ({1})", PortArea, Berth);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@ -122,7 +122,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((InfectedArea)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((InfectedArea)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ namespace bsmd.database
|
||||
{ 65, "Wechselbrücken / -behälter" },
|
||||
{ 66, "Eisenbahngüterwagen" },
|
||||
{ 67, "Reisezugwagen und Triebwagen" }
|
||||
});
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
@ -119,6 +119,8 @@ namespace bsmd.database
|
||||
|
||||
public static Dictionary<int, string> CargoHandlingDict { get; } = new Dictionary<int, string>();
|
||||
|
||||
public static List<string> MVSHLocodes { get; } = new List<string>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region DatabaseEntity implementation
|
||||
@ -212,7 +214,7 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region Validation
|
||||
#region Validation
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
@ -234,6 +236,15 @@ namespace bsmd.database
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.LOCODE, "PortOfLoading", this.PortOfLoading, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
if(LADG.MVSHLocodes.Contains(this.MessageCore.PoC))
|
||||
{
|
||||
if (this.CargoCodeNST_3.IsNullOrEmpty())
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "CargoCodeNST_3 empty", this.CargoCodeNST_3, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
if(!this.CargoLACode.HasValue)
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "CargoLACode empty", "not set", this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -242,7 +253,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((LADG)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((LADG)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -201,7 +201,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((LastTenPortFacilitiesCalled)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((LastTenPortFacilitiesCalled)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -227,7 +227,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((MARPOL_Annex_I_Position)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((MARPOL_Annex_I_Position)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -354,6 +354,9 @@ namespace bsmd.database
|
||||
{
|
||||
if(this.PassengerIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31)))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id doc expiry date set to 31/12/2100", null, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
if ((this.PassengerIdentityDocumentExpiryDate >= CREW.CLAMPMAXDATE) || (this.PassengerIdentityDocumentExpiryDate <= CREW.CLAMPMINDATE))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Check identity document expiry date", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
if(this.PassengerGender.HasValue)
|
||||
@ -362,8 +365,14 @@ namespace bsmd.database
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
if ((this.PassengerDateOfBirth.HasValue) && (this.PassengerDateOfBirth.Value > DateTime.Today))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.Tablename));
|
||||
if (this.PassengerDateOfBirth.HasValue)
|
||||
{
|
||||
if (this.PassengerDateOfBirth.Value > DateTime.Today)
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
if(this.PassengerDateOfBirth <= CREW.CLAMPMINDATE)
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -300,7 +300,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfCallLast30Days)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((PortOfCallLast30Days)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -120,7 +120,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -129,7 +129,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfItinerary)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((PortOfItinerary)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("7.12.0")]
|
||||
[assembly: AssemblyInformationalVersion("7.13.0")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2023 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("7.12.0.*")]
|
||||
[assembly: AssemblyVersion("7.13.0.*")]
|
||||
|
||||
|
||||
@ -131,7 +131,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SERV)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((SERV)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -147,7 +147,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((STO)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((STO)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -141,7 +141,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SanitaryMeasuresDetail)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((SanitaryMeasuresDetail)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -234,7 +234,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -115,7 +115,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((StowawaysJoiningLocation)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((StowawaysJoiningLocation)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -108,7 +108,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SubsidiaryRisks)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((SubsidiaryRisks)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalName { get; set; }
|
||||
@ -36,42 +36,42 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalFlag { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorCompanyName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorStreetNameAndNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorPostalCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorCity { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorCountry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorPhone { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorFax { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorEmail { get; set; }
|
||||
@ -92,7 +92,7 @@ namespace bsmd.database
|
||||
public double? TowageOnArrivalBeam_MTR { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalPurposeOfCall { get; set; }
|
||||
@ -102,7 +102,7 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public double? TowageOnArrivalDraught_DMT { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalRemarks { get; set; }
|
||||
@ -216,7 +216,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(9)) towa.TowageOnArrivalOperatorFax = reader.GetString(9);
|
||||
if (!reader.IsDBNull(10)) towa.TowageOnArrivalOperatorEmail = reader.GetString(10);
|
||||
if (!reader.IsDBNull(11)) towa.TowageOnArrivalGrossTonnage = reader.GetInt32(11);
|
||||
if (!reader.IsDBNull(12)) towa.TowageOnArrivalLengthOverall_MTR = (float) reader.GetDouble(12);
|
||||
if (!reader.IsDBNull(12)) towa.TowageOnArrivalLengthOverall_MTR = (float)reader.GetDouble(12);
|
||||
if (!reader.IsDBNull(13)) towa.TowageOnArrivalBeam_MTR = (float)reader.GetDouble(13);
|
||||
if (!reader.IsDBNull(14)) towa.TowageOnArrivalPurposeOfCall = reader.GetString(14);
|
||||
if (!reader.IsDBNull(15)) towa.TowageOnArrivalDraught_DMT = (float)reader.GetDouble(15);
|
||||
@ -271,13 +271,14 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TOWA)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((TOWA)obj).Identifier);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -254,7 +254,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TOWD)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((TOWD)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -12,11 +12,15 @@ namespace bsmd.database
|
||||
public class TreatmentFacilityProvider : DatabaseEntity, ISublistElement
|
||||
{
|
||||
|
||||
#region Construction
|
||||
|
||||
public TreatmentFacilityProvider()
|
||||
{
|
||||
this.tablename = "[dbo].[TreatmentFacilityProvider]";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
[JsonIgnore]
|
||||
@ -104,8 +108,11 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TreatmentFacilityProvider)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((TreatmentFacilityProvider)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((TreatmentFacilityProvider)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -582,5 +582,5 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -421,8 +421,11 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WAS_RCPT)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((WAS_RCPT)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((WAS_RCPT)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -279,8 +279,11 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((Waste)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((Waste)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((Waste)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +110,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WasteDisposalServiceProvider)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((WasteDisposalServiceProvider)obj).Identifier);
|
||||
}
|
||||
|
||||
108
bsmd.database/WasteDisposalServiceProvider_Template.cs
Normal file
108
bsmd.database/WasteDisposalServiceProvider_Template.cs
Normal file
@ -0,0 +1,108 @@
|
||||
// Copyright (c) 2023-present schick Informatik
|
||||
// Description: Shadow class to track predefined waste disposal providers
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace bsmd.database
|
||||
{
|
||||
public class WasteDisposalServiceProvider_Template : DatabaseEntityAsync, IComparable
|
||||
{
|
||||
|
||||
#region Construction
|
||||
|
||||
public WasteDisposalServiceProvider_Template()
|
||||
{
|
||||
this.tablename = "[dbo].[WasteDisposalServiceProvider_Template]";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
[MaxLength(99)]
|
||||
public string WasteDisposalServiceProviderName { get; set; }
|
||||
|
||||
[MaxLength(255)]
|
||||
public string Remark { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region DatabaseEntity implementation
|
||||
|
||||
public override List<DatabaseEntity> LoadList(IDataReader reader)
|
||||
{
|
||||
List<DatabaseEntity> result = new List<DatabaseEntity>();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
WasteDisposalServiceProvider_Template wdsp_t = new WasteDisposalServiceProvider_Template();
|
||||
wdsp_t.id = reader.GetGuid(0);
|
||||
if (!reader.IsDBNull(1)) wdsp_t.WasteDisposalServiceProviderName = reader.GetString(1);
|
||||
if (!reader.IsDBNull(2)) wdsp_t.Remark = reader.GetString(2);
|
||||
|
||||
result.Add(wdsp_t);
|
||||
}
|
||||
reader.Close();
|
||||
return result;
|
||||
}
|
||||
|
||||
public override void PrepareLoadCommand(IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
|
||||
{
|
||||
cmd.CommandText = string.Format("SELECT Id, WasteDisposalServiceProviderName, Remark FROM {0} ", this.Tablename);
|
||||
}
|
||||
|
||||
public override void PrepareSave(IDbCommand cmd)
|
||||
{
|
||||
SqlCommand scmd = cmd as SqlCommand;
|
||||
|
||||
if (!this.WasteDisposalServiceProviderName.IsNullOrEmpty()) scmd.Parameters.AddWithValue("@P1", this.WasteDisposalServiceProviderName);
|
||||
else scmd.Parameters.AddWithValue("@P1", DBNull.Value);
|
||||
if (!this.Remark.IsNullOrEmpty()) scmd.Parameters.AddWithValue("@P2", this.Remark);
|
||||
else scmd.Parameters.AddWithValue("@P2", DBNull.Value);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
cmd.CommandText = string.Format("INSERT INTO {0} (Id, WasteDisposalServiceProviderName, Remark) VALUES (@ID, @P1, @P2)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.CommandText = string.Format("UPDATE {0} SET WasteDisposalServiceProviderName = @P1, Remark = @P2 WHERE Id = @ID", this.Tablename);
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
}
|
||||
}
|
||||
|
||||
protected override DatabaseEntityAsync ReadRowFromReader(IDataReader reader)
|
||||
{
|
||||
WasteDisposalServiceProvider_Template wdsp_t = null;
|
||||
|
||||
if (reader != null)
|
||||
{
|
||||
wdsp_t = new WasteDisposalServiceProvider_Template();
|
||||
wdsp_t.id = reader.GetGuid(0);
|
||||
if (!reader.IsDBNull(1)) wdsp_t.WasteDisposalServiceProviderName = reader.GetString(1);
|
||||
if (!reader.IsDBNull(2)) wdsp_t.Remark = reader.GetString(2);
|
||||
}
|
||||
|
||||
return wdsp_t;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable implementation
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is WasteDisposalServiceProvider_Template template)
|
||||
this.Remark?.CompareTo(template.Remark ?? "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@ -146,8 +146,11 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WasteReceived)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((WasteReceived)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((WasteReceived)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -187,6 +187,7 @@
|
||||
<Compile Include="WAS.cs" />
|
||||
<Compile Include="Waste.cs" />
|
||||
<Compile Include="WasteDisposalServiceProvider.cs" />
|
||||
<Compile Include="WasteDisposalServiceProvider_Template.cs" />
|
||||
<Compile Include="WasteReceived.cs" />
|
||||
<Compile Include="WAS_RCPT.cs" />
|
||||
<Compile Include="XtraSendLogic.cs" />
|
||||
|
||||
@ -6,7 +6,7 @@ using System;
|
||||
using System.IO;
|
||||
|
||||
using bsmd.database;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace bsmd.dbh
|
||||
{
|
||||
@ -117,7 +117,7 @@ namespace bsmd.dbh
|
||||
public static void SendAndReceive()
|
||||
{
|
||||
// sent unsent messages in output folder
|
||||
bsmd.dakosy.SFtp.TransmitAll(Properties.Settings.Default.RemoteIncomingFolder, Properties.Settings.Default.OutgoingFolder, dakosy.SFtp.Direction.OUTGOING, Properties.Settings.Default.SFTPSessionName);
|
||||
bsmd.dakosy.SFtp.TransmitAll(Properties.Settings.Default.RemoteIncomingFolder, Properties.Settings.Default.OutgoingFolder, dakosy.SFtp.Direction.OUTGOING, Properties.Settings.Default.SFTPOpenCommand);
|
||||
// move files from output folder to archive folder
|
||||
foreach(string sentFile in Directory.GetFiles(Properties.Settings.Default.OutgoingFolder))
|
||||
{
|
||||
@ -130,7 +130,7 @@ namespace bsmd.dbh
|
||||
|
||||
// receive files from remote host
|
||||
// SFTP verbindung öffnen und alle Dateien herunterladen
|
||||
bsmd.dakosy.SFtp.TransmitAll(Properties.Settings.Default.RemoteOutgoingFolder, Properties.Settings.Default.IncomingFolder, dakosy.SFtp.Direction.INCOMING, Properties.Settings.Default.SFTPSessionName);
|
||||
bsmd.dakosy.SFtp.TransmitAll(Properties.Settings.Default.RemoteOutgoingFolder, Properties.Settings.Default.IncomingFolder, dakosy.SFtp.Direction.INCOMING, Properties.Settings.Default.SFTPOpenCommand);
|
||||
|
||||
foreach (string inputFile in Directory.GetFiles(Properties.Settings.Default.IncomingFolder))
|
||||
{
|
||||
@ -151,7 +151,7 @@ namespace bsmd.dbh
|
||||
File.Delete(inputFile);
|
||||
}
|
||||
// remote Dateien löschen
|
||||
bsmd.dakosy.SFtp.RemoveProcessedFile(Properties.Settings.Default.RemoteOutgoingFolder, Path.GetFileName(inputFile), Properties.Settings.Default.SFTPSessionName);
|
||||
bsmd.dakosy.SFtp.RemoveProcessedFile(Properties.Settings.Default.RemoteOutgoingFolder, Path.GetFileName(inputFile), Properties.Settings.Default.SFTPOpenCommand);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
8
bsmd.dbh/Properties/Settings.Designer.cs
generated
8
bsmd.dbh/Properties/Settings.Designer.cs
generated
@ -89,15 +89,17 @@ namespace bsmd.dbh.Properties {
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("dbh")]
|
||||
public string SFTPSessionName {
|
||||
public string SFTPOpenCommand {
|
||||
get {
|
||||
return ((string)(this["SFTPSessionName"]));
|
||||
return ((string)(this["SFTPOpenCommand"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("sftp://f-000333@fx.dbh.de/ -hostkey=\"ecdsa-sha2-nistp256 256 453JBU8hAOOQ7wEvmTw5" +
|
||||
"fXsUyZsVCSufyATbGKLh+ak\" -privatekey=\"C:\\work\\Services\\SendNSWMessageService\\dbh" +
|
||||
"\\sshkeynp.ppk\"")]
|
||||
public string IncomingErrorFolder {
|
||||
get {
|
||||
return ((string)(this["IncomingErrorFolder"]));
|
||||
|
||||
@ -23,11 +23,11 @@
|
||||
<Setting Name="RemoteOutgoingFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">test/dbh_2_bsmd</Value>
|
||||
</Setting>
|
||||
<Setting Name="SFTPSessionName" Type="System.String" Scope="Application">
|
||||
<Setting Name="SFTPOpenCommand" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">dbh</Value>
|
||||
</Setting>
|
||||
<Setting Name="IncomingErrorFolder" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)" />
|
||||
<Value Profile="(Default)">sftp://f-000333@fx.dbh.de/ -hostkey="ecdsa-sha2-nistp256 256 453JBU8hAOOQ7wEvmTw5fXsUyZsVCSufyATbGKLh+ak" -privatekey="C:\work\Services\SendNSWMessageService\dbh\sshkeynp.ppk"</Value>
|
||||
</Setting>
|
||||
<Setting Name="SenderMaersk" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">00006017</Value>
|
||||
|
||||
@ -778,7 +778,7 @@ namespace bsmd.dbh
|
||||
rootPre.TankerDetails.ConditionCargoBallastTanks = (TankCondition)pre72h.ConditionCargoBallastTanks.Value;
|
||||
if (pre72h.NatureOfCargo != string.Empty)
|
||||
rootPre.TankerDetails.TypeOfCargo = pre72h.NatureOfCargo;
|
||||
bool sendVolume = pre72h.VolumeOfCargo.HasValue && (pre72h.VolumeOfCargo.Value > 0);
|
||||
bool sendVolume = pre72h.VolumeOfCargo > 0;
|
||||
rootPre.TankerDetails.VolumeOfCargo_TNESpecified = sendVolume;
|
||||
if (sendVolume)
|
||||
rootPre.TankerDetails.VolumeOfCargo_TNE = Decimal.Round((decimal)(pre72h.VolumeOfCargo.Value), 3);
|
||||
|
||||
@ -129,7 +129,7 @@ namespace bsmd.dbh
|
||||
case Response.RootType.RESET:
|
||||
if(root.ReportingClassesResetted?.ReportingClass.Length > 0)
|
||||
{
|
||||
_log.InfoFormat("Message {0} RESET confirmed, {1} messages", sentMessage.MessageNotificationClassDisplay, root.Messages.Length); ;
|
||||
_log.InfoFormat("Message {0} RESET confirmed, {1} messages", sentMessage.MessageNotificationClassDisplay, root.Messages?.Length);
|
||||
sentMessage.SendSuccess = false; // bestätigter Reset setzt grünen Buppel zurück
|
||||
sentMessage.Status = Message.MessageStatus.ACCEPTED;
|
||||
sentMessage.InternalStatus = Message.BSMDStatus.CONFIRMED;
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
<setting name="RemoteOutgoingFolder" serializeAs="String">
|
||||
<value>test/dbh_2_bsmd</value>
|
||||
</setting>
|
||||
<setting name="SFTPSessionName" serializeAs="String">
|
||||
<setting name="SFTPOpenCommand" serializeAs="String">
|
||||
<value>dbh</value>
|
||||
</setting>
|
||||
<setting name="IncomingErrorFolder" serializeAs="String">
|
||||
<value />
|
||||
<value>sftp://f-000333@fx.dbh.de/ -hostkey="ecdsa-sha2-nistp256 256 453JBU8hAOOQ7wEvmTw5fXsUyZsVCSufyATbGKLh+ak" -privatekey="C:\work\Services\SendNSWMessageService\dbh\sshkeynp.ppk"</value>
|
||||
</setting>
|
||||
<setting name="SenderMaersk" serializeAs="String">
|
||||
<value>00006017</value>
|
||||
|
||||
157
misc/SendNSWMessageService.exe.config
Normal file
157
misc/SendNSWMessageService.exe.config
Normal file
@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SendNSWMessageService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="bsmd.dakosy.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="bsmd.dbh.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="bsmd.hisnord.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="bsmd.status.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<log4net>
|
||||
<root>
|
||||
<level value="INFO" />
|
||||
<appender-ref ref="LogFileAppender" />
|
||||
</root>
|
||||
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender" >
|
||||
<param name="File" value="C:\\work\\Logs\\log-NSWMessageServiceTest.txt" />
|
||||
<param name="AppendToFile" value="true" />
|
||||
<rollingStyle value="Size" />
|
||||
<maxSizeRollBackups value="10" />
|
||||
<maximumFileSize value="2MB" />
|
||||
<staticLogFileName value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<param name="ConversionPattern" value="%date [%thread] %-5level [%logger] - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
</log4net>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<applicationSettings>
|
||||
<bsmd.status.Properties.Settings>
|
||||
<setting name="login" serializeAs="String">
|
||||
<value>BSMD-PROD</value>
|
||||
</setting>
|
||||
<setting name="password" serializeAs="String">
|
||||
<value>t7g7fDP18#7GQw#D</value>
|
||||
</setting>
|
||||
<setting name="url" serializeAs="String">
|
||||
<value>https://www.his-nord.de/HIS-Service/StatusInfoNSW.jsp</value>
|
||||
</setting>
|
||||
</bsmd.status.Properties.Settings>
|
||||
<SendNSWMessageService.Properties.Settings>
|
||||
<setting name="ConnectionString" serializeAs="String">
|
||||
<value>Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</value>
|
||||
</setting>
|
||||
<setting name="SleepSeconds" serializeAs="String">
|
||||
<value>30</value>
|
||||
</setting>
|
||||
</SendNSWMessageService.Properties.Settings>
|
||||
<bsmd.dakosy.Properties.Settings>
|
||||
<setting name="SFTPSessionName" serializeAs="String">
|
||||
<value>dakosy</value>
|
||||
</setting>
|
||||
<setting name="SFTPLog" serializeAs="String">
|
||||
<value>c:\temp\sftp_log.xml</value>
|
||||
</setting>
|
||||
<setting name="SFTPOutDir" serializeAs="String">
|
||||
<value>c:\work\dakosy\out</value>
|
||||
</setting>
|
||||
<setting name="SFTPInDir" serializeAs="String">
|
||||
<value>c:\work\dakosy\in</value>
|
||||
</setting>
|
||||
<setting name="TestMode" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="WINSCPFullPath" serializeAs="String">
|
||||
<value>c:\work\Tools\WinSCP\WinSCP.com</value>
|
||||
</setting>
|
||||
<setting name="RemoteProdIncomingDir" serializeAs="String">
|
||||
<value>in/prod/ed02</value>
|
||||
</setting>
|
||||
<setting name="RemoteTestIncomingDir" serializeAs="String">
|
||||
<value>in/test/ed02</value>
|
||||
</setting>
|
||||
<setting name="RemoteProdOutgoingDir" serializeAs="String">
|
||||
<value>out/prod</value>
|
||||
</setting>
|
||||
<setting name="RemoteTestOutgoingDir" serializeAs="String">
|
||||
<value>out/test</value>
|
||||
</setting>
|
||||
</bsmd.dakosy.Properties.Settings>
|
||||
<bsmd.dbh.Properties.Settings>
|
||||
<setting name="bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws" serializeAs="String">
|
||||
<value>https://edi-gate.dbh.de/bsmd-soap</value>
|
||||
</setting>
|
||||
<setting name="Sender" serializeAs="String">
|
||||
<value>00003050</value>
|
||||
<!-- Maersk produktiv value>00000768</value-->
|
||||
<!-- BSMD-PROD value>00003050</value-->
|
||||
</setting>
|
||||
<setting name="SenderMaersk" serializeAs="String">
|
||||
<value>00006017</value>
|
||||
</setting>
|
||||
<setting name="OutgoingFolder" serializeAs="String">
|
||||
<value>C:\temp\dbh\out</value>
|
||||
</setting>
|
||||
<setting name="OutgoingArchiveFolder" serializeAs="String">
|
||||
<value>C:\temp\dbh\out_archive</value>
|
||||
</setting>
|
||||
<setting name="IncomingFolder" serializeAs="String">
|
||||
<value>C:\temp\dbh\in</value>
|
||||
</setting>
|
||||
<setting name="IncomingArchiveFolder" serializeAs="String">
|
||||
<value>C:\temp\dbh\in_archive</value>
|
||||
</setting>
|
||||
<setting name="IncomingErrorFolder" serializeAs="String">
|
||||
<value>C:\temp\dbh\in_error</value>
|
||||
</setting>
|
||||
<setting name="RemoteIncomingFolder" serializeAs="String">
|
||||
<value>test/bsmd_2_dbh</value>
|
||||
</setting>
|
||||
<setting name="RemoteOutgoingFolder" serializeAs="String">
|
||||
<value>test/dbh_2_bsmd</value>
|
||||
</setting>
|
||||
<setting name="SFTPOpenCommand" serializeAs="String">
|
||||
<value>open sftp://f-000333@fx.dbh.de/ -hostkey="ecdsa-sha2-nistp256 256 453JBU8hAOOQ7wEvmTw5fXsUyZsVCSufyATbGKLh+ak" -privatekey="C:\git_lager\git_bsmd\bsmd.dbh\misc\sshkeynp.ppk"</value>
|
||||
</setting>
|
||||
</bsmd.dbh.Properties.Settings>
|
||||
<bsmd.hisnord.Properties.Settings>
|
||||
<setting name="TransmitterRoot" serializeAs="String">
|
||||
<value>C:\work\HIS-NORD\Test</value>
|
||||
</setting>
|
||||
<setting name="OutputDir" serializeAs="String">
|
||||
<value>IMP</value>
|
||||
</setting>
|
||||
<setting name="Transmitter" serializeAs="String">
|
||||
<value>client.bat</value>
|
||||
</setting>
|
||||
<setting name="BatchTimeoutMins" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="ResultDir" serializeAs="String">
|
||||
<value>RESULTS</value>
|
||||
</setting>
|
||||
<setting name="AnswerDir" serializeAs="String">
|
||||
<value>ANSWERS</value>
|
||||
</setting>
|
||||
<setting name="AnswerArchiveDir" serializeAs="String">
|
||||
<value>ANSWERS_DONE</value>
|
||||
</setting>
|
||||
<setting name="AnswerCorruptDir" serializeAs="String">
|
||||
<value>ANSWERS_CORRUPT</value>
|
||||
</setting>
|
||||
</bsmd.hisnord.Properties.Settings>
|
||||
</applicationSettings>
|
||||
<system.web>
|
||||
<webServices>
|
||||
<!-- zum debuggen -->
|
||||
<soapExtensionTypes>
|
||||
<add type="bsmd.database.SoapLoggerExtension, bsmd.database" priority="1" group="0" />
|
||||
</soapExtensionTypes>
|
||||
</webServices>
|
||||
</system.web>
|
||||
</configuration>
|
||||
BIN
misc/db.sqlite
BIN
misc/db.sqlite
Binary file not shown.
Loading…
Reference in New Issue
Block a user