Sehr lange Korrekturliste bearbeitet, Uploaddetails gefixt usw.
This commit is contained in:
parent
a9594e7702
commit
7c64d66ac5
@ -7,6 +7,9 @@ using System.Windows;
|
||||
using bsmd.database;
|
||||
using ENI2.EditControls;
|
||||
using ENI2.Util;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System;
|
||||
|
||||
namespace ENI2.DetailViewControls
|
||||
{
|
||||
@ -18,6 +21,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private Message _hazMessage;
|
||||
private HAZ haz;
|
||||
private HAZ hazd; // referenz auf HAZD, falls das hier HAZA ist und wir Positionen kopieren wollen
|
||||
|
||||
public DangerousGoodsDetailControl()
|
||||
{
|
||||
@ -30,8 +34,8 @@ namespace ENI2.DetailViewControls
|
||||
this.RegisterCheckboxChange(this.checkBoxDangerousGoodsOnBoard, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
|
||||
this.RegisterCheckboxChange(this.checkBoxDGManifestOnBoard, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
|
||||
this.RegisterCheckboxChange(this.checkBoxMoUBaltic, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
|
||||
this.RegisterComboboxIndexChange(this.comboBoxVesselClass, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
|
||||
}
|
||||
this.RegisterComboboxIndexChange(this.comboBoxVesselClass, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
|
||||
}
|
||||
|
||||
public bool IsDeparture { get; set; }
|
||||
|
||||
@ -47,7 +51,28 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.HAZA) { this._hazMessage = aMessage; this.ControlMessages.Add(aMessage); }
|
||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.HAZA)
|
||||
{
|
||||
this._hazMessage = aMessage;
|
||||
this.ControlMessages.Add(aMessage);
|
||||
}
|
||||
if (aMessage.MessageNotificationClass == Message.NotificationClass.HAZD)
|
||||
{
|
||||
if(aMessage != null)
|
||||
{
|
||||
if (aMessage.Elements.Count > 0)
|
||||
this.hazd = aMessage.Elements[0] as HAZ;
|
||||
if (this.hazd == null)
|
||||
{
|
||||
this.hazd = new HAZ();
|
||||
this.hazd.MessageCore = this.Core;
|
||||
this.hazd.MessageHeader = aMessage;
|
||||
aMessage.Elements.Add(this.hazd);
|
||||
SublistElementChanged(Message.NotificationClass.HAZD);
|
||||
}
|
||||
this.ControlMessages.Add(aMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,8 +138,151 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
if (!this.haz.IsDeparture)
|
||||
{
|
||||
#region Extra Menüpunkte um Positionen nach HAZD zu kopieren
|
||||
|
||||
this.dataGridIBCItems.ContextMenu.Items.Add(new Separator());
|
||||
MenuItem copyIBCItem = new MenuItem();
|
||||
copyIBCItem.Header = Properties.Resources.textCopyToHAZD;
|
||||
copyIBCItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||
copyIBCItem.Click += new RoutedEventHandler(this.copyIBC);
|
||||
this.dataGridIBCItems.ContextMenu.Items.Add(copyIBCItem);
|
||||
|
||||
this.dataGridIGCItems.ContextMenu.Items.Add(new Separator());
|
||||
MenuItem copyItemIGC = new MenuItem();
|
||||
copyItemIGC.Header = Properties.Resources.textCopyToHAZD;
|
||||
copyItemIGC.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||
copyItemIGC.Click += new RoutedEventHandler(this.copyIGC);
|
||||
this.dataGridIGCItems.ContextMenu.Items.Add(copyItemIGC);
|
||||
|
||||
this.dataGridIMDGItems.ContextMenu.Items.Add(new Separator());
|
||||
MenuItem copyItemIMDG = new MenuItem();
|
||||
copyItemIMDG.Header = Properties.Resources.textCopyToHAZD;
|
||||
copyItemIMDG.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||
copyItemIMDG.Click += new RoutedEventHandler(this.copyIMDG);
|
||||
this.dataGridIMDGItems.ContextMenu.Items.Add(copyItemIMDG);
|
||||
|
||||
this.dataGridIMSBCItems.ContextMenu.Items.Add(new Separator());
|
||||
MenuItem copyItemIMSBC = new MenuItem();
|
||||
copyItemIMSBC.Header = Properties.Resources.textCopyToHAZD;
|
||||
copyItemIMSBC.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||
copyItemIMSBC.Click += new RoutedEventHandler(this.copyIMSBC);
|
||||
this.dataGridIMSBCItems.ContextMenu.Items.Add(copyItemIMSBC);
|
||||
|
||||
this.dataGridMARPOLItems.ContextMenu.Items.Add(new Separator());
|
||||
MenuItem copyItemMARPOL = new MenuItem();
|
||||
copyItemMARPOL.Header = Properties.Resources.textCopyToHAZD;
|
||||
copyItemMARPOL.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||
copyItemMARPOL.Click += new RoutedEventHandler(this.copyMARPOL);
|
||||
this.dataGridMARPOLItems.ContextMenu.Items.Add(copyItemMARPOL);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
this._initialized = true;
|
||||
}
|
||||
|
||||
#region Copy event handler
|
||||
|
||||
private void copyMARPOL(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// aus dem aktuell selektierten MARPOL Element ein neues MARPOL Element machen und nach HAZD kopieren
|
||||
if ((this.dataGridMARPOLItems.SelectedItems != null) && (this.dataGridMARPOLItems.SelectedItems.Count == 1))
|
||||
{
|
||||
MARPOL_Annex_I_Position selectedMARPOL = this.dataGridMARPOLItems.SelectedItems[0] as MARPOL_Annex_I_Position;
|
||||
if (selectedMARPOL != null)
|
||||
{
|
||||
MARPOL_Annex_I_Position copyMARPOL = new MARPOL_Annex_I_Position();
|
||||
copyMARPOL.MessageHeader = this.hazd.MessageHeader;
|
||||
copyMARPOL.HAZ = this.hazd;
|
||||
copyMARPOL.CopyFromMARPOL(selectedMARPOL);
|
||||
copyMARPOL.Identifier = DatabaseEntity.GetNewIdentifier(this.hazd.MARPOLPositions);
|
||||
this.hazd.MARPOLPositions.Add(copyMARPOL);
|
||||
this.SublistElementChanged(Message.NotificationClass.HAZD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void copyIMSBC(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// aus dem aktuell selektierten IMBSC Element ein neues IMBSC Element machen und nach HAZD kopieren
|
||||
if ((this.dataGridIMSBCItems.SelectedItems != null) && (this.dataGridIMSBCItems.SelectedItems.Count == 1))
|
||||
{
|
||||
IMSBCPosition selectedIMSBC = this.dataGridIMSBCItems.SelectedItems[0] as IMSBCPosition;
|
||||
if (selectedIMSBC != null)
|
||||
{
|
||||
IMSBCPosition copyIMSBC = new IMSBCPosition();
|
||||
copyIMSBC.MessageHeader = this.hazd.MessageHeader;
|
||||
copyIMSBC.HAZ = this.hazd;
|
||||
copyIMSBC.CopyFromIMSBC(selectedIMSBC);
|
||||
copyIMSBC.Identifier = DatabaseEntity.GetNewIdentifier(this.hazd.IMSBCPositions);
|
||||
this.hazd.IMSBCPositions.Add(copyIMSBC);
|
||||
this.SublistElementChanged(Message.NotificationClass.HAZD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void copyIMDG(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// aus dem aktuell selektierten IMDG Element ein neues IMDG Element machen und nach HAZD kopieren
|
||||
if ((this.dataGridIMDGItems.SelectedItems != null) && (this.dataGridIMDGItems.SelectedItems.Count == 1))
|
||||
{
|
||||
IMDGPosition selectedIMDG = this.dataGridIMDGItems.SelectedItems[0] as IMDGPosition;
|
||||
if (selectedIMDG != null)
|
||||
{
|
||||
IMDGPosition copyIMDG = new IMDGPosition();
|
||||
copyIMDG.MessageHeader = this.hazd.MessageHeader;
|
||||
copyIMDG.HAZ = this.hazd;
|
||||
copyIMDG.CopyFromIMDG(selectedIMDG);
|
||||
copyIMDG.Identifier = DatabaseEntity.GetNewIdentifier(this.hazd.IMDGPositions);
|
||||
this.hazd.IMDGPositions.Add(copyIMDG);
|
||||
this.SublistElementChanged(Message.NotificationClass.HAZD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void copyIGC(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// aus dem aktuell selektierten IGC Element ein neues IGC Element machen und nach HAZD kopieren
|
||||
if ((this.dataGridIGCItems.SelectedItems != null) && (this.dataGridIGCItems.SelectedItems.Count == 1))
|
||||
{
|
||||
IGCPosition selectedIGC = this.dataGridIGCItems.SelectedItems[0] as IGCPosition;
|
||||
if (selectedIGC != null)
|
||||
{
|
||||
IGCPosition copyIGC = new IGCPosition();
|
||||
copyIGC.MessageHeader = this.hazd.MessageHeader;
|
||||
copyIGC.HAZ = this.hazd;
|
||||
copyIGC.CopyFromIGC(selectedIGC);
|
||||
copyIGC.Identifier = DatabaseEntity.GetNewIdentifier(this.hazd.IGCPositions);
|
||||
this.hazd.IGCPositions.Add(copyIGC);
|
||||
this.SublistElementChanged(Message.NotificationClass.HAZD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void copyIBC(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// aus dem aktuell selektierten IBC Element ein neues IBC Element machen und nach HAZD kopieren
|
||||
if ((this.dataGridIBCItems.SelectedItems != null) && (this.dataGridIBCItems.SelectedItems.Count == 1))
|
||||
{
|
||||
IBCPosition selectedIBC = this.dataGridIBCItems.SelectedItems[0] as IBCPosition;
|
||||
if (selectedIBC != null)
|
||||
{
|
||||
IBCPosition copyIBC = new IBCPosition();
|
||||
copyIBC.MessageHeader = this.hazd.MessageHeader;
|
||||
copyIBC.HAZ = this.hazd;
|
||||
copyIBC.CopyFromIBC(selectedIBC);
|
||||
copyIBC.Identifier = DatabaseEntity.GetNewIdentifier(this.hazd.IBCPositions);
|
||||
this.hazd.IBCPositions.Add(copyIBC);
|
||||
this.SublistElementChanged(Message.NotificationClass.HAZD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MARPOL datagrid handlers
|
||||
|
||||
private void DataGridMARPOLItems_DeleteRequested(DatabaseEntity obj)
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textInfectedAreaPort}" Binding="{Binding InfectedAreaPort, Mode=TwoWay}" IsReadOnly="True" Width="0.5*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textInfectedAreaPort}" Binding="{Binding InfectedAreaDate, Mode=TwoWay}" IsReadOnly="True" Width="0.5*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textInfectedAreaPort}" Binding="{Binding InfectedAreaDate, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.5*" />
|
||||
</DataGrid.Columns>
|
||||
</enictrl:ENIDataGrid>
|
||||
</Grid>
|
||||
@ -146,7 +146,7 @@
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasureKind}" Binding="{Binding SanitaryMeasuresType, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasurePlace}" Binding="{Binding SanitaryMeasuresLocation, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasureDate}" Binding="{Binding SanitaryMeasuresDate, Mode=TwoWay}" IsReadOnly="True" Width="0.3*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textSanitaryMeasureDate}" Binding="{Binding SanitaryMeasuresDate, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.3*" />
|
||||
</DataGrid.Columns>
|
||||
</enictrl:ENIDataGrid>
|
||||
</Grid>
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<Label Content="{x:Static p:Resources.textTankerNatureOfCargo}" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||
<TextBox Text="{Binding NatureOfCargo, Mode=TwoWay}" Name="textBoxNatureOfCargo" Grid.Column="1" Grid.Row="3" Margin="2,2,2,2" IsEnabled="{Binding ElementName=checkBoxTanker, Path=IsChecked}"/>
|
||||
<Label Content="{x:Static p:Resources.textTankerVolumeOfCargo}" Grid.Column="0" Grid.Row="4" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownVolumeOfCargo" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N1" Value="{Binding VolumeOfCargo, Mode=TwoWay}" IsEnabled="{Binding ElementName=checkBoxTanker, Path=IsChecked}"/>
|
||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownVolumeOfCargo" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N3" Value="{Binding VolumeOfCargo, Mode=TwoWay}" IsEnabled="{Binding ElementName=checkBoxTanker, Path=IsChecked}"/>
|
||||
<Label Content="{x:Static p:Resources.textPlannedOperations}" Grid.Column="0" Grid.Row="5" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||
<TextBox Text="{Binding PlannedOperations, Mode=TwoWay}" Name="textBoxPlannedOperations" Grid.Column="1" Grid.Row="5" Margin="2,2,2,2" />
|
||||
<Label Content="{x:Static p:Resources.textPlannedInspection}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
@ -100,7 +100,8 @@ namespace ENI2.DetailViewControls
|
||||
this.dateTimePicker_ETDFromKielCanal.DataContext = _noa_nod;
|
||||
this.dateTimePicker_ETDFromLastPort.DataContext = _noa_nod;
|
||||
this.dateTimePicker_ETDFromPortOfCall.DataContext = _noa_nod;
|
||||
|
||||
|
||||
this.checkBox_IsAnchored.IsEnabled = this.Core.IsDK;
|
||||
}
|
||||
|
||||
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
|
||||
|
||||
@ -152,14 +152,25 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
|
||||
private void DataGridLADG_CreateRequested()
|
||||
{
|
||||
LADG ladg = new LADG();
|
||||
{
|
||||
EditLADGDialog eld = new EditLADGDialog();
|
||||
eld.LADG = ladg;
|
||||
eld.LADG = new LADG();
|
||||
eld.Core = this.Core;
|
||||
|
||||
eld.AddClicked += () =>
|
||||
{
|
||||
eld.CopyValuesToEntity();
|
||||
this._ladgMessage.Elements.Add(eld.LADG);
|
||||
eld.LADG.MessageHeader = _ladgMessage;
|
||||
this.dataGridLADG.Items.Refresh();
|
||||
eld.LADG = new LADG();
|
||||
this.SublistElementChanged(Message.NotificationClass.LADG);
|
||||
};
|
||||
|
||||
if (eld.ShowDialog() ?? false)
|
||||
{
|
||||
ladg.MessageHeader = _ladgMessage;
|
||||
_ladgMessage.Elements.Add(ladg);
|
||||
eld.LADG.MessageHeader = _ladgMessage;
|
||||
_ladgMessage.Elements.Add(eld.LADG);
|
||||
this.dataGridLADG.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.LADG);
|
||||
}
|
||||
@ -183,10 +194,23 @@ namespace ENI2.DetailViewControls
|
||||
if(ladg != null)
|
||||
{
|
||||
EditLADGDialog eld = new EditLADGDialog();
|
||||
eld.Core = this.Core;
|
||||
eld.LADG = ladg;
|
||||
|
||||
eld.AddClicked += () =>
|
||||
{
|
||||
eld.CopyValuesToEntity();
|
||||
eld.LADG = new LADG();
|
||||
_ladgMessage.Elements.Add(eld.LADG);
|
||||
eld.LADG.MessageHeader = _ladgMessage;
|
||||
this.SublistElementChanged(Message.NotificationClass.LADG);
|
||||
};
|
||||
|
||||
if (eld.ShowDialog() ?? false)
|
||||
{
|
||||
this.dataGridLADG.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.LADG);
|
||||
this.SublistElementChanged(Message.NotificationClass.LADG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,14 +220,24 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
|
||||
private void DataGridSERV_CreateRequested()
|
||||
{
|
||||
SERV serv = new SERV();
|
||||
{
|
||||
EditSERVDialog esd = new EditSERVDialog();
|
||||
esd.SERV = serv;
|
||||
esd.SERV = new SERV();
|
||||
|
||||
esd.AddClicked += () =>
|
||||
{
|
||||
esd.CopyValuesToEntity();
|
||||
_servMessage.Elements.Add(esd.SERV);
|
||||
esd.SERV.MessageHeader = _servMessage;
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
esd.SERV = new SERV();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
};
|
||||
|
||||
if(esd.ShowDialog() ?? false)
|
||||
{
|
||||
serv.MessageHeader = _servMessage;
|
||||
_servMessage.Elements.Add(serv);
|
||||
esd.SERV.MessageHeader = _servMessage;
|
||||
_servMessage.Elements.Add(esd.SERV);
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
}
|
||||
@ -228,6 +262,16 @@ namespace ENI2.DetailViewControls
|
||||
{
|
||||
EditSERVDialog esd = new EditSERVDialog();
|
||||
esd.SERV = serv;
|
||||
|
||||
esd.AddClicked += () =>
|
||||
{
|
||||
esd.CopyValuesToEntity();
|
||||
esd.SERV = new SERV();
|
||||
_servMessage.Elements.Add(esd.SERV);
|
||||
esd.SERV.MessageHeader = _servMessage;
|
||||
this.SublistElementChanged(Message.NotificationClass.SERV);
|
||||
};
|
||||
|
||||
if (esd.ShowDialog() ?? false)
|
||||
{
|
||||
this.dataGridSERV.Items.Refresh();
|
||||
|
||||
@ -7,6 +7,9 @@ using System.Windows;
|
||||
using bsmd.database;
|
||||
using ENI2.EditControls;
|
||||
using ENI2.Util;
|
||||
using System.Windows.Controls;
|
||||
using System;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace ENI2.DetailViewControls
|
||||
{
|
||||
@ -27,7 +30,30 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void TowageDetailControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.dataGridTowageOnArrival.ContextMenu.Items.Add(new Separator());
|
||||
MenuItem copyItem = new MenuItem();
|
||||
copyItem.Header = Properties.Resources.textCopyTOWATOWD;
|
||||
copyItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||
copyItem.Click += new RoutedEventHandler(this.copyItem);
|
||||
this.dataGridTowageOnArrival.ContextMenu.Items.Add(copyItem);
|
||||
}
|
||||
|
||||
private void copyItem(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// aus dem aktuell selektierten TOWA Element ein neues TOWD Element machen
|
||||
if ((this.dataGridTowageOnArrival.SelectedItems != null) && (this.dataGridTowageOnArrival.SelectedItems.Count == 1))
|
||||
{
|
||||
TOWA selectedTOWA = this.dataGridTowageOnArrival.SelectedItems[0] as TOWA;
|
||||
if (selectedTOWA != null)
|
||||
{
|
||||
TOWD copyTOWD = new TOWD();
|
||||
copyTOWD.MessageHeader = _towdMessage;
|
||||
copyTOWD.CopyFromTOWA(selectedTOWA);
|
||||
this._towdMessage.Elements.Add(copyTOWD);
|
||||
this.dataGridTowageOnDeparture.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
@ -95,8 +121,9 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
if (ebd.ShowDialog() ?? false)
|
||||
{
|
||||
towd.MessageHeader = _towdMessage;
|
||||
_towdMessage.Elements.Add(towd);
|
||||
ebd.CopyValuesToEntity();
|
||||
ebd.TOWD.MessageHeader = _towdMessage;
|
||||
_towdMessage.Elements.Add(ebd.TOWD);
|
||||
this.dataGridTowageOnDeparture.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWD);
|
||||
}
|
||||
@ -125,16 +152,16 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
eld.AddClicked += () =>
|
||||
{
|
||||
eld.CopyValuesToEntity();
|
||||
_towdMessage.Elements.Add(eld.TOWD);
|
||||
this.dataGridTowageOnDeparture.Items.Refresh();
|
||||
eld.CopyValuesToEntity();
|
||||
eld.TOWD = new TOWD();
|
||||
_towdMessage.Elements.Add(eld.TOWD);
|
||||
eld.TOWD.MessageHeader = _towdMessage;
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWD);
|
||||
};
|
||||
|
||||
if (eld.ShowDialog() ?? false)
|
||||
{
|
||||
eld.CopyValuesToEntity();
|
||||
this.dataGridTowageOnDeparture.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWD);
|
||||
}
|
||||
@ -162,13 +189,14 @@ namespace ENI2.DetailViewControls
|
||||
ebd.TOWA.MessageHeader = _towaMessage;
|
||||
this.dataGridTowageOnArrival.Items.Refresh();
|
||||
ebd.TOWA = new TOWA();
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWA);
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWA);
|
||||
};
|
||||
|
||||
if (ebd.ShowDialog() ?? false)
|
||||
{
|
||||
towa.MessageHeader = _towaMessage;
|
||||
_towaMessage.Elements.Add(towa);
|
||||
ebd.CopyValuesToEntity();
|
||||
ebd.TOWA.MessageHeader = _towaMessage;
|
||||
_towaMessage.Elements.Add(ebd.TOWA);
|
||||
this.dataGridTowageOnArrival.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWA);
|
||||
}
|
||||
@ -197,16 +225,16 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
eld.AddClicked += () =>
|
||||
{
|
||||
eld.CopyValuesToEntity();
|
||||
_towaMessage.Elements.Add(eld.TOWA);
|
||||
this.dataGridTowageOnArrival.Items.Refresh();
|
||||
eld.CopyValuesToEntity();
|
||||
eld.TOWA = new TOWA();
|
||||
_towaMessage.Elements.Add(eld.TOWA);
|
||||
eld.TOWA.MessageHeader = _towaMessage;
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWA);
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWA);
|
||||
};
|
||||
|
||||
if (eld.ShowDialog() ?? false)
|
||||
{
|
||||
eld.CopyValuesToEntity();
|
||||
this.dataGridTowageOnArrival.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.TOWA);
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposalAmount_MTQ, StringFormat={}{0:N2}}" />
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposalAmount_MTQ, StringFormat={}{0:N3}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
@ -71,7 +71,7 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteCapacity_MTQ, StringFormat={}{0:N2}}" />
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteCapacity_MTQ, StringFormat={}{0:N3}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
@ -83,7 +83,7 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteAmountRetained_MTQ, StringFormat={}{0:N2}}" />
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteAmountRetained_MTQ, StringFormat={}{0:N3}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
@ -107,7 +107,7 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposedAtLastPort_MTQ, StringFormat={}{0:N2}}" />
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteDisposedAtLastPort_MTQ, StringFormat={}{0:N3}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
@ -119,7 +119,7 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteAmountGeneratedTillNextPort_MTQ, StringFormat={}{0:N2}}" />
|
||||
<TextBlock TextAlignment="Center" Text="{Binding WasteAmountGeneratedTillNextPort_MTQ, StringFormat={}{0:N3}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
@ -41,6 +41,19 @@ namespace ENI2.DetailViewControls
|
||||
this.RegisterDatePickerChange(this.datePickerDateLastDisposal, Message.NotificationClass.WAS);
|
||||
this.RegisterComboboxIndexChange(this.comboBoxWasteDisposal, Message.NotificationClass.WAS);
|
||||
this.RegisterTextboxChange(this.textBoxWasteDisposalServiceProviders, Message.NotificationClass.WAS);
|
||||
this.checkBoxValidExemption.Checked += CheckBoxValidExemption_Checked;
|
||||
this.checkBoxValidExemption.Unchecked += CheckBoxValidExemption_Checked;
|
||||
}
|
||||
|
||||
private void CheckBoxValidExemption_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bool on = !(this.checkBoxValidExemption.IsChecked ?? false);
|
||||
this.checkBoxAccurateCorrectDetails.IsEnabled = on;
|
||||
this.comboBoxWasteDisposal.IsEnabled = on;
|
||||
this.textBoxWasteDisposalServiceProviders.IsEnabled = on;
|
||||
this.dataGridWaste.IsEnabled = on;
|
||||
this.locodeCtrlLastWastePort.IsEnabled = on;
|
||||
this.datePickerDateLastDisposal.IsEnabled = on;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationRevision>4</ApplicationRevision>
|
||||
<ApplicationVersion>3.6.13.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@ -34,15 +34,15 @@
|
||||
<Label Name="labelIdDocType" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
||||
<Label Name="labelIdDocNumber" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
||||
<Label Name="labelVisaNumber" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxDuty" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="2" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxDuty" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxGender" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<ComboBox Grid.Row="4" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" />
|
||||
<DatePicker Grid.Row="3" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" />
|
||||
<ComboBox Grid.Row="4" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -31,7 +31,7 @@ namespace ENI2.EditControls
|
||||
this.textBoxLastName.Text = this.CREW.CrewMemberLastName;
|
||||
this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName;
|
||||
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
|
||||
this.comboBoxGender.KeyUp += ComboBox_KeyUp;
|
||||
//this.comboBoxGender.KeyUp += ComboBox_KeyUp;
|
||||
this.comboBoxGender.SelectedIndex = this.CREW.CrewMemberGender.HasValue ? this.CREW.CrewMemberGender.Value : -1;
|
||||
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
|
||||
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
|
||||
@ -43,22 +43,20 @@
|
||||
<Label Name="labelStowagePosition" Grid.Row="4" Grid.Column="3" Content="{x:Static p:Resources.textStowagePosition}" HorizontalContentAlignment="Right" />
|
||||
<Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="3" Content="{x:Static p:Resources.textPortOfDischarge}" HorizontalContentAlignment="Right" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxIdentifier" IsReadOnly="True" MaxLength="40" Margin="2" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxProductName" MaxLength="255" Margin="2" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxIdentifier" IsReadOnly="True" MaxLength="40" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxProductName" MaxLength="255" Margin="2" VerticalContentAlignment="Center" />
|
||||
<CheckBox Grid.Row="1" Grid.Column="4" Name="checkBoxSpecRef15_19" VerticalAlignment="Center" Margin="2" />
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxPollutionCategory" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="4" Name="comboBoxRisks" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Name="comboBoxFlashpointInformation" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<TextBox Name="textBoxFlashpoint" Grid.Row="3" Grid.Column="4" Margin="2" MaxLength="11" VerticalContentAlignment="Center"/>
|
||||
<Label Grid.Row="3" Grid.Column="5" Content="°C" />
|
||||
<xctk:DoubleUpDown Name="doubleUpDownQuantity" Grid.Row="4" Grid.Column="1" Margin="2" FormatString="N3" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="kg" />
|
||||
<TextBox Name="textBoxStowagePosition" Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" MaxLength="24" Margin="2" VerticalContentAlignment="Center"/>
|
||||
<enictrl:LocodeControl x:Name="locodePortOfLoading" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
|
||||
<CheckBox Grid.Row="1" Grid.Column="4" Name="checkBoxSpecRef15_19" VerticalAlignment="Center" Margin="2" />
|
||||
<ComboBox Grid.Row="2" Grid.Column="4" Name="comboBoxRisks" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<TextBox Name="textBoxFlashpoint" Grid.Row="3" Grid.Column="4" Margin="2" MaxLength="11" />
|
||||
<Label Grid.Row="3" Grid.Column="5" Content="°C" />
|
||||
<TextBox Name="textBoxStowagePosition" Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" MaxLength="24" Margin="2"/>
|
||||
<enictrl:LocodeControl x:Name="locodePortOfDischarge" Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" />
|
||||
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -37,19 +37,15 @@
|
||||
<Label Name="labelStowagePosition" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textStowagePosition}" HorizontalContentAlignment="Right" />
|
||||
<Label Name="labelPortOfDischarge" Grid.Row="4" Grid.Column="3" Content="{x:Static p:Resources.textPortOfDischarge}" HorizontalContentAlignment="Right" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxIdentifier" IsReadOnly ="True" MaxLength="40" Margin="2" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxProductName" MaxLength="255" Margin="2" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Name="textBoxUNNumber" MaxLength="4" Margin="2" />
|
||||
<TextBox Grid.Row="2" Grid.Column="4" Name="textBoxIMOClass" MaxLength="4" Margin="2" />
|
||||
<TextBox Grid.Row="3" Grid.Column="4" Name="textBoxStowagePosition" MaxLength="24" Margin="2" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxIdentifier" IsReadOnly ="True" MaxLength="40" Margin="2" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxProductName" MaxLength="255" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Name="textBoxUNNumber" MaxLength="4" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="2" Grid.Column="4" Name="textBoxIMOClass" MaxLength="4" Margin="2" VerticalContentAlignment="Center" />
|
||||
<xctk:DoubleUpDown Name="doubleUpDownQuantity" Grid.Row="3" Grid.Column="1" Margin="2" FormatString="N3" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="kg" />
|
||||
|
||||
<TextBox Grid.Row="3" Grid.Column="4" Name="textBoxStowagePosition" MaxLength="24" Margin="2" VerticalContentAlignment="Center" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfLoading" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfDischarge" Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" />
|
||||
|
||||
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -78,51 +78,49 @@ Copyright (c) 2017 schick Informatik
|
||||
<Label Name="labelPortOfDischarge" Grid.Row="10" Grid.Column="6" Content="{x:Static p:Resources.textPortOfDischarge}" HorizontalContentAlignment="Right" />
|
||||
<Label Name="labelContainerPositionTier" Grid.Row="11" Grid.Column="6" Content="{x:Static p:Resources.textContainerPositionTier}" HorizontalContentAlignment="Right" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxIdentifier" IsReadOnly = "True" Margin="2" MaxLength="100" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxUNNumber" Margin="2" MaxLength="4" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxIdentifier" IsReadOnly = "True" Margin="2" MaxLength="100" Grid.ColumnSpan="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxUNNumber" Margin="2" MaxLength="4" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="4" Width="auto" Name="textBoxIMOClass" MaxLength="10" Margin="2" VerticalContentAlignment="Center" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="7" Name="comboBoxPackingGroup" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Width="auto" Name="textBoxProperShippingName" Margin="2" MaxLength="255" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="2" Grid.Column="4" Width="auto" Name="textBoxTechnicalName" MaxLength="255" Margin="2" Grid.ColumnSpan="2"/>
|
||||
<CheckBox Grid.Row="2" Grid.Column="7" Name="checkBoxMarinePollutant" VerticalAlignment="Top" Margin="2,6,0,0" />
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="decimalUpDownNetExplosiveMass" Margin="2" ShowButtonSpinner="False" FormatString="N3"/>
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="kg" />
|
||||
<TextBox Grid.Row="3" Grid.Column="4" Width="auto" Name="textBoxFlashpoint" MaxLength="10" Margin="2" VerticalContentAlignment="Center" />
|
||||
<xctk:IntegerUpDown Grid.Row="3" Grid.Column="7" Name="integerUpDownCategory" Maximum="3" Minimum="1" Margin="2" ShowButtonSpinner="False" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxClass7NuclideName" Margin="2" MaxLength="100" Grid.ColumnSpan="2" />
|
||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="4" Name="decimalUpDownMaxActivity" Minimum="0" FormatString="N6" Margin="2" ShowButtonSpinner="False" />
|
||||
<TextBox Grid.Row="4" Grid.Column="7" Name="textBoxSubsidiaryRisks" Margin="2" Grid.ColumnSpan="2" Grid.RowSpan="2" />
|
||||
<xctk:DoubleUpDown Grid.Row="5" Grid.Column="1" Name="decimalUpdownClass7TransportIndex" Margin="2" ShowButtonSpinner="False" FormatString="N1" Maximum="50" />
|
||||
<xctk:DoubleUpDown Grid.Row="5" Grid.Column="4" Name="decimalUpDownCSI" Minimum="0" Maximum="100" Margin="2" FormatString="N2" ShowButtonSpinner="False" />
|
||||
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="decimalUpdownControlTemperature" Margin="2" ShowButtonSpinner="False" FormatString="N2" />
|
||||
<Label Grid.Row="6" Grid.Column="2" Content="°C" />
|
||||
<xctk:IntegerUpDown Grid.Row="7" Grid.Column="1" Name="integerUpDownNumberOfPackages" Margin="2" ShowButtonSpinner="False" Minimum="0" />
|
||||
<CheckBox Grid.Row="8" Grid.Column="1" Name="checkBoxLimitedQuantities" VerticalAlignment="Center" Margin="2"/>
|
||||
<xctk:DoubleUpDown Grid.Row="9" Grid.Column="1" Name="decimalUpDownNetQuantity" Margin="2" Minimum="0" FormatString="N3" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="9" Grid.Column="2" Content="kg" />
|
||||
<CheckBox Grid.Row="10" Grid.Column="1" Name="checkBoxGeneralCargo" VerticalAlignment="Center" Margin="2" />
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Width="auto" Name="textBoxStowagePosition" MaxLength="24" Margin="2" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="12" Grid.Column="1" Width="auto" Name="textBoxContainerPositionBay" MaxLength="3" Margin="2" />
|
||||
<TextBox Grid.Row="13" Grid.Column="1" Grid.ColumnSpan="5" Name="textBoxRemarks" MaxLength="255" Margin="2" />
|
||||
|
||||
<TextBox Grid.Row="1" Grid.Column="4" Width="auto" Name="textBoxIMOClass" MaxLength="10" Margin="2" />
|
||||
<TextBox Grid.Row="2" Grid.Column="4" Width="auto" Name="textBoxTechnicalName" MaxLength="255" Margin="2" Grid.ColumnSpan="2"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="4" Width="auto" Name="textBoxFlashpoint" MaxLength="10" Margin="2" />
|
||||
<Label Grid.Row="3" Grid.Column="5" Content="°C" />
|
||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="4" Name="decimalUpDownMaxActivity" Minimum="0" FormatString="N6" Margin="2" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="4" Grid.Column="5" Content="Bq" />
|
||||
<xctk:DoubleUpDown Grid.Row="5" Grid.Column="4" Name="decimalUpDownCSI" Minimum="0" Maximum="100" Margin="2" FormatString="N2" ShowButtonSpinner="False" />
|
||||
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="4" Name="decimalUpDownEmergencyTemperature" Margin="2" FormatString="N2" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="6" Grid.Column="5" Content="°C" />
|
||||
<xctk:IntegerUpDown Grid.Row="7" Grid.Column="1" Name="integerUpDownNumberOfPackages" Margin="2" ShowButtonSpinner="False" Minimum="0" />
|
||||
<ComboBox Name="comboBoxPackageType" Grid.Column="4" Grid.Row="7" Grid.ColumnSpan="2" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" />
|
||||
<CheckBox Grid.Row="8" Grid.Column="1" Name="checkBoxLimitedQuantities" VerticalAlignment="Center" Margin="2"/>
|
||||
<CheckBox Grid.Row="8" Grid.Column="4" Name="checkBoxExceptedQuantities" VerticalAlignment="Center" Margin="2" />
|
||||
<xctk:DoubleUpDown Grid.Row="8" Grid.Column="7" Name="doubleUpDownCargoVolume" Margin="2" Minimum="0" ShowButtonSpinner="False" FormatString="N3" />
|
||||
<xctk:DoubleUpDown Grid.Row="9" Grid.Column="1" Name="decimalUpDownNetQuantity" Margin="2" Minimum="0" FormatString="N3" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="9" Grid.Column="2" Content="kg" />
|
||||
<xctk:DoubleUpDown Grid.Row="9" Grid.Column="4" Name="decimalUpDownGrossQuantity" Minimum="0" FormatString="N3" Margin="2" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="9" Grid.Column="5" Content="kg" />
|
||||
<TextBox Grid.Row="10" Grid.Column="4" Name="textBoxContainerNo" MaxLength="24" Margin="2" Grid.ColumnSpan="2" />
|
||||
<enictrl:LocodeControl Grid.Row="11" Grid.Column="4" x:Name="locodeControlPortOfLoading" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="12" Grid.Column="4" Width="auto" Name="textBoxContainerPositionRow" MaxLength="2" Margin="2" />
|
||||
|
||||
|
||||
<enictrl:LocodeControl Grid.Row="10" Grid.Column="7" x:Name="locodeControlPortOfDischarge" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="11" Grid.Column="7" Width="auto" Name="textBoxContainerPositionTier" MaxLength="2" Margin="2" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="7" Name="comboBoxPackingGroup" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<CheckBox Grid.Row="2" Grid.Column="7" Name="checkBoxMarinePollutant" VerticalAlignment="Top" Margin="2,6,0,0" />
|
||||
<xctk:IntegerUpDown Grid.Row="3" Grid.Column="7" Name="integerUpDownCategory" Maximum="3" Minimum="1" Margin="2" ShowButtonSpinner="False" />
|
||||
<TextBox Grid.Row="4" Grid.Column="7" Name="textBoxSubsidiaryRisks" Margin="2" Grid.ColumnSpan="2" Grid.RowSpan="2" />
|
||||
<xctk:DoubleUpDown Grid.Row="8" Grid.Column="7" Name="doubleUpDownCargoVolume" Margin="2" Minimum="0" ShowButtonSpinner="False" FormatString="N3" />
|
||||
<Label Grid.Row="8" Grid.Column="8" Content="cbm" />
|
||||
<TextBox Grid.Row="9" Grid.Column="7" Name="textBoxVehicleLicensePlate" Margin="2" MaxLength="24" Grid.ColumnSpan="2" />
|
||||
<CheckBox Grid.Row="10" Grid.Column="1" Name="checkBoxGeneralCargo" VerticalAlignment="Center" Margin="2" />
|
||||
<TextBox Grid.Row="10" Grid.Column="4" Name="textBoxContainerNo" MaxLength="24" Margin="2" Grid.ColumnSpan="2" VerticalContentAlignment="Center" />
|
||||
<enictrl:LocodeControl Grid.Row="10" Grid.Column="7" x:Name="locodeControlPortOfDischarge" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Width="auto" Name="textBoxStowagePosition" MaxLength="24" Margin="2" Grid.ColumnSpan="2" VerticalContentAlignment="Center" />
|
||||
<enictrl:LocodeControl Grid.Row="11" Grid.Column="4" x:Name="locodeControlPortOfLoading" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="11" Grid.Column="7" Width="auto" Name="textBoxContainerPositionTier" MaxLength="2" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="12" Grid.Column="1" Width="auto" Name="textBoxContainerPositionBay" MaxLength="3" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="12" Grid.Column="4" Width="auto" Name="textBoxContainerPositionRow" MaxLength="2" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="13" Grid.Column="1" Grid.ColumnSpan="5" Name="textBoxRemarks" MaxLength="255" Margin="2" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="5" Content="°C" />
|
||||
<Label Grid.Row="4" Grid.Column="5" Content="Bq" />
|
||||
<Label Grid.Row="8" Grid.Column="8" Content="cbm" />
|
||||
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -40,20 +40,16 @@
|
||||
<Label Name="labelQuantity" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textQuantity}" HorizontalContentAlignment="Right" />
|
||||
<Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="3" Content="{x:Static p:Resources.textPortOfDischarge}" HorizontalContentAlignment="Right" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxIdentifier" IsReadOnly="True" MaxLength="40" Margin="2" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="textBoxIdentifier" IsReadOnly="True" MaxLength="40" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxBulkCargoShippingName" MaxLength="255" Margin="2" />
|
||||
<CheckBox Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="2" Name="checkBoxMaterialHazardous" />
|
||||
<TextBox Grid.Row="2" Grid.Column="4" Name="textBoxUNNumber" MaxLength="4" Margin="2" />
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Name="textBoxIMOClass" MaxLength="4" Margin="2" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Name="textBoxStowagePosition" MaxLength="24" Margin="2" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
|
||||
<TextBox Grid.Row="2" Grid.Column="4" Name="textBoxUNNumber" MaxLength="4" Margin="2" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Name="textBoxIMOClass" MaxLength="4" Margin="2" VerticalContentAlignment="Center" />
|
||||
<xctk:DoubleUpDown Name="doubleUpDownQuantity" Grid.Row="3" Grid.Column="4" Margin="2" FormatString="N3" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="3" Grid.Column="5" Content="kg" />
|
||||
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Name="textBoxStowagePosition" MaxLength="24" Margin="2" VerticalContentAlignment="Center" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfLoading" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfDischarge" Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="2" />
|
||||
|
||||
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -24,6 +24,11 @@ namespace ENI2.EditControls
|
||||
Properties.Resources.textTransit
|
||||
};
|
||||
|
||||
private static string[] handlinTypeListDE =
|
||||
{
|
||||
Properties.Resources.textLoading,
|
||||
Properties.Resources.textDischarge
|
||||
};
|
||||
|
||||
public EditLADGDialog()
|
||||
{
|
||||
@ -33,13 +38,19 @@ namespace ENI2.EditControls
|
||||
|
||||
public LADG LADG { get; set; }
|
||||
|
||||
public MessageCore Core { get; set; }
|
||||
|
||||
#region event handler
|
||||
|
||||
private void EditLADGDialog_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.OKClicked += EditLADGDialog_OKClicked;
|
||||
|
||||
this.comboBoxHandlingType.ItemsSource = handlingTypeList;
|
||||
if (this.Core.IsDK)
|
||||
this.comboBoxHandlingType.ItemsSource = handlingTypeList;
|
||||
else
|
||||
this.comboBoxHandlingType.ItemsSource = handlinTypeListDE;
|
||||
|
||||
this.comboBoxHandlingType.KeyUp += ComboBox_KeyUp;
|
||||
if (this.LADG.CargoHandlingType.HasValue)
|
||||
this.comboBoxHandlingType.SelectedIndex = this.LADG.CargoHandlingType.Value;
|
||||
@ -63,6 +74,22 @@ namespace ENI2.EditControls
|
||||
this.comboBoxNST3Code.ItemsSource = LADG.CargoCodesNST3;
|
||||
this.comboBoxNST3Code.KeyUp += ComboBox_KeyUp;
|
||||
this.comboBoxNST3Code.SelectedValue = this.LADG.CargoCodeNST_3;
|
||||
|
||||
this.AddVisible = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void CopyValuesToEntity()
|
||||
{
|
||||
this.LADG.CargoHandlingType = (this.comboBoxHandlingType.SelectedIndex < 0) ? null : (byte?)this.comboBoxHandlingType.SelectedIndex;
|
||||
this.LADG.CargoNumberOfItems = this.integerUpDownNumberOfItems.Value;
|
||||
this.LADG.CargoGrossQuantity_TNE = this.doubleUpDownGrossQuantity.Value;
|
||||
this.LADG.PortOfLoading = this.locodeControl_PortOfLoading.LocodeValue;
|
||||
this.LADG.PortOfDischarge = this.locodeControl_PortOfDischarge.LocodeValue;
|
||||
this.LADG.CargoLACode = (this.comboBoxLACodes.SelectedValue == null) ? null : ((int?)this.comboBoxLACodes.SelectedValue);
|
||||
this.LADG.CargoCodeNST = (string)this.comboBoxNSTCode.SelectedValue;
|
||||
this.LADG.CargoCodeNST_3 = (string)this.comboBoxNST3Code.SelectedValue;
|
||||
}
|
||||
|
||||
private void ComboBoxNSTCode_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
@ -83,14 +110,7 @@ namespace ENI2.EditControls
|
||||
|
||||
private void EditLADGDialog_OKClicked()
|
||||
{
|
||||
this.LADG.CargoHandlingType = (this.comboBoxHandlingType.SelectedIndex < 0) ? null : (byte?) this.comboBoxHandlingType.SelectedIndex;
|
||||
this.LADG.CargoNumberOfItems = this.integerUpDownNumberOfItems.Value;
|
||||
this.LADG.CargoGrossQuantity_TNE = this.doubleUpDownGrossQuantity.Value;
|
||||
this.LADG.PortOfLoading = this.locodeControl_PortOfLoading.LocodeValue;
|
||||
this.LADG.PortOfDischarge = this.locodeControl_PortOfDischarge.LocodeValue;
|
||||
this.LADG.CargoLACode = (this.comboBoxLACodes.SelectedValue == null) ? null : ((int?)this.comboBoxLACodes.SelectedValue);
|
||||
this.LADG.CargoCodeNST = (string) this.comboBoxNSTCode.SelectedValue;
|
||||
this.LADG.CargoCodeNST_3 = (string)this.comboBoxNST3Code.SelectedValue;
|
||||
this.CopyValuesToEntity();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -45,9 +45,8 @@
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownQuantity" Margin="2" FormatString="N3" ShowButtonSpinner="False" />
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="kg" />
|
||||
<TextBox Grid.Row="3" Grid.Column="4" Name="textBoxStowagePosition" MaxLength="24" Margin="2" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
<enictrl:LocodeControl Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" x:Name="locodeControlPortOfLoading" />
|
||||
<enictrl:LocodeControl Grid.Row="4" Grid.Column="4" Grid.ColumnSpan="2" x:Name="locodeControlPortOfDischarge" />
|
||||
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="3" Name="textBoxRemarks" Margin="2" MaxLength="255" />
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -37,17 +37,17 @@
|
||||
<Label Name="labelPortOfDisEmbarkation" Grid.Row="5" Grid.Column="0 " Content="{x:Static p:Resources.textPortOfDisembarkation}" />
|
||||
<Label Name="labelTransitPassenger" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textTransitPassenger}" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxGender" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxPlaceOfBirth" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" />
|
||||
<DatePicker Grid.Row="2" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" />
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" />
|
||||
<TextBox Grid.Row="3" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxPortOfEmbarkation" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxPortOfDisEmbarkation" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="3" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfEmbarkation" Grid.Row="4" Grid.Column="3" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfDisembarkation" Grid.Row="5" Grid.Column="1" />
|
||||
<CheckBox Name="checkBoxTransitPassenger" Grid.Row ="5" Grid.Column="3" VerticalAlignment="Center" Margin="2"/>
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -42,8 +42,8 @@ namespace ENI2.EditControls
|
||||
this.comboBoxIdDocType.SelectedIndex = this.PAS.PassengerIdentityDocumentType.HasValue ? this.PAS.PassengerIdentityDocumentType.Value : -1;
|
||||
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
|
||||
this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber;
|
||||
this.textBoxPortOfEmbarkation.Text = this.PAS.PassengerPortOfEmbarkation;
|
||||
this.textBoxPortOfDisEmbarkation.Text = this.PAS.PassengerPortOfDisembarkation;
|
||||
this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation;
|
||||
this.locodePortOfDisembarkation.LocodeValue = this.PAS.PassengerPortOfDisembarkation;
|
||||
this.checkBoxTransitPassenger.IsChecked = this.PAS.PassengerInTransit;
|
||||
this.OKClicked += EditPasDialog_OKClicked;
|
||||
this.AddVisible = true;
|
||||
@ -61,8 +61,8 @@ namespace ENI2.EditControls
|
||||
this.PAS.PassengerIdentityDocumentType = (this.comboBoxIdDocType.SelectedIndex == -1) ? null : (byte?)this.comboBoxIdDocType.SelectedIndex;
|
||||
this.PAS.PassengerIdentityDocumentId = this.textBoxIdDocNumber.Text.Trim();
|
||||
this.PAS.PassengerVisaNumber = this.textBoxVisaNumber.Text.Trim();
|
||||
this.PAS.PassengerPortOfEmbarkation = this.textBoxPortOfEmbarkation.Text.Trim();
|
||||
this.PAS.PassengerPortOfDisembarkation = this.textBoxPortOfDisEmbarkation.Text.Trim();
|
||||
this.PAS.PassengerPortOfEmbarkation = this.locodePortOfEmbarkation.LocodeValue;
|
||||
this.PAS.PassengerPortOfDisembarkation = this.locodePortOfDisembarkation.LocodeValue;
|
||||
this.PAS.PassengerInTransit = this.checkBoxTransitPassenger.IsChecked;
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortname}" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textETA}" />
|
||||
<enictrl:LocodeControl Grid.Column="1" Grid.Row="0" x:Name="locodeControlPortName" />
|
||||
<xctk:DateTimePicker Name="dateTimePickerETA" Grid.Column="1" Grid.Row="1" Margin="2"/>
|
||||
<xctk:DateTimePicker Name="dateTimePickerETA" Grid.Column="1" Grid.Row="1" Margin="2" ShowButtonSpinner="False" Format="Custom" FormatString="dd.MM.yyyy HH:mm" VerticalContentAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -28,14 +28,20 @@ namespace ENI2.EditControls
|
||||
this.textBoxServiceName.Text = this.SERV.ServiceName;
|
||||
this.textBoxServiceBeneficiary.Text = this.SERV.ServiceBeneficiary;
|
||||
this.textBoxServiceInvoiceRecipient.Text = this.SERV.ServiceInvoiceRecipient;
|
||||
this.AddVisible = true;
|
||||
}
|
||||
|
||||
private void EditSERVDialog_OKClicked()
|
||||
public void CopyValuesToEntity()
|
||||
{
|
||||
// copy back
|
||||
this.SERV.ServiceName = this.textBoxServiceName.Text.Trim();
|
||||
this.SERV.ServiceBeneficiary = this.textBoxServiceBeneficiary.Text.Trim();
|
||||
this.SERV.ServiceInvoiceRecipient = this.textBoxServiceInvoiceRecipient.Text.Trim();
|
||||
this.SERV.ServiceInvoiceRecipient = this.textBoxServiceInvoiceRecipient.Text.Trim();
|
||||
}
|
||||
|
||||
private void EditSERVDialog_OKClicked()
|
||||
{
|
||||
this.CopyValuesToEntity();
|
||||
}
|
||||
|
||||
public SERV SERV { get; set; }
|
||||
|
||||
@ -45,16 +45,16 @@
|
||||
<Label Name="labelGrossTonnage" HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="3" Content="{x:Static p:Resources.textGrossTonnage}" />
|
||||
<Label Name="labelBeam" HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textBeamOverAll}" />
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxPurposeOfCall" Margin="2" MaxLength="100" />
|
||||
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownDraught" Margin="2" ShowButtonSpinner="False" FormatString="N1" />
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownLength" Margin="2" ShowButtonSpinner="False" FormatString="N2"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxRemarks" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxPurposeOfCall" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="4" Name="comboBoxFlag" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="False" />
|
||||
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownDraught" Margin="2" ShowButtonSpinner="False" FormatString="N1" />
|
||||
<xctk:IntegerUpDown Grid.Row="2" Grid.Column="4" Name="integerUpDownGrossTonnage" Margin="2" ShowButtonSpinner="False" />
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownLength" Margin="2" ShowButtonSpinner="False" FormatString="N2"/>
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="4" Name="doubleUpDownBeam" Margin="2" ShowButtonSpinner="False" FormatString="N2"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxRemarks" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
|
||||
<TextBlock Text="Operator" FontWeight="Bold" FontSize="10" Grid.Row="5" Grid.Column="0" />
|
||||
<TextBlock Text="Operator" FontWeight="Bold" FontSize="10" Grid.Row="5" Grid.Column="0" Margin="10,0,0,0" />
|
||||
|
||||
<Label Name="labelOperatorName" HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textName}" />
|
||||
<Label Name="labelStreetAddress" HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textStreetAndNumber}" />
|
||||
@ -65,14 +65,15 @@
|
||||
<Label Name="labelCity" HorizontalContentAlignment="Right" Grid.Row="8" Grid.Column="3" Content="{x:Static p:Resources.textCity}" />
|
||||
<Label Name="labelFax" HorizontalContentAlignment="Right" Grid.Row="10" Grid.Column="3" Content="{x:Static p:Resources.textFax}" />
|
||||
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Width="auto" Name="textBoxOperatorName" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxStreetNumber" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Width="auto" Name="textBoxPostalCode" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="9" Grid.Column="1" Width="auto" Name="textBoxCountry" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Width="auto" Name="textBoxPhone" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="8" Grid.Column="4" Width="auto" Name="textBoxCity" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="10" Grid.Column="4" Width="auto" Name="textBoxFax" Margin="2" MaxLength="100" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Width="auto" Name="textBoxOperatorName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxStreetNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Width="auto" Name="textBoxPostalCode" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="8" Grid.Column="4" Width="auto" Name="textBoxCity" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
|
||||
<TextBox Grid.Row="9" Grid.Column="1" Width="auto" Name="textBoxCountry" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="1" Width="auto" Name="textBoxPhone" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="10" Grid.Column="4" Width="auto" Name="textBoxFax" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<TextBox Grid.Row="11" Grid.Column="1" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -39,12 +39,12 @@
|
||||
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
|
||||
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Width="auto" MaxLength="100" />
|
||||
|
||||
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountWasteDischargedLastPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||
<xctk:DoubleUpDown Grid.Row="5" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountWasteDischargedLastPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3"/>
|
||||
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3"/>
|
||||
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3"/>
|
||||
<xctk:DoubleUpDown Grid.Row="5" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3"/>
|
||||
<enictrl:LocodeControl Grid.Row="6" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" />
|
||||
<xctk:DoubleUpDown Grid.Row="7" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N1"/>
|
||||
<xctk:DoubleUpDown Grid.Row="7" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3"/>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" />
|
||||
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" />
|
||||
|
||||
@ -166,6 +166,10 @@ namespace ENI2
|
||||
string description = null;
|
||||
if (!reader.IsDBNull(0)) code = reader.GetString(0);
|
||||
if (!reader.IsDBNull(1)) description = reader.GetString(1);
|
||||
|
||||
if ((code != null) && (code.Length == 1))
|
||||
code = string.Format("0{0}", code); // bei einstelligen Werten 0 voranstellen
|
||||
|
||||
if ((code != null) && (description != null))
|
||||
result[code] = string.Format("{0} {1}", code, description);
|
||||
}
|
||||
|
||||
18
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
18
ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
generated
@ -1163,6 +1163,24 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy to HAZD.
|
||||
/// </summary>
|
||||
public static string textCopyToHAZD {
|
||||
get {
|
||||
return ResourceManager.GetString("textCopyToHAZD", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy TOWA to TOWD.
|
||||
/// </summary>
|
||||
public static string textCopyTOWATOWD {
|
||||
get {
|
||||
return ResourceManager.GetString("textCopyTOWATOWD", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Country.
|
||||
/// </summary>
|
||||
|
||||
@ -1426,4 +1426,10 @@
|
||||
<data name="textStatusInfo" xml:space="preserve">
|
||||
<value>Status info</value>
|
||||
</data>
|
||||
<data name="textCopyTOWATOWD" xml:space="preserve">
|
||||
<value>Copy TOWA to TOWD</value>
|
||||
</data>
|
||||
<data name="textCopyToHAZD" xml:space="preserve">
|
||||
<value>Copy to HAZD</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
@ -147,7 +147,7 @@ namespace bsmd.ExcelReadService
|
||||
string portName = LocodeDB.PortNameFromLocode(val);
|
||||
if(portName == null)
|
||||
{
|
||||
this.Conf.ConfirmText(lookup, null, ReadState.WARN);
|
||||
this.Conf.ConfirmText(lookup, val, ReadState.WARN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -134,12 +134,18 @@ namespace bsmd.ExcelReadService
|
||||
|
||||
// save all messages now
|
||||
|
||||
foreach(Message message in messages)
|
||||
{
|
||||
message.CreatedBy = "EXCEL";
|
||||
DBManager.Instance.Save(message);
|
||||
message.SaveElements();
|
||||
}
|
||||
//if (!(messageCore.ExcelImportComplete ?? false))
|
||||
//{
|
||||
// messageCore.ExcelImportComplete = true;
|
||||
// DBManager.Instance.Save(messageCore);
|
||||
|
||||
foreach (Message message in messages)
|
||||
{
|
||||
message.CreatedBy = "EXCEL";
|
||||
DBManager.Instance.Save(message);
|
||||
message.SaveElements();
|
||||
}
|
||||
//}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -309,6 +309,27 @@ namespace bsmd.database
|
||||
return messageList;
|
||||
}
|
||||
|
||||
public Message GetMessage(MessageCore core, Message.NotificationClass notificationClass)
|
||||
{
|
||||
Message aMessage = new Message();
|
||||
SqlCommand cmd = new SqlCommand();
|
||||
aMessage.PrepareLoadCommand(cmd, Message.LoadFilter.BY_CORE_AND_CLASS, core.Id, notificationClass);
|
||||
IDataReader reader = this.PerformCommand(cmd);
|
||||
List<DatabaseEntity> messages = aMessage.LoadList(reader);
|
||||
|
||||
Message result = null;
|
||||
if(!messages.IsNullOrEmpty())
|
||||
{
|
||||
result = (Message) messages[0]; // es kann nur eine sein
|
||||
result.MessageCore = core;
|
||||
// TODO: abhängige Listen laden?
|
||||
}
|
||||
|
||||
if (this._closeConnectionAfterUse) this.Disconnect();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public string GetShipNameFromCore(MessageCore core)
|
||||
{
|
||||
foreach(Message message in this.GetMessagesForCore(core, MessageLoad.ALL))
|
||||
|
||||
@ -236,5 +236,27 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void CopyFromIBC(IBCPosition selectedIBC)
|
||||
{
|
||||
if (selectedIBC == null) return;
|
||||
|
||||
this.FlashpointInformation = selectedIBC.FlashpointInformation;
|
||||
this.Flashpoint_CEL = selectedIBC.Flashpoint_CEL;
|
||||
this.Hazards = selectedIBC.Hazards;
|
||||
this.PollutionCategory = selectedIBC.PollutionCategory;
|
||||
this.PortOfDischarge = selectedIBC.PortOfDischarge;
|
||||
this.PortOfLoading = selectedIBC.PortOfLoading;
|
||||
this.ProductName = selectedIBC.ProductName;
|
||||
this.Quantity_KGM = selectedIBC.Quantity_KGM;
|
||||
this.Remarks = selectedIBC.Remarks;
|
||||
this.SpecRef15_19 = selectedIBC.SpecRef15_19;
|
||||
this.StowagePosition = selectedIBC.StowagePosition;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,5 +145,24 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void CopyFromIGC(IGCPosition selectedIGC)
|
||||
{
|
||||
if (selectedIGC == null) return;
|
||||
this.IMOClass = selectedIGC.IMOClass;
|
||||
this.PortOfDischarge = selectedIGC.PortOfDischarge;
|
||||
this.PortOfLoading = selectedIGC.PortOfLoading;
|
||||
this.ProductName = selectedIGC.ProductName;
|
||||
this.Quantity_KGM = selectedIGC.Quantity_KGM;
|
||||
this.Remarks = selectedIGC.Remarks;
|
||||
this.StowagePosition = selectedIGC.StowagePosition;
|
||||
this.UNNumber = selectedIGC.UNNumber;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ namespace bsmd.database
|
||||
"Identifier = @P32, Bay = @P33, [Row] = @P34, Tier = @P35 WHERE Id = @ID", this.Tablename);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override void PrepareLoadCommand(IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
|
||||
{
|
||||
@ -408,5 +408,49 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void CopyFromIMDG(IMDGPosition selectedIMDG)
|
||||
{
|
||||
if (selectedIMDG == null) return;
|
||||
this.Bay = selectedIMDG.Bay;
|
||||
this.Class7Category = selectedIMDG.Class7Category;
|
||||
this.Class7CSI = selectedIMDG.Class7CSI;
|
||||
this.Class7MaxActivity_BQL = selectedIMDG.Class7MaxActivity_BQL;
|
||||
this.Class7NuclideName = selectedIMDG.Class7NuclideName;
|
||||
this.Class7TransportIndex = selectedIMDG.Class7TransportIndex;
|
||||
this.CompatibilityGroup = selectedIMDG.CompatibilityGroup;
|
||||
this.ContainerNumber = selectedIMDG.ContainerNumber;
|
||||
this.ControlTemperature_CEL = selectedIMDG.ControlTemperature_CEL;
|
||||
this.EmergencyTemperature_CEL = selectedIMDG.EmergencyTemperature_CEL;
|
||||
this.ExceptedQuantities = selectedIMDG.ExceptedQuantities;
|
||||
this.Flashpoint_CEL = selectedIMDG.Flashpoint_CEL;
|
||||
this.GeneralCargoIBC = selectedIMDG.GeneralCargoIBC;
|
||||
this.GrossQuantity_KGM = selectedIMDG.GrossQuantity_KGM;
|
||||
this.IMOClass = selectedIMDG.IMOClass;
|
||||
this.LimitedQuantities = selectedIMDG.LimitedQuantities;
|
||||
this.MarinePollutant = selectedIMDG.MarinePollutant;
|
||||
this.NetExplosiveMass_KGM = selectedIMDG.NetExplosiveMass_KGM;
|
||||
this.NetQuantity_KGM = selectedIMDG.NetQuantity_KGM;
|
||||
this.NumberOfPackages = selectedIMDG.NumberOfPackages;
|
||||
this.PackageType = selectedIMDG.PackageType;
|
||||
this.PackingGroup = selectedIMDG.PackingGroup;
|
||||
this.PortOfDischarge = selectedIMDG.PortOfDischarge;
|
||||
this.PortOfLoading = selectedIMDG.PortOfLoading;
|
||||
this.ProperShippingName = selectedIMDG.ProperShippingName;
|
||||
this.Remarks = selectedIMDG.Remarks;
|
||||
this.Row = selectedIMDG.Row;
|
||||
this.StowagePosition = selectedIMDG.StowagePosition;
|
||||
this.SubsidiaryRiskText = selectedIMDG.SubsidiaryRiskText;
|
||||
this.TechnicalName = selectedIMDG.TechnicalName;
|
||||
this.Tier = selectedIMDG.Tier;
|
||||
this.UNNumber = selectedIMDG.UNNumber;
|
||||
this.VehicleLicenseNumber = selectedIMDG.VehicleLicenseNumber;
|
||||
this.Volume_MTQ = selectedIMDG.Volume_MTQ;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,5 +151,25 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void CopyFromIMSBC(IMSBCPosition selectedIMSBC)
|
||||
{
|
||||
if (selectedIMSBC == null) return;
|
||||
|
||||
this.BulkCargoShippingName = selectedIMSBC.BulkCargoShippingName;
|
||||
this.IMOClass = selectedIMSBC.IMOClass;
|
||||
this.MHB = selectedIMSBC.MHB;
|
||||
this.PortOfDischarge = selectedIMSBC.PortOfDischarge;
|
||||
this.PortOfLoading = selectedIMSBC.PortOfLoading;
|
||||
this.Quantity_KGM = selectedIMSBC.Quantity_KGM;
|
||||
this.Remarks = selectedIMSBC.Remarks;
|
||||
this.StowagePosition = selectedIMSBC.StowagePosition;
|
||||
this.UNNumber = selectedIMSBC.UNNumber;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,11 +11,25 @@ namespace bsmd.database
|
||||
{
|
||||
public class ImportValue : DatabaseEntity
|
||||
{
|
||||
|
||||
#region Construction
|
||||
|
||||
public ImportValue()
|
||||
{
|
||||
this.tablename = "[dbo].[ImportValue]";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Enumeration
|
||||
|
||||
public enum ValueStatus
|
||||
{
|
||||
REJECTED,
|
||||
CONFIRMED
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
@ -29,6 +43,8 @@ namespace bsmd.database
|
||||
|
||||
public int? Identifier { get; set; }
|
||||
|
||||
public ValueStatus? Status { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region DatabaseEntity implementation
|
||||
@ -45,7 +61,8 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(2)) iv.NotificationClass = (Message.NotificationClass)Enum.ToObject(typeof(Message.NotificationClass), reader.GetByte(2));
|
||||
if (!reader.IsDBNull(3)) iv.Name = reader.GetString(3);
|
||||
if (!reader.IsDBNull(4)) iv.Value = reader.GetString(4);
|
||||
if (!reader.IsDBNull(5)) iv.Identifier = reader.GetInt32(5);
|
||||
if (!reader.IsDBNull(5)) iv.Identifier = reader.GetInt32(5);
|
||||
if (!reader.IsDBNull(6)) iv.Status = (ValueStatus)Enum.ToObject(typeof(ValueStatus), reader.GetByte(6));
|
||||
|
||||
result.Add(iv);
|
||||
}
|
||||
@ -78,20 +95,21 @@ namespace bsmd.database
|
||||
scmd.Parameters.AddWithNullableValue("@NCLASS", this.NotificationClass);
|
||||
scmd.Parameters.AddWithNullableValue("@NAME", this.Name);
|
||||
scmd.Parameters.AddWithNullableValue("@VALUE", this.Value);
|
||||
scmd.Parameters.AddWithNullableValue("@IDENTIFIER", this.Identifier);
|
||||
scmd.Parameters.AddWithNullableValue("@IDENTIFIER", this.Identifier);
|
||||
scmd.Parameters.AddWithNullableValue("@STATUS", this.Status);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, ImportHeaderId, NotificationClass, Name, Value, Identifiert) VALUES " +
|
||||
"(@ID, @IHID, @NCLASS, @NAME, @VALUE, @IDENTIFIER)", this.Tablename);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, ImportHeaderId, NotificationClass, Name, Value, Identifier, Status) VALUES " +
|
||||
"(@ID, @IHID, @NCLASS, @NAME, @VALUE, @IDENTIFIER, @STATUS)", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("UPDATE {0} SET ImportHeaderId = @IHID, NotificationClass = @NCLASS, Name = @NAME, Value = @VALUE, " +
|
||||
"Identifier = @IDENTIFIER WHERE Id = @ID", this.Tablename);
|
||||
"Identifier = @IDENTIFIER, Status = @STATUS WHERE Id = @ID", this.Tablename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -167,5 +167,21 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void CopyFromMARPOL(MARPOL_Annex_I_Position selectedMARPOL)
|
||||
{
|
||||
this.FlashpointInformation = selectedMARPOL.FlashpointInformation;
|
||||
this.Flashpoint_CEL = selectedMARPOL.Flashpoint_CEL;
|
||||
this.Name = selectedMARPOL.Name;
|
||||
this.PortOfDischarge = selectedMARPOL.PortOfDischarge;
|
||||
this.PortOfLoading = selectedMARPOL.PortOfLoading;
|
||||
this.Quantity_KGM = selectedMARPOL.Quantity_KGM;
|
||||
this.Remarks = selectedMARPOL.Remarks;
|
||||
this.StowagePosition = selectedMARPOL.StowagePosition;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,7 +140,8 @@ namespace bsmd.database
|
||||
QUERY_NSW_STATUS,
|
||||
NOT_DELETED,
|
||||
DELETED,
|
||||
IMPORTHEADER_ID
|
||||
IMPORTHEADER_ID,
|
||||
BY_CORE_AND_CLASS
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -437,6 +438,13 @@ namespace bsmd.database
|
||||
((SqlCommand)cmd).Parameters.AddWithValue("@COREID", criteria[0]);
|
||||
break;
|
||||
}
|
||||
case LoadFilter.BY_CORE_AND_CLASS:
|
||||
{
|
||||
query += "WHERE MessageCoreId = @COREID AND NotificationClass = @CLASS";
|
||||
((SqlCommand)cmd).Parameters.AddWithValue("@COREID", criteria[0]);
|
||||
((SqlCommand)cmd).Parameters.AddWithValue("@CLASS", criteria[1]);
|
||||
break;
|
||||
}
|
||||
case LoadFilter.ALL:
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -199,6 +199,12 @@ namespace bsmd.database
|
||||
/// </summary>
|
||||
public bool? Locked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Flag wird vom ExcelImportTool beim ersten Einlesen gesetzt. Weitere Einlesevorgänge werden nur in der
|
||||
/// Update Tabelle gespeichert, um Änderungen durch den Mitarbeiter im ENI-2 nicht zu überschreiben
|
||||
/// </summary>
|
||||
public bool? ExcelImportComplete { get; set; }
|
||||
|
||||
#region Felder um NSW Statusinformationen zu speichern (abgefragte Daten!)
|
||||
|
||||
public bool? Cancelled { get; set; }
|
||||
@ -277,6 +283,7 @@ namespace bsmd.database
|
||||
scmd.Parameters.AddWithNullableValue("@P34", this.StatusCheckErrorCode);
|
||||
scmd.Parameters.AddWithNullableValue("@P35", this.StatusCheckErrorMessage);
|
||||
scmd.Parameters.AddWithNullableValue("@P36", this.QueryNSWStatus);
|
||||
scmd.Parameters.AddWithNullableValue("@P37", this.ExcelImportComplete);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
@ -287,9 +294,9 @@ namespace bsmd.database
|
||||
"HerbergFormTemplateGuid, HerbergReportType, HerbergEmailcontactReportingVessel, HerbergEmail24HrsContact, " +
|
||||
"ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming, DefaultReportingPartyId, CreateExcel, " +
|
||||
"EditedBy, TicketNo, Cancelled, VisitIdOrTransitIdCancellable, BlockedNotificationClasses, FreeNotificationClasses, " +
|
||||
"OwnNotificationClasses, StatusCheckErrorCode, StatusCheckErrorMessage, QueryNSWStatus) VALUES " +
|
||||
"OwnNotificationClasses, StatusCheckErrorCode, StatusCheckErrorMessage, QueryNSWStatus, ExcelImportComplete) VALUES " +
|
||||
"(@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, " +
|
||||
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27, @P28, @P29, @P30, @P31, @P32, @P33, @P34, @P35, @P36)",
|
||||
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27, @P28, @P29, @P30, @P31, @P32, @P33, @P34, @P35, @P36, @P37)",
|
||||
this.Tablename);
|
||||
scmd.CommandText = query;
|
||||
}
|
||||
@ -304,7 +311,7 @@ namespace bsmd.database
|
||||
"SietasSheetVersion = @P23, Incoming = @P24, DefaultReportingPartyId = @P25, CreateExcel = @P26, EditedBy = @P27, " +
|
||||
"TicketNo = @P28, Cancelled = @P29, VisitIdOrTransitIdCancellable = @P30, BlockedNotificationClasses = @P31, " +
|
||||
"FreeNotificationClasses = @P32, OwnNotificationClasses = @P33, StatusCheckErrorCode = @P34, StatusCheckErrorMessage = @P35, " +
|
||||
"QueryNSWStatus = @P36 WHERE Id = @ID", this.Tablename);
|
||||
"QueryNSWStatus = @P36, ExcelImportComplete = @P37 WHERE Id = @ID", this.Tablename);
|
||||
scmd.CommandText = query;
|
||||
}
|
||||
}
|
||||
@ -323,7 +330,8 @@ namespace bsmd.database
|
||||
"[{0}].[HerbergEmail24HrsContact], [{0}].[ETAKielCanal], [{0}].[HerbergRevDate], [{0}].[ReportStatus], [{0}].[SietasSheetVersion], [{0}].[Incoming], " +
|
||||
"[{0}].[DefaultReportingPartyId], [{0}].[Created], [{0}].[Changed], [{0}].[CreateExcel], [{0}].[EditedBy], [{0}].[TicketNo], " +
|
||||
"[{0}].[Cancelled], [{0}].[VisitIdOrTransitIdCancellable], [{0}].[BlockedNotificationClasses], [{0}].[FreeNotificationClasses], " +
|
||||
"[{0}].[OwnNotificationClasses], [{0}].[StatusCheckErrorCode], [{0}].[StatusCheckErrorMessage], [{0}].[QueryNSWStatus] FROM {0} ",
|
||||
"[{0}].[OwnNotificationClasses], [{0}].[StatusCheckErrorCode], [{0}].[StatusCheckErrorMessage], [{0}].[QueryNSWStatus], " +
|
||||
"[{0}].[ExcelImportComplete] FROM {0} ",
|
||||
this.Tablename));
|
||||
|
||||
this.SetFilters(sb, cmd, filter, criteria);
|
||||
@ -544,6 +552,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(36)) core.StatusCheckErrorCode = reader.GetString(36);
|
||||
if (!reader.IsDBNull(37)) core.StatusCheckErrorMessage = reader.GetString(37);
|
||||
if (!reader.IsDBNull(38)) core.QueryNSWStatus = reader.GetBoolean(38);
|
||||
if (!reader.IsDBNull(39)) core.ExcelImportComplete = reader.GetBoolean(39);
|
||||
|
||||
result.Add(core);
|
||||
}
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.6.13")]
|
||||
[assembly: AssemblyInformationalVersion("3.6.14")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.6.13.*")]
|
||||
[assembly: AssemblyVersion("3.6.14.*")]
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ namespace bsmd.database
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
public string TowageOnDepartureOperatorEmail { get; set; }
|
||||
public string TowageOnDepartureOperatorEmail { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
public double? TowageOnDepartureLengthOverall_MTR { get; set; }
|
||||
@ -195,6 +195,31 @@ namespace bsmd.database
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void CopyFromTOWA(TOWA copyTOWA)
|
||||
{
|
||||
if(copyTOWA != null)
|
||||
{
|
||||
this.TowageOnDepartureBeam_MTR = copyTOWA.TowageOnArrivalBeam_MTR;
|
||||
this.TowageOnDepartureDraught_DMT = copyTOWA.TowageOnArrivalDraught_DMT;
|
||||
this.TowageOnDepartureFlag = copyTOWA.TowageOnArrivalFlag;
|
||||
this.TowageOnDepartureLengthOverall_MTR = copyTOWA.TowageOnArrivalLengthOverall_MTR;
|
||||
this.TowageOnDepartureName = copyTOWA.TowageOnArrivalName;
|
||||
this.TowageOnDepartureOperatorCity = copyTOWA.TowageOnArrivalOperatorCity;
|
||||
this.TowageOnDepartureOperatorCompanyName = copyTOWA.TowageOnArrivalOperatorCompanyName;
|
||||
this.TowageOnDepartureOperatorCountry = copyTOWA.TowageOnArrivalOperatorCountry;
|
||||
this.TowageOnDepartureOperatorEmail = copyTOWA.TowageOnArrivalOperatorEmail;
|
||||
this.TowageOnDepartureOperatorFax = copyTOWA.TowageOnArrivalOperatorFax;
|
||||
this.TowageOnDepartureOperatorPhone = copyTOWA.TowageOnArrivalOperatorPhone;
|
||||
this.TowageOnDepartureOperatorPostalCode = copyTOWA.TowageOnArrivalOperatorPostalCode;
|
||||
this.TowageOnDepartureOperatorStreetNameAndNumber = copyTOWA.TowageOnArrivalOperatorStreetNameAndNumber;
|
||||
this.TowageOnDepartureRemarks = copyTOWA.TowageOnArrivalRemarks;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -96,6 +96,7 @@ namespace bsmd.hisnord
|
||||
{
|
||||
_log.DebugFormat("preparing {0}", noteMessageDict[notificationClass].MessageNotificationClassDisplay);
|
||||
noteMessageDict[notificationClass].InternalStatus = Message.BSMDStatus.SENT;
|
||||
noteMessageDict[notificationClass].SentAt = DateTime.Now;
|
||||
result = noteMessageDict[notificationClass];
|
||||
}
|
||||
DBManager.Instance.Save(noteMessageDict[notificationClass]);
|
||||
@ -1039,7 +1040,7 @@ namespace bsmd.hisnord
|
||||
|
||||
if (mdh.NonAccidentalDeathsDuringVoyage ?? false)
|
||||
{
|
||||
mdh_items.Add(mdh.NonAccidentalDeathsDuringVoyageCount ?? 0);
|
||||
mdh_items.Add((mdh.NonAccidentalDeathsDuringVoyageCount ?? 0).ToString());
|
||||
mdh_types.Add(ItemsChoiceType5.NonAccidentialDeathsDuringVoyageCount);
|
||||
}
|
||||
|
||||
@ -1051,7 +1052,7 @@ namespace bsmd.hisnord
|
||||
|
||||
if (mdh.NumberOfIllPersonsHigherThanExpected ?? false)
|
||||
{
|
||||
mdh_items.Add(mdh.NumberOfIllPersons ?? 0);
|
||||
mdh_items.Add((mdh.NumberOfIllPersons ?? 0).ToString());
|
||||
mdh_types.Add(ItemsChoiceType5.NumberOfIllPersons);
|
||||
}
|
||||
|
||||
@ -1141,13 +1142,16 @@ namespace bsmd.hisnord
|
||||
pocs.PortOfCallLast30Days[j].PortOfCallLast30DaysDateOfDeparture = mdh.PortOfCallLast30Days[j].PortOfCallLast30DaysDateOfDeparture.Value;
|
||||
pocs.PortOfCallLast30Days[j].PortOfCallLast30DaysCrewMembersJoined = (mdh.PortOfCallLast30Days[j].PortOfCallLast30DaysCrewMembersJoined ?? false) ? yorntype.Y : yorntype.N;
|
||||
|
||||
List<string> crewJoinedShipList = new List<string>();
|
||||
for (int k = 0; k < mdh.PortOfCallLast30Days[j].CrewJoinedShip.Count; k++)
|
||||
if (mdh.PortOfCallLast30Days[j].CrewJoinedShip.Count > 0)
|
||||
{
|
||||
if (!mdh.PortOfCallLast30Days[j].CrewJoinedShip[k].PortOfCallLast30DaysCrewJoinedShipName.IsNullOrEmpty())
|
||||
crewJoinedShipList.Add(mdh.PortOfCallLast30Days[j].CrewJoinedShip[k].PortOfCallLast30DaysCrewJoinedShipName);
|
||||
List<string> crewJoinedShipList = new List<string>();
|
||||
for (int k = 0; k < mdh.PortOfCallLast30Days[j].CrewJoinedShip.Count; k++)
|
||||
{
|
||||
if (!mdh.PortOfCallLast30Days[j].CrewJoinedShip[k].PortOfCallLast30DaysCrewJoinedShipName.IsNullOrEmpty())
|
||||
crewJoinedShipList.Add(mdh.PortOfCallLast30Days[j].CrewJoinedShip[k].PortOfCallLast30DaysCrewJoinedShipName);
|
||||
}
|
||||
pocs.PortOfCallLast30Days[j].PortOfCallLast30DaysCrewJoinedShip = crewJoinedShipList.ToArray();
|
||||
}
|
||||
pocs.PortOfCallLast30Days[j].PortOfCallLast30DaysCrewJoinedShip = crewJoinedShipList.ToArray();
|
||||
}
|
||||
|
||||
mdh_items.Add(pocs);
|
||||
@ -1418,23 +1422,36 @@ namespace bsmd.hisnord
|
||||
hn_arrival.TowageOnArrivalBeam_MTR = (float)towa.TowageOnArrivalBeam_MTR.Value;
|
||||
if (towa.TowageOnArrivalDraught_DMT.HasValue)
|
||||
hn_arrival.TowageOnArrivalDraught_DMT = (float)towa.TowageOnArrivalDraught_DMT.Value;
|
||||
hn_arrival.TowageOnArrivalFlag = towa.TowageOnArrivalFlag;
|
||||
if(!towa.TowageOnArrivalFlag.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalFlag = towa.TowageOnArrivalFlag;
|
||||
if (towa.TowageOnArrivalGrossTonnage.HasValue)
|
||||
hn_arrival.TowageOnArrivalGrossTonnage = towa.TowageOnArrivalGrossTonnage.Value.ToString();
|
||||
if (towa.TowageOnArrivalLengthOverall_MTR.HasValue)
|
||||
hn_arrival.TowageOnArrivalLengthOverall_MTR = (float)towa.TowageOnArrivalLengthOverall_MTR.Value;
|
||||
hn_arrival.TowageOnArrivalName = towa.TowageOnArrivalName;
|
||||
if(!towa.TowageOnArrivalName.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalName = towa.TowageOnArrivalName;
|
||||
|
||||
hn_arrival.TowageOnArrivalOperator = new arrivaloperator();
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorCity = towa.TowageOnArrivalOperatorCity;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorCountry = towa.TowageOnArrivalOperatorCountry;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorPostalCode = towa.TowageOnArrivalOperatorPostalCode;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorStreetAndNumber = towa.TowageOnArrivalOperatorStreetNameAndNumber;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorFax = towa.TowageOnArrivalOperatorFax;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorPhone = towa.TowageOnArrivalOperatorPhone;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorEMail = towa.TowageOnArrivalOperatorEmail;
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorCompanyName = towa.TowageOnArrivalOperatorCompanyName;
|
||||
hn_arrival.TowageOnArrivalPurposeOfCall = towa.TowageOnArrivalPurposeOfCall;
|
||||
hn_arrival.TowageOnArrivalRemarks = towa.TowageOnArrivalRemarks;
|
||||
if(!towa.TowageOnArrivalOperatorCity.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorCity = towa.TowageOnArrivalOperatorCity;
|
||||
if(!towa.TowageOnArrivalOperatorCountry.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorCountry = towa.TowageOnArrivalOperatorCountry;
|
||||
if(!towa.TowageOnArrivalOperatorPostalCode.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorPostalCode = towa.TowageOnArrivalOperatorPostalCode;
|
||||
if(!towa.TowageOnArrivalOperatorStreetNameAndNumber.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorStreetAndNumber = towa.TowageOnArrivalOperatorStreetNameAndNumber;
|
||||
if(!towa.TowageOnArrivalOperatorFax.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorFax = towa.TowageOnArrivalOperatorFax;
|
||||
if(!towa.TowageOnArrivalOperatorPhone.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorPhone = towa.TowageOnArrivalOperatorPhone;
|
||||
if(!towa.TowageOnArrivalOperatorEmail.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorEMail = towa.TowageOnArrivalOperatorEmail;
|
||||
if(!towa.TowageOnArrivalOperatorCompanyName.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalOperator.TowageOnArrivalOperatorCompanyName = towa.TowageOnArrivalOperatorCompanyName;
|
||||
if(!towa.TowageOnArrivalPurposeOfCall.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalPurposeOfCall = towa.TowageOnArrivalPurposeOfCall;
|
||||
if(!towa.TowageOnArrivalRemarks.IsNullOrEmpty())
|
||||
hn_arrival.TowageOnArrivalRemarks = towa.TowageOnArrivalRemarks;
|
||||
}
|
||||
|
||||
items1ChoiceType.Add(Items1ChoiceType.TOWA);
|
||||
@ -1469,23 +1486,33 @@ namespace bsmd.hisnord
|
||||
hn_departure.TowageOnDepartureBeam_MTR = (float)towd.TowageOnDepartureBeam_MTR.Value;
|
||||
if (towd.TowageOnDepartureDraught_DMT.HasValue)
|
||||
hn_departure.TowageOnDepartureDraught_DMT = (float)towd.TowageOnDepartureDraught_DMT.Value;
|
||||
hn_departure.TowageOnDepartureFlag = towd.TowageOnDepartureFlag;
|
||||
hn_departure.TowageOnDepartureName = towd.TowageOnDepartureName;
|
||||
if(!towd.TowageOnDepartureFlag.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureFlag = towd.TowageOnDepartureFlag;
|
||||
if(!towd.TowageOnDepartureName.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureName = towd.TowageOnDepartureName;
|
||||
hn_departure.TowageOnDepartureOperator = new departureoperator();
|
||||
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorCity = towd.TowageOnDepartureOperatorCity;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorCountry = towd.TowageOnDepartureOperatorCountry;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorPostalCode = towd.TowageOnDepartureOperatorPostalCode;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorStreetAndNumber = towd.TowageOnDepartureOperatorStreetNameAndNumber;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorFax = towd.TowageOnDepartureOperatorFax;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorPhone = towd.TowageOnDepartureOperatorPhone;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorEMail = towd.TowageOnDepartureOperatorEmail;
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorCompanyName = towd.TowageOnDepartureOperatorCompanyName;
|
||||
if(!towd.TowageOnDepartureOperatorCity.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorCity = towd.TowageOnDepartureOperatorCity;
|
||||
if(!towd.TowageOnDepartureOperatorCountry.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorCountry = towd.TowageOnDepartureOperatorCountry;
|
||||
if(!towd.TowageOnDepartureOperatorPostalCode.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorPostalCode = towd.TowageOnDepartureOperatorPostalCode;
|
||||
if(!towd.TowageOnDepartureOperatorStreetNameAndNumber.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorStreetAndNumber = towd.TowageOnDepartureOperatorStreetNameAndNumber;
|
||||
if(!towd.TowageOnDepartureOperatorFax.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorFax = towd.TowageOnDepartureOperatorFax;
|
||||
if(!towd.TowageOnDepartureOperatorPhone.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorPhone = towd.TowageOnDepartureOperatorPhone;
|
||||
if(!towd.TowageOnDepartureOperatorEmail.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorEMail = towd.TowageOnDepartureOperatorEmail;
|
||||
if(!towd.TowageOnDepartureOperatorCompanyName.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureOperator.TowageOnDepartureOperatorCompanyName = towd.TowageOnDepartureOperatorCompanyName;
|
||||
|
||||
hn_departure.TowageOnDepartureLengthOverall_MTRSpecified = towd.TowageOnDepartureLengthOverall_MTR.HasValue;
|
||||
if (hn_departure.TowageOnDepartureLengthOverall_MTRSpecified)
|
||||
hn_departure.TowageOnDepartureLengthOverall_MTR = (float)towd.TowageOnDepartureLengthOverall_MTR.Value;
|
||||
hn_departure.TowageOnDepartureRemarks = towd.TowageOnDepartureRemarks;
|
||||
if(!towd.TowageOnDepartureRemarks.IsNullOrEmpty())
|
||||
hn_departure.TowageOnDepartureRemarks = towd.TowageOnDepartureRemarks;
|
||||
}
|
||||
|
||||
items1ChoiceType.Add(Items1ChoiceType.TOWD);
|
||||
|
||||
@ -71,12 +71,24 @@ namespace bsmd.hisnord
|
||||
if (xml.Name == "SystemError")
|
||||
{
|
||||
// Fehlernachricht
|
||||
SystemError systemError = SystemError.createFromXml(xml);
|
||||
SystemError systemError = SystemError.createFromXml(xml);
|
||||
|
||||
if (systemError != null)
|
||||
{
|
||||
{
|
||||
MessageCore aCore = DBManager.Instance.GetMessageCoreById(systemError.MessageCoreId);
|
||||
if (aCore != null)
|
||||
{
|
||||
Message.NotificationClass notificationClass;
|
||||
if (Enum.TryParse<Message.NotificationClass>(systemError.Meldetype, out notificationClass))
|
||||
{
|
||||
Message refMessage = DBManager.Instance.GetMessage(aCore, notificationClass);
|
||||
if(refMessage != null)
|
||||
{
|
||||
refMessage.InternalStatus = Message.BSMDStatus.SEND_FAILED;
|
||||
DBManager.Instance.Save(refMessage);
|
||||
}
|
||||
}
|
||||
|
||||
_log.InfoFormat("SystemError received for Core [{0}], IMO {1} ETA {2}: {3}", aCore.Id, aCore.IMO, aCore.ETADisplay, systemError.ErrorMessage);
|
||||
}
|
||||
else
|
||||
@ -124,6 +136,8 @@ namespace bsmd.hisnord
|
||||
|
||||
if (nswResponse.Status != null)
|
||||
{
|
||||
aMessage.ReceivedAt = nswResponse.ReceiveAt;
|
||||
|
||||
bool isAccepted = (nswResponse.Status == "ACCEPTED");
|
||||
if(isAccepted)
|
||||
{
|
||||
@ -133,33 +147,28 @@ namespace bsmd.hisnord
|
||||
{
|
||||
aMessage.InternalStatus = Message.BSMDStatus.VIOLATION;
|
||||
aMessage.StatusInfo = "Violations reported";
|
||||
}
|
||||
aMessage.ReceivedAt = nswResponse.ReceiveAt;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aMessage.Status = Message.MessageStatus.REJECTED;
|
||||
aMessage.InternalStatus = Message.BSMDStatus.ERROR;
|
||||
aMessage.StatusInfo = "Errors reported";
|
||||
}
|
||||
|
||||
DBManager.Instance.Save(aMessage);
|
||||
}
|
||||
}
|
||||
|
||||
#region Error / Violation handling
|
||||
|
||||
// "alte" Meldungen entfernen
|
||||
|
||||
foreach (MessageError existingError in aMessage.ErrorList)
|
||||
DBManager.Instance.Delete(existingError);
|
||||
|
||||
foreach (MessageViolation existingViolation in aMessage.ViolationList)
|
||||
DBManager.Instance.Delete(existingViolation);
|
||||
|
||||
foreach (MessageError messageError in nswResponse.Errors)
|
||||
{
|
||||
messageError.MessageHeaderId = aMessage.Id.Value;
|
||||
messageError.MessageHeader = aMessage;
|
||||
DBManager.Instance.Save(messageError);
|
||||
}
|
||||
if (!nswResponse.Violations.IsNullOrEmpty())
|
||||
aMessage.InternalStatus = Message.BSMDStatus.VIOLATION;
|
||||
|
||||
foreach (MessageViolation messageViolation in nswResponse.Violations)
|
||||
{
|
||||
@ -168,6 +177,21 @@ namespace bsmd.hisnord
|
||||
DBManager.Instance.Save(messageViolation);
|
||||
}
|
||||
|
||||
if (!nswResponse.Errors.IsNullOrEmpty())
|
||||
aMessage.InternalStatus = Message.BSMDStatus.ERROR;
|
||||
|
||||
foreach (MessageError messageError in nswResponse.Errors)
|
||||
{
|
||||
messageError.MessageHeaderId = aMessage.Id.Value;
|
||||
messageError.MessageHeader = aMessage;
|
||||
DBManager.Instance.Save(messageError);
|
||||
}
|
||||
|
||||
_log.InfoFormat("Saving Message {0} Status {1} InternalStatus {2}",
|
||||
aMessage.Id, aMessage.Status, aMessage.InternalStatus);
|
||||
|
||||
DBManager.Instance.Save(aMessage);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user