Zwischenstand - Validierungseditor und Validierungsattribute

This commit is contained in:
Daniel Schick 2017-10-01 14:10:09 +00:00
parent 867146eb54
commit 44cec6dd9f
58 changed files with 644 additions and 30 deletions

View File

@ -14,17 +14,23 @@ namespace ENI2.Controls
/// </summary> /// </summary>
public partial class ConditionGroupControl : UserControl public partial class ConditionGroupControl : UserControl
{ {
private ConditionGroup _conditionGroup;
public ConditionGroupControl() public ConditionGroupControl()
{ {
InitializeComponent(); InitializeComponent();
Loaded += ConditionGroupControl_Loaded; Loaded += ConditionGroupControl_Loaded;
} }
public ConditionGroup ConditionGroup { get; set; } public ConditionGroup ConditionGroup
{
get { return this._conditionGroup; }
set { this._conditionGroup = value; this.DataContext = value; }
}
private void ConditionGroupControl_Loaded(object sender, RoutedEventArgs e) private void ConditionGroupControl_Loaded(object sender, RoutedEventArgs e)
{ {
this.DataContext = this.ConditionGroup;
} }
} }
} }

View File

@ -0,0 +1,34 @@
<UserControl x:Class="ENI2.Controls.ValidationConditionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:db="clr-namespace:bsmd.database;assembly=bsmd.database"
xmlns:util="clr-namespace:ENI2.Util"
mc:Ignorable="d"
d:DesignHeight="150" d:DesignWidth="300">
<Grid Name="gridContent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition Width="0.2*" />
<ColumnDefinition Width="0.5*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="32" />
<RowDefinition Height="32" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textFieldName}" VerticalContentAlignment="Center"/>
<Label Grid.Row="0" Grid.Column="1" Content="{x:Static p:Resources.textOperator}" VerticalContentAlignment="Center"/>
<Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textValue}" VerticalContentAlignment="Center"/>
<ComboBox Name="comboBoxFieldName" Grid.Row="1" Grid.Column="0" Margin="2" />
<ComboBox Name="comboBoxOperator" Grid.Row="1" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
<TextBox Name="textBoxValue" Grid.Row="1" Grid.Column="2" Margin="2" Text="{Binding Value}" VerticalContentAlignment="Center" />
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textFailureMessage}" VerticalContentAlignment="Center" />
<TextBox Name="textBoxFailureMessage" Grid.Row="2" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="2" Text="{Binding ErrorMessage}"/>
</Grid>
</UserControl>

View File

@ -0,0 +1,49 @@
// Copyright (c) 2017 schick Informatik
// Description: Plugin Control für eine Validierungsbedingung
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using bsmd.database;
namespace ENI2.Controls
{
/// <summary>
/// Interaction logic for ValidationConditionControl.xaml
/// </summary>
public partial class ValidationConditionControl : UserControl
{
private ValidationCondition _validationCondition;
public ValidationConditionControl()
{
InitializeComponent();
Loaded += ValidationConditionControl_Loaded;
}
private void ValidationConditionControl_Loaded(object sender, RoutedEventArgs e)
{
this.comboBoxOperator.ItemsSource = Util.EnumHelper.GetAllValuesAndDescription(typeof(ValidationCondition.ConditionOperatorEnum));
}
public ValidationCondition ValidationCondition
{
get { return this._validationCondition; }
set { this.gridContent.DataContext = value; this._validationCondition = value; }
}
}
}

View File

@ -181,6 +181,9 @@
<Compile Include="Controls\RuleControl.xaml.cs"> <Compile Include="Controls\RuleControl.xaml.cs">
<DependentUpon>RuleControl.xaml</DependentUpon> <DependentUpon>RuleControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Controls\ValidationConditionControl.xaml.cs">
<DependentUpon>ValidationConditionControl.xaml</DependentUpon>
</Compile>
<Compile Include="CustomCommands.cs" /> <Compile Include="CustomCommands.cs" />
<Compile Include="DetailBaseControl.cs" /> <Compile Include="DetailBaseControl.cs" />
<Compile Include="DetailRootControl.xaml.cs"> <Compile Include="DetailRootControl.xaml.cs">
@ -354,6 +357,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Controls\ValidationConditionControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ControlTemplates.xaml"> <Page Include="ControlTemplates.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>

View File

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

View File

@ -21,6 +21,7 @@ namespace ENI2.EditControls
private ConditionGroup rootCondition; private ConditionGroup rootCondition;
private ObservableCollection<ConditionGroup> rootGroupList = new ObservableCollection<ConditionGroup>(); private ObservableCollection<ConditionGroup> rootGroupList = new ObservableCollection<ConditionGroup>();
private ConditionGroupControl groupControl = new ConditionGroupControl(); private ConditionGroupControl groupControl = new ConditionGroupControl();
private ValidationConditionControl vcControl = new ValidationConditionControl();
public EditRulesDialog() public EditRulesDialog()
{ {
@ -163,7 +164,9 @@ namespace ENI2.EditControls
else else
{ {
// Condition // Condition
this.groupBoxConditionDetails.Header = Properties.Resources.textValidationCondition;
this.vcControl.ValidationCondition = (ValidationCondition)treeViewRules.SelectedItem;
this.groupBoxConditionContainer.Children.Add(this.vcControl);
} }
} }
} }

View File

@ -1763,6 +1763,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Failure message.
/// </summary>
public static string textFailureMessage {
get {
return ResourceManager.GetString("textFailureMessage", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Fax. /// Looks up a localized string similar to Fax.
/// </summary> /// </summary>
@ -1781,6 +1790,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Field name.
/// </summary>
public static string textFieldName {
get {
return ResourceManager.GetString("textFieldName", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to First name. /// Looks up a localized string similar to First name.
/// </summary> /// </summary>
@ -4004,6 +4022,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Validation condition.
/// </summary>
public static string textValidationCondition {
get {
return ResourceManager.GetString("textValidationCondition", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Valid exemption. /// Looks up a localized string similar to Valid exemption.
/// </summary> /// </summary>
@ -4022,6 +4049,15 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Value.
/// </summary>
public static string textValue {
get {
return ResourceManager.GetString("textValue", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Vehicle licence plate. /// Looks up a localized string similar to Vehicle licence plate.
/// </summary> /// </summary>

View File

@ -1495,4 +1495,16 @@
<data name="textGroup" xml:space="preserve"> <data name="textGroup" xml:space="preserve">
<value>Group</value> <value>Group</value>
</data> </data>
<data name="textFailureMessage" xml:space="preserve">
<value>Failure message</value>
</data>
<data name="textFieldName" xml:space="preserve">
<value>Field name</value>
</data>
<data name="textValidationCondition" xml:space="preserve">
<value>Validation condition</value>
</data>
<data name="textValue" xml:space="preserve">
<value>Value</value>
</data>
</root> </root>

Binary file not shown.

View File

@ -9,7 +9,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
namespace bsmd.database namespace bsmd.database
@ -36,53 +35,63 @@ namespace bsmd.database
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("AGNT.AgentCompanyName")] [LookupName("AGNT.AgentCompanyName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentCompanyName { get; set; } public string AgentCompanyName { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentStreetAndNumber")] [LookupName("AGNT.AgentStreetAndNumber")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentStreetAndNumber { get; set; } public string AgentStreetAndNumber { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentPostalCode")] [LookupName("AGNT.AgentPostalCode")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentPostalCode { get; set; } public string AgentPostalCode { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentCity")] [LookupName("AGNT.AgentCity")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentCity { get; set; } public string AgentCity { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentCountry")] [LookupName("AGNT.AgentCountry")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentCountry { get; set; } public string AgentCountry { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentLastName")] [LookupName("AGNT.AgentLastName")]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentLastName { get; set; } public string AgentLastName { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentFirstName")] [LookupName("AGNT.AgentFirstName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentFirstName { get; set; } public string AgentFirstName { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("AGNT.AgentPhone")] [LookupName("AGNT.AgentPhone")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentPhone { get; set; } public string AgentPhone { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentFax")] [LookupName("AGNT.AgentFax")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentFax { get; set; } public string AgentFax { get; set; }
[ShowReport] [ShowReport]
[LookupName("AGNT.AgentEMail")] [LookupName("AGNT.AgentEMail")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string AgentEMail { get; set; } public string AgentEMail { get; set; }
#endregion #endregion

View File

@ -8,7 +8,6 @@
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved. // Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
using System; using System;
using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Collections.Generic; using System.Collections.Generic;
@ -27,6 +26,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.TIME_IMPLAUSIBLE)] [Validation(ValidationCode.TIME_IMPLAUSIBLE)]
[LookupName("ATA.ATAPortOfCall")] [LookupName("ATA.ATAPortOfCall")]
[ENI2Validation]
public DateTime? ATAPortOfCall { get; set; } public DateTime? ATAPortOfCall { get; set; }
#endregion #endregion

View File

@ -8,7 +8,6 @@
// Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved. // Copyright (c) 2015 Informatikbüro Daniel Schick. All rights reserved.
using System; using System;
using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Collections.Generic; using System.Collections.Generic;
@ -27,6 +26,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.TIME_IMPLAUSIBLE)] [Validation(ValidationCode.TIME_IMPLAUSIBLE)]
[LookupName("ATD.ATDPortOfCall")] [LookupName("ATD.ATDPortOfCall")]
[ENI2Validation]
public DateTime? ATDPortOfCall { get; set; } public DateTime? ATDPortOfCall { get; set; }
#endregion #endregion

View File

@ -27,10 +27,12 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string BunkerFuelType { get; set; } public string BunkerFuelType { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? BunkerFuelQuantity_TNE { get; set; } public double? BunkerFuelQuantity_TNE { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,10 +28,12 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? StowawaysOnBoard { get; set; } public bool? StowawaysOnBoard { get; set; }
[LookupName("BPOL.CruiseShip")] [LookupName("BPOL.CruiseShip")]
[ENI2Validation]
public bool? CruiseShip { get; set; } public bool? CruiseShip { get; set; }
public List<PortOfItinerary> PortOfItineraries { get { return this.poi; } } public List<PortOfItinerary> PortOfItineraries { get { return this.poi; } }

View File

@ -27,10 +27,12 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string BunkerFuelType { get; set; } public string BunkerFuelType { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? BunkerFuelQuantity_TNE { get; set; } public double? BunkerFuelQuantity_TNE { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,21 +28,25 @@ namespace bsmd.database
[ReportDisplayName("Last name")] [ReportDisplayName("Last name")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CrewMemberLastName { get; set; } public string CrewMemberLastName { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("First name")] [ReportDisplayName("First name")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CrewMemberFirstName { get; set; } public string CrewMemberFirstName { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Place of birth")] [ReportDisplayName("Place of birth")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CrewMemberPlaceOfBirth { get; set; } public string CrewMemberPlaceOfBirth { get; set; }
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? CrewMemberDateOfBirth { get; set; } public DateTime? CrewMemberDateOfBirth { get; set; }
[ShowReport] [ShowReport]
@ -56,7 +60,8 @@ namespace bsmd.database
return string.Empty; return string.Empty;
} }
} }
[ENI2Validation]
public byte? CrewMemberGender { get; set; } public byte? CrewMemberGender { get; set; }
[ShowReport] [ShowReport]
@ -67,9 +72,11 @@ namespace bsmd.database
[ReportDisplayName("Nationality")] [ReportDisplayName("Nationality")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(2)] [MaxLength(2)]
[ENI2Validation]
public string CrewMemberNationality { get; set; } public string CrewMemberNationality { get; set; }
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? CrewMemberIdentityDocumentType { get; set; } public byte? CrewMemberIdentityDocumentType { get; set; }
[ShowReport] [ShowReport]
@ -80,20 +87,24 @@ namespace bsmd.database
[ReportDisplayName("Identity document id")] [ReportDisplayName("Identity document id")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CrewMemberIdentityDocumentId { get; set; } public string CrewMemberIdentityDocumentId { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Visa number")] [ReportDisplayName("Visa number")]
// [Validation(ValidationCode.NOT_NULL)] // [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CrewMemberVisaNumber { get; set; } public string CrewMemberVisaNumber { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Duty")] [ReportDisplayName("Duty")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CrewMemberDuty { get; set; } public string CrewMemberDuty { get; set; }
[ENI2Validation]
public bool IsDeparture { get; set; } public bool IsDeparture { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -27,10 +27,12 @@ namespace bsmd.database
public NOA_NOD NOA_NOD { get; set; } public NOA_NOD NOA_NOD { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int CallPurposeCode { get; set; } public int CallPurposeCode { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CallPurposeDescription { get; set; } public string CallPurposeDescription { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -29,33 +29,43 @@ namespace bsmd.database
#region Properties #region Properties
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Name { get; set; } public string Name { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string Phone { get; set; } public string Phone { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Email { get; set; } public string Email { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string ContactFirstName { get; set; } public string ContactFirstName { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string ContactLastName { get; set; } public string ContactLastName { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string StreetAndNumber { get; set; } public string StreetAndNumber { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string PostalCode { get; set; } public string PostalCode { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string City { get; set; } public string City { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string Country { get; set; } public string Country { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string CustomerNumber { get; set; } public string CustomerNumber { get; set; }
#endregion #endregion

View File

@ -29,40 +29,51 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? NoDPGOnBoardOnArrival { get; set; } public bool? NoDPGOnBoardOnArrival { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? DPGManifestOnBoardOnArrival { get; set; } public bool? DPGManifestOnBoardOnArrival { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public byte? INFShipClass { get; set; } public byte? INFShipClass { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? MOUBaltic { get; set; } public bool? MOUBaltic { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? DPGClassificationIMDG { get; set; } public bool? DPGClassificationIMDG { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? DPGClassificationIGC { get; set; } public bool? DPGClassificationIGC { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? DPGClassificationIBC { get; set; } public bool? DPGClassificationIBC { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? DPGClassificationIMSBC { get; set; } public bool? DPGClassificationIMSBC { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? DPGClassificationMARPOL_ANNEX_I { get; set; } public bool? DPGClassificationMARPOL_ANNEX_I { get; set; }
// DK // DK
[ENI2Validation]
public string DPGContactFamilyName { get; set; } public string DPGContactFamilyName { get; set; }
// DK // DK
[ENI2Validation]
public string DPGContactPhone { get; set; } public string DPGContactPhone { get; set; }
public List<IMDGPosition> IMDGPositions { get { return this.imdgPositions; } } public List<IMDGPosition> IMDGPositions { get { return this.imdgPositions; } }
public List<IBCPosition> IBCPositions { get { return this.ibcPositions; } } public List<IBCPosition> IBCPositions { get { return this.ibcPositions; } }
public List<IGCPosition> IGCPositions { get { return this.igcPositions; } } public List<IGCPosition> IGCPositions { get { return this.igcPositions; } }
@ -73,6 +84,7 @@ namespace bsmd.database
// selektor HAZA / HAZD // selektor HAZA / HAZD
[ShowReport] [ShowReport]
[ENI2Validation]
public bool IsDeparture { public bool IsDeparture {
get { return this._isDeparture; } get { return this._isDeparture; }
set { this._isDeparture = value; } set { this._isDeparture = value; }
@ -82,6 +94,7 @@ namespace bsmd.database
/// No NSW field! Set to determine whether HAZ info should be reported to the NSW /// No NSW field! Set to determine whether HAZ info should be reported to the NSW
/// </summary> /// </summary>
[ShowReport] [ShowReport]
[ENI2Validation]
public string TransmissionType { get; set; } public string TransmissionType { get; set; }
public bool HasPositions public bool HasPositions

View File

@ -59,11 +59,13 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ProductName { get; set; } public string ProductName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? PollutionCategory { get; set; } public byte? PollutionCategory { get; set; }
public string PollutionCategoryDisplay public string PollutionCategoryDisplay
@ -77,6 +79,7 @@ namespace bsmd.database
} }
[ShowReport] [ShowReport]
[ENI2Validation]
public byte? Hazards { get; set; } public byte? Hazards { get; set; }
public string HazardsDisplay public string HazardsDisplay
@ -91,6 +94,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? FlashpointInformation { get; set; } public byte? FlashpointInformation { get; set; }
public string FlashpointInformationDisplay public string FlashpointInformationDisplay
@ -105,32 +109,39 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(11)] [MaxLength(11)]
[ENI2Validation]
public string Flashpoint_CEL { get; set; } public string Flashpoint_CEL { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? Quantity_KGM { get; set; } public double? Quantity_KGM { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string StowagePosition { get; set; } public string StowagePosition { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfLoading { get; set; } public string PortOfLoading { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfDischarge { get; set; } public string PortOfDischarge { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? SpecRef15_19 { get; set; } public bool? SpecRef15_19 { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Remarks { get; set; } public string Remarks { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,38 +28,46 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(4)] [MaxLength(4)]
[ENI2Validation]
public string UNNumber { get; set; } public string UNNumber { get; set; }
[ShowReport] [ShowReport]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string IMOClass { get; set; } public string IMOClass { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ProductName { get; set; } public string ProductName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? Quantity_KGM { get; set; } public double? Quantity_KGM { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string StowagePosition { get; set; } public string StowagePosition { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfLoading { get; set; } public string PortOfLoading { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfDischarge { get; set; } public string PortOfDischarge { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Remarks { get; set; } public string Remarks { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -32,125 +32,158 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string UNNumber { get; set; } public string UNNumber { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public byte? PackingGroup { get; set; } public byte? PackingGroup { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ProperShippingName { get; set; } public string ProperShippingName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string IMOClass { get; set; } public string IMOClass { get; set; }
[ShowReport] [ShowReport]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string CompatibilityGroup { get; set; } public string CompatibilityGroup { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string TechnicalName { get; set; } public string TechnicalName { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? NetExplosiveMass_KGM { get; set; } public double? NetExplosiveMass_KGM { get; set; }
[ShowReport] [ShowReport]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string Flashpoint_CEL { get; set; } public string Flashpoint_CEL { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Class7NuclideName { get; set; } public string Class7NuclideName { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? Class7MaxActivity_BQL { get; set; } public double? Class7MaxActivity_BQL { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int? Class7Category { get; set; } public int? Class7Category { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? Class7TransportIndex { get; set; } public double? Class7TransportIndex { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int? Class7CSI { get; set; } public int? Class7CSI { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? ControlTemperature_CEL { get; set; } public double? ControlTemperature_CEL { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? EmergencyTemperature_CEL { get; set; } public double? EmergencyTemperature_CEL { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? MarinePollutant { get; set; } public bool? MarinePollutant { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public int? NumberOfPackages { get; set; } public int? NumberOfPackages { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string PackageType { get; set; } public string PackageType { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? LimitedQuantities { get; set; } public bool? LimitedQuantities { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? ExceptedQuantities { get; set; } public bool? ExceptedQuantities { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? NetQuantity_KGM { get; set; } public double? NetQuantity_KGM { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? GrossQuantity_KGM { get; set; } public double? GrossQuantity_KGM { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? Volume_MTQ { get; set; } public double? Volume_MTQ { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? GeneralCargoIBC { get; set; } public bool? GeneralCargoIBC { get; set; }
[ShowReport] [ShowReport]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string ContainerNumber { get; set; } public string ContainerNumber { get; set; }
[ShowReport] [ShowReport]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string VehicleLicenseNumber { get; set; } public string VehicleLicenseNumber { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string StowagePosition { get; set; } public string StowagePosition { get; set; }
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string Bay { get; set; } public string Bay { get; set; }
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string Row { get; set; } public string Row { get; set; }
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string Tier { get; set; } public string Tier { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfLoading { get; set; } public string PortOfLoading { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfDischarge { get; set; } public string PortOfDischarge { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Remarks { get; set; } public string Remarks { get; set; }
public List<SubsidiaryRisks> SubsidiaryRiskList { get { return this.subsidiaryRisksList; } } public List<SubsidiaryRisks> SubsidiaryRiskList { get { return this.subsidiaryRisksList; } }
@ -158,6 +191,7 @@ namespace bsmd.database
/// <summary> /// <summary>
/// Hilfsproperty, um subsidiary risks als kommaseparierte Liste anzuzeigen (ENI-2) /// Hilfsproperty, um subsidiary risks als kommaseparierte Liste anzuzeigen (ENI-2)
/// </summary> /// </summary>
[ENI2Validation]
public string SubsidiaryRiskText public string SubsidiaryRiskText
{ {
get get

View File

@ -29,41 +29,50 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string BulkCargoShippingName { get; set; } public string BulkCargoShippingName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? MHB { get; set; } public bool? MHB { get; set; }
[ShowReport] [ShowReport]
[MaxLength(4)] [MaxLength(4)]
[ENI2Validation]
public string UNNumber { get; set; } public string UNNumber { get; set; }
[ShowReport] [ShowReport]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string IMOClass { get; set; } public string IMOClass { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? Quantity_KGM { get; set; } public double? Quantity_KGM { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string StowagePosition { get; set; } public string StowagePosition { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfLoading { get; set; } public string PortOfLoading { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfDischarge { get; set; } public string PortOfDischarge { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Remarks { get; set; } public string Remarks { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -25,46 +25,56 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? ShippingArea { get; set; } public byte? ShippingArea { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("INFO.RequestedPositionInPortOfCall")] [LookupName("INFO.RequestedPositionInPortOfCall")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string RequestedPositionInPortOfCall { get; set; } public string RequestedPositionInPortOfCall { get; set; }
[ShowReport] [ShowReport]
[LookupName("INFO.SpecialRequirementsOfShipAtBerth")] [LookupName("INFO.SpecialRequirementsOfShipAtBerth")]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string SpecialRequirementsOfShipAtBerth { get; set; } public string SpecialRequirementsOfShipAtBerth { get; set; }
[ShowReport] [ShowReport]
[LookupName("INFO.ConstructionCharacteristicsOfShip")] [LookupName("INFO.ConstructionCharacteristicsOfShip")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ConstructionCharacteristicsOfShip { get; set; } public string ConstructionCharacteristicsOfShip { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? FumigatedBulkCargo { get; set; } public byte? FumigatedBulkCargo { get; set; }
[ShowReport] [ShowReport]
[LookupName("INFO.DeadWeightSummer_TNE")] [LookupName("INFO.DeadWeightSummer_TNE")]
[ENI2Validation]
public double? DeplacementSummerDraught_TNE { get; set; } public double? DeplacementSummerDraught_TNE { get; set; }
[ShowReport] [ShowReport]
[LookupName("INFO.PortArea")] [LookupName("INFO.PortArea")]
// [Validation(ValidationCode.NOT_NULL)] // ist bei NOK Transit leer // [Validation(ValidationCode.NOT_NULL)] // ist bei NOK Transit leer
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string PortArea { get; set; } public string PortArea { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string BowThrusterPower { get; set; } public string BowThrusterPower { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string SternThrusterPower { get; set; } public string SternThrusterPower { get; set; }
[MaxLength(4)] [MaxLength(4)]
[LookupName("INFO.PortFacility")] [LookupName("INFO.PortFacility")]
[ENI2Validation]
public string PortFacility { get; set; } public string PortFacility { get; set; }
#endregion #endregion

View File

@ -28,9 +28,11 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string InfectedAreaPort { get; set; } public string InfectedAreaPort { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public DateTime? InfectedAreaDate { get; set; } public DateTime? InfectedAreaDate { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -56,6 +56,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? CargoHandlingType { get; set; } public byte? CargoHandlingType { get; set; }
/// <summary> /// <summary>
@ -76,28 +77,35 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.TWO_DIGIT)] [Validation(ValidationCode.TWO_DIGIT)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string CargoCodeNST { get; set; } public string CargoCodeNST { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int? CargoLACode { get; set; } public int? CargoLACode { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int? CargoNumberOfItems { get; set; } public int? CargoNumberOfItems { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? CargoGrossQuantity_TNE { get; set; } public double? CargoGrossQuantity_TNE { get; set; }
[MaxLength(5)] [MaxLength(5)]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[ENI2Validation]
public string PortOfLoading { get; set; } public string PortOfLoading { get; set; }
[MaxLength(5)] [MaxLength(5)]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[ENI2Validation]
public string PortOfDischarge { get; set; } public string PortOfDischarge { get; set; }
[MaxLength(1)] [MaxLength(1)]
[ShowReport] [ShowReport]
[ENI2Validation]
public string CargoCodeNST_3 { get; set; } public string CargoCodeNST_3 { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,35 +28,43 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PortFacilityPortName { get; set; } public string PortFacilityPortName { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PortFacilityPortCountry { get; set; } public string PortFacilityPortCountry { get; set; }
[ShowReport] [ShowReport]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortFacilityPortLoCode { get; set; } public string PortFacilityPortLoCode { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? PortFacilityDateOfArrival { get; set; } public DateTime? PortFacilityDateOfArrival { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? PortFacilityDateOfDeparture { get; set; } public DateTime? PortFacilityDateOfDeparture { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? PortFacilityShipSecurityLevel { get; set; } public byte? PortFacilityShipSecurityLevel { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string PortFacilitySecurityMattersToReport { get; set; } public string PortFacilitySecurityMattersToReport { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.GISIS)] [Validation(ValidationCode.GISIS)]
[MaxLength(4)] [MaxLength(4)]
[ENI2Validation]
public string PortFacilityGISISCode { get; set; } public string PortFacilityGISISCode { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -29,10 +29,12 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Name { get; set; } public string Name { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? FlashpointInformation { get; set; } public byte? FlashpointInformation { get; set; }
public string FlashpointInformationDisplay public string FlashpointInformationDisplay
@ -47,29 +49,35 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string Flashpoint_CEL { get; set; } public string Flashpoint_CEL { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? Quantity_KGM { get; set; } public double? Quantity_KGM { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string StowagePosition { get; set; } public string StowagePosition { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfLoading { get; set; } public string PortOfLoading { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[ENI2Validation]
[MaxLength(5)] [MaxLength(5)]
public string PortOfDischarge { get; set; } public string PortOfDischarge { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Remarks { get; set; } public string Remarks { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -42,121 +42,146 @@ namespace bsmd.database
public List<InfectedArea> InfectedAreas { get { return this.infectedAreas; } } public List<InfectedArea> InfectedAreas { get { return this.infectedAreas; } }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? MDHSimplification { get; set; } public bool? MDHSimplification { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.LOCODE_GER)] [Validation1(ValidationCode.LOCODE_GER)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfCallWhereCompleteMDHNotified { get; set; } public string PortOfCallWhereCompleteMDHNotified { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.NonAccidentialDeathsDuringVoyage")] [LookupName("MDH.NonAccidentialDeathsDuringVoyage")]
[ENI2Validation]
public bool? NonAccidentalDeathsDuringVoyage { get; set; } public bool? NonAccidentalDeathsDuringVoyage { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.NonAccidentialDeathsDuringVoyageCount")] [LookupName("MDH.NonAccidentialDeathsDuringVoyageCount")]
[ENI2Validation]
public int? NonAccidentalDeathsDuringVoyageCount { get; set; } public int? NonAccidentalDeathsDuringVoyageCount { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.SuspisionInfectiousNature")] [LookupName("MDH.SuspisionInfectiousNature")]
[ENI2Validation]
public bool? SuspisionInfectiousNature { get; set; } public bool? SuspisionInfectiousNature { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.NumberOfIllPersonsHigherThanExpected")] [LookupName("MDH.NumberOfIllPersonsHigherThanExpected")]
[ENI2Validation]
public bool? NumberOfIllPersonsHigherThanExpected { get; set; } public bool? NumberOfIllPersonsHigherThanExpected { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.NumberOfIllPersons")] [LookupName("MDH.NumberOfIllPersons")]
[ENI2Validation]
public int? NumberOfIllPersons { get; set; } public int? NumberOfIllPersons { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.SickPersonsOnBoard")] [LookupName("MDH.SickPersonsOnBoard")]
[ENI2Validation]
public bool? SickPersonsOnBoard { get; set; } public bool? SickPersonsOnBoard { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.MedicalConsulted")] [LookupName("MDH.MedicalConsulted")]
[ENI2Validation]
public bool? MedicalConsulted { get; set; } public bool? MedicalConsulted { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.AwareOfConditionsForFurtherInfections")] [LookupName("MDH.AwareOfConditionsForFurtherInfections")]
[ENI2Validation]
public bool? AwareOfFurtherInfections { get; set; } public bool? AwareOfFurtherInfections { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.SanitaryMeasuresApplied")] [LookupName("MDH.SanitaryMeasuresApplied")]
[ENI2Validation]
public bool? SanitaryMeasuresApplied { get; set; } public bool? SanitaryMeasuresApplied { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.SanitaryMeasuresType_1")] // TODO: NSW 3.0: wird ein Array [LookupName("MDH.SanitaryMeasuresType_1")] // TODO: NSW 3.0: wird ein Array
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string SanitaryMeasuresType { get; set; } public string SanitaryMeasuresType { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.SanitaryMeasuresLocation_1")] [LookupName("MDH.SanitaryMeasuresLocation_1")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string SanitaryMeasuresLocation { get; set; } public string SanitaryMeasuresLocation { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.SanitaryMeasuresDate_1")] [LookupName("MDH.SanitaryMeasuresDate_1")]
[ENI2Validation]
public DateTime? SanitaryMeasuresDate { get; set; } public DateTime? SanitaryMeasuresDate { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.StowawaysDetected")] [LookupName("MDH.StowawaysDetected")]
[ENI2Validation]
public bool? StowawaysDetected { get; set; } public bool? StowawaysDetected { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.StowawaysJoiningLocation_1")] // TODO: NSW 3.0: wird ein Array [LookupName("MDH.StowawaysJoiningLocation_1")] // TODO: NSW 3.0: wird ein Array
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string StowawaysJoiningLocation { get; set; } public string StowawaysJoiningLocation { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.SickAnimalOrPetOnBoard")] [LookupName("MDH.SickAnimalOrPetOnBoard")]
[ENI2Validation]
public bool? SickAnimalOrPetOnBoard { get; set; } public bool? SickAnimalOrPetOnBoard { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.ValidSanitaryControlExemptionOrCertificateOnBoard")] [LookupName("MDH.ValidSanitaryControlExemptionOrCertificateOnBoard")]
[ENI2Validation]
public bool? ValidSanitaryControlExemptionOrCertificateOnBoard { get; set; } public bool? ValidSanitaryControlExemptionOrCertificateOnBoard { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.PlaceOfIssue")] [LookupName("MDH.PlaceOfIssue")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PlaceOfIssue { get; set; } public string PlaceOfIssue { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.DateOfIssue")] [LookupName("MDH.DateOfIssue")]
[ENI2Validation]
public DateTime? DateOfIssue { get; set; } public DateTime? DateOfIssue { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.SanitaryControlReinspectionRequired")] [LookupName("MDH.SanitaryControlReinspectionRequired")]
[ENI2Validation]
public bool? SanitaryControlReinspectionRequired { get; set; } public bool? SanitaryControlReinspectionRequired { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("MDH.InfectedAreaVisited")] [LookupName("MDH.InfectedAreaVisited")]
[ENI2Validation]
public bool? InfectedAreaVisited { get; set; } public bool? InfectedAreaVisited { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.InfectedAreaPort_1")] // TODO: NSW 3.0: wird ein Array [LookupName("MDH.InfectedAreaPort_1")] // TODO: NSW 3.0: wird ein Array
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string InfectedAreaPort { get; set; } public string InfectedAreaPort { get; set; }
[ShowReport] [ShowReport]
[LookupName("MDH.InfectedAreaDate_1")] [LookupName("MDH.InfectedAreaDate_1")]
[ENI2Validation]
public DateTime? InfectedAreaDate { get; set; } public DateTime? InfectedAreaDate { get; set; }
/// <summary> /// <summary>
/// Hilfsproperty, um eine kommaseparierte Liste von JoiningLocation (analog ANSW) im ENI-2 anzuzeigen, /// Hilfsproperty, um eine kommaseparierte Liste von JoiningLocation (analog ANSW) im ENI-2 anzuzeigen,
/// </summary> /// </summary>
[ENI2Validation]
public string StowawaysJoiningLocationText public string StowawaysJoiningLocationText
{ {
get get

View File

@ -85,9 +85,11 @@ namespace bsmd.database
#region Properties #region Properties
[MaxLength(25)] [MaxLength(25)]
[ENI2Validation]
public string VisitId { get; set; } public string VisitId { get; set; }
[MaxLength(25)] [MaxLength(25)]
[ENI2Validation]
public string TransitId { get; set; } public string TransitId { get; set; }
/// <summary> /// <summary>
@ -104,19 +106,25 @@ namespace bsmd.database
} }
[MaxLength(7)] [MaxLength(7)]
[ENI2Validation]
public string IMO { get; set; } public string IMO { get; set; }
[MaxLength(8)] [MaxLength(8)]
[ENI2Validation]
public string ENI { get; set; } public string ENI { get; set; }
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PoC { get; set; } public string PoC { get; set; }
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string Portname { get; set; } public string Portname { get; set; }
[ENI2Validation]
public DateTime? ETA { get; set; } public DateTime? ETA { get; set; }
[ENI2Validation]
public DateTime? ETAKielCanal { get; set; } public DateTime? ETAKielCanal { get; set; }
public DateTime? ETADisplay public DateTime? ETADisplay
@ -129,12 +137,16 @@ namespace bsmd.database
get { return this.IsTransit ? "NOK" : this.Portname; } get { return this.IsTransit ? "NOK" : this.Portname; }
} }
[ENI2Validation]
public bool IsTransit { get; set; } public bool IsTransit { get; set; }
[ENI2Validation]
public bool Incoming { get; set; } // tbd: für HIS-NORD, mal sehen ob das so bleibt public bool Incoming { get; set; } // tbd: für HIS-NORD, mal sehen ob das so bleibt
[ENI2Validation]
public BSMDStatus BSMDStatusInternal { get; set; } public BSMDStatus BSMDStatusInternal { get; set; }
[ENI2Validation]
public Message.NSWProvider InitialHIS { get; set; } public Message.NSWProvider InitialHIS { get; set; }
public Guid? HerbergFormGuid { get; set; } public Guid? HerbergFormGuid { get; set; }

View File

@ -28,6 +28,7 @@ namespace bsmd.database
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("NAME.NameOfMaster")] [LookupName("NAME.NameOfMaster")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string NameOfMaster { get; set; } public string NameOfMaster { get; set; }
#endregion #endregion

View File

@ -28,10 +28,12 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? ETAToPortOfCall { get; set; } public DateTime? ETAToPortOfCall { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? ETDFromPortOfCall { get; set; } public DateTime? ETDFromPortOfCall { get; set; }
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
@ -39,28 +41,35 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? ETAToKielCanal { get; set; } public DateTime? ETAToKielCanal { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? ETDFromKielCanal { get; set; } public DateTime? ETDFromKielCanal { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string LastPort { get; set; } public string LastPort { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public DateTime? ETDFromLastPort { get; set; } public DateTime? ETDFromLastPort { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string NextPort { get; set; } public string NextPort { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public DateTime? ETAToNextPort { get; set; } public DateTime? ETAToNextPort { get; set; }
[ENI2Validation]
public bool? IsAnchored { get; set; } public bool? IsAnchored { get; set; }
#endregion #endregion

View File

@ -28,22 +28,26 @@ namespace bsmd.database
[ReportDisplayName("Last name")] [ReportDisplayName("Last name")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PassengerLastName { get; set; } public string PassengerLastName { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("First name")] [ReportDisplayName("First name")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PassengerFirstName { get; set; } public string PassengerFirstName { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Place of birth")] [ReportDisplayName("Place of birth")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PassengerPlaceOfBirth { get; set; } public string PassengerPlaceOfBirth { get; set; }
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? PassengerDateOfBirth { get; set; } public DateTime? PassengerDateOfBirth { get; set; }
[ShowReport] [ShowReport]
@ -57,6 +61,7 @@ namespace bsmd.database
} }
} }
[ENI2Validation]
public byte? PassengerGender { get; set; } public byte? PassengerGender { get; set; }
[ShowReport] [ShowReport]
@ -67,9 +72,11 @@ namespace bsmd.database
[ReportDisplayName("Nationality")] [ReportDisplayName("Nationality")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(2)] [MaxLength(2)]
[ENI2Validation]
public string PassengerNationality { get; set; } public string PassengerNationality { get; set; }
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? PassengerIdentityDocumentType { get; set; } public byte? PassengerIdentityDocumentType { get; set; }
[ShowReport] [ShowReport]
@ -80,32 +87,38 @@ namespace bsmd.database
[ReportDisplayName("Identity document id")] [ReportDisplayName("Identity document id")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PassengerIdentityDocumentId { get; set; } public string PassengerIdentityDocumentId { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Visa number")] [ReportDisplayName("Visa number")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PassengerVisaNumber { get; set; } public string PassengerVisaNumber { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Port of embarkation")] [ReportDisplayName("Port of embarkation")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PassengerPortOfEmbarkation { get; set; } public string PassengerPortOfEmbarkation { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("Port of disembarkation")] [ReportDisplayName("Port of disembarkation")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PassengerPortOfDisembarkation { get; set; } public string PassengerPortOfDisembarkation { get; set; }
[ShowReport] [ShowReport]
[ReportDisplayName("In transit")] [ReportDisplayName("In transit")]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? PassengerInTransit { get; set; } public bool? PassengerInTransit { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }
[ENI2Validation]
public bool IsDeparture { get; set; } public bool IsDeparture { get; set; }

View File

@ -26,22 +26,28 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.INT_GT_ZERO)] [Validation(ValidationCode.INT_GT_ZERO)]
[LookupName("POBA.TotalPersonsOnBoardUponArrival")] [LookupName("POBA.TotalPersonsOnBoardUponArrival")]
[ENI2Validation]
public int? TotalPersonsOnBoardUponArrival { get; set; } public int? TotalPersonsOnBoardUponArrival { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.INT_GT_ZERO)] [Validation(ValidationCode.INT_GT_ZERO)]
[LookupName("POBA.TotalCrewMembersOnBoardUponArrival")] [LookupName("POBA.TotalCrewMembersOnBoardUponArrival")]
[ENI2Validation]
public int? TotalCrewMembersOnBoardUponArrival { get; set; } public int? TotalCrewMembersOnBoardUponArrival { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("POBA.TotalPassengersOnBoardUponArrival")] [LookupName("POBA.TotalPassengersOnBoardUponArrival")]
[ENI2Validation]
public int? TotalPassengersOnBoardUponArrival { get; set; } public int? TotalPassengersOnBoardUponArrival { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("POBA.TotalStowawaysOnBoardUponArrival")] [LookupName("POBA.TotalStowawaysOnBoardUponArrival")]
[ENI2Validation]
public int? TotalStowawaysOnBoardUponArrival { get; set; } public int? TotalStowawaysOnBoardUponArrival { get; set; }
#endregion #endregion
#region DatabaseEntity implementation
public override string Subtitle public override string Subtitle
{ {
get get
@ -116,5 +122,8 @@ namespace bsmd.database
reader.Close(); reader.Close();
return result; return result;
} }
#endregion
} }
} }

View File

@ -26,18 +26,22 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.INT_GT_ZERO)] [Validation(ValidationCode.INT_GT_ZERO)]
[LookupName("POBD.TotalPersonsOnBoardUponDeparture")] [LookupName("POBD.TotalPersonsOnBoardUponDeparture")]
[ENI2Validation]
public int? TotalPersonsOnBoardUponDeparture { get; set; } public int? TotalPersonsOnBoardUponDeparture { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.INT_GT_ZERO)] [Validation(ValidationCode.INT_GT_ZERO)]
[LookupName("POBD.TotalCrewMembersOnBoardUponDeparture")] [LookupName("POBD.TotalCrewMembersOnBoardUponDeparture")]
[ENI2Validation]
public int? TotalCrewMembersOnBoardUponDeparture { get; set; } public int? TotalCrewMembersOnBoardUponDeparture { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("POBD.TotalPassengersOnBoardUponDeparture")] [LookupName("POBD.TotalPassengersOnBoardUponDeparture")]
[ENI2Validation]
public int? TotalPassengersOnBoardUponDeparture { get; set; } public int? TotalPassengersOnBoardUponDeparture { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("POBD.TotalStowawaysOnBoardUponDeparture")] [LookupName("POBD.TotalStowawaysOnBoardUponDeparture")]
[ENI2Validation]
public int? TotalStowawaysOnBoardUponDeparture { get; set; } public int? TotalStowawaysOnBoardUponDeparture { get; set; }
public override string Subtitle public override string Subtitle
@ -50,6 +54,8 @@ namespace bsmd.database
#endregion #endregion
#region Database Entity implementation
public override void PrepareSave(System.Data.IDbCommand cmd) public override void PrepareSave(System.Data.IDbCommand cmd)
{ {
@ -115,5 +121,8 @@ namespace bsmd.database
reader.Close(); reader.Close();
return result; return result;
} }
#endregion
} }
} }

View File

@ -27,48 +27,59 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("PRE72H.Tanker")] [LookupName("PRE72H.Tanker")]
[ENI2Validation]
public bool? Tanker { get; set; } public bool? Tanker { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public byte? TankerHullConfiguration { get; set; } public byte? TankerHullConfiguration { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public byte? ConditionCargoBallastTanks { get; set; } public byte? ConditionCargoBallastTanks { get; set; }
[ShowReport] [ShowReport]
[LookupName("PRE72H.NaturOfCargo")] [LookupName("PRE72H.NaturOfCargo")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string NatureOfCargo { get; set; } public string NatureOfCargo { get; set; }
[ShowReport] [ShowReport]
[LookupName("PRE72H.VolumeOfCargo_TNE")] [LookupName("PRE72H.VolumeOfCargo_TNE")]
[ENI2Validation]
public double? VolumeOfCargo { get; set; } public double? VolumeOfCargo { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("PRE72H.PlannedOperations")] [LookupName("PRE72H.PlannedOperations")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PlannedOperations { get; set; } public string PlannedOperations { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
// nach Util verschoben // nach Util verschoben
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string PlannedWorks { get; set; } public string PlannedWorks { get; set; }
[ShowReport] [ShowReport]
[LookupName("PRE72H.DateOfLastExpandedInspection")] [LookupName("PRE72H.DateOfLastExpandedInspection")]
[ENI2Validation]
public DateTime? DateOfLastExpandedInspection { get; set; } public DateTime? DateOfLastExpandedInspection { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[LookupName("PRE72H.PlannedPeriodOfStay_HUR")] [LookupName("PRE72H.PlannedPeriodOfStay_HUR")]
[ENI2Validation]
public double? PlannedPeriodOfStay_HUR { get; set; } public double? PlannedPeriodOfStay_HUR { get; set; }
[LookupName("PRE72H.IsDueToInspection")] [LookupName("PRE72H.IsDueToInspection")]
[ENI2Validation]
public bool? IsDueToInspection { get; set; } public bool? IsDueToInspection { get; set; }
[LookupName("PRE72H.PossibleAnchorage")] [LookupName("PRE72H.PossibleAnchorage")]
[ENI2Validation]
public bool? PossibleAnchorage { get; set; } public bool? PossibleAnchorage { get; set; }
public override string Subtitle public override string Subtitle

View File

@ -15,18 +15,23 @@ namespace bsmd.database
#region Properties #region Properties
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string Country { get; set; } public string Country { get; set; }
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string Locode { get; set; } public string Locode { get; set; }
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Port { get; set; } public string Port { get; set; }
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string Code { get; set; } public string Code { get; set; }
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Name { get; set; } public string Name { get; set; }
#endregion #endregion

View File

@ -33,14 +33,17 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation2(ValidationCode.LOCODE)] [Validation2(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfCallLast30DaysLocode { get; set; } public string PortOfCallLast30DaysLocode { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? PortOfCallLast30DaysDateOfDeparture { get; set; } public DateTime? PortOfCallLast30DaysDateOfDeparture { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? PortOfCallLast30DaysCrewMembersJoined { get; set; } public bool? PortOfCallLast30DaysCrewMembersJoined { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }
@ -48,6 +51,7 @@ namespace bsmd.database
/// <summary> /// <summary>
/// Hilfsproperty, um eine kommaseparierte Liste von Crew (analog ANSW) im ENI-2 anzuzeigen, /// Hilfsproperty, um eine kommaseparierte Liste von Crew (analog ANSW) im ENI-2 anzuzeigen,
/// </summary> /// </summary>
[ENI2Validation]
public string CrewMembersJoinedText public string CrewMembersJoinedText
{ {
get get

View File

@ -29,6 +29,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string PortOfCallLast30DaysCrewJoinedShipName { get; set; } public string PortOfCallLast30DaysCrewJoinedShipName { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -29,13 +29,16 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PortOfItineraryName { get; set; } public string PortOfItineraryName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? PortOfItineraryETA { get; set; } public DateTime? PortOfItineraryETA { get; set; }
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[ENI2Validation]
public string PortOfItineraryLocode { get; set; } public string PortOfItineraryLocode { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -58,33 +58,43 @@ namespace bsmd.database
#region NSW Reporting Party Properties #region NSW Reporting Party Properties
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Name { get; set; } public string Name { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string StreetAndNumber { get; set; } public string StreetAndNumber { get; set; }
[MaxLength(25)] [MaxLength(25)]
[ENI2Validation]
public string PostalCode { get; set; } public string PostalCode { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string City { get; set; } public string City { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Country { get; set; } public string Country { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string LastName { get; set; } public string LastName { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string FirstName { get; set; } public string FirstName { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Phone { get; set; } public string Phone { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string Fax { get; set; } public string Fax { get; set; }
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string EMail { get; set; } public string EMail { get; set; }
public ReportingPartyTypeEnum? ReportingPartyType { get; set; } public ReportingPartyTypeEnum? ReportingPartyType { get; set; }
@ -250,6 +260,8 @@ namespace bsmd.database
#endregion #endregion
#region password related methods
public void SetPassword(string password) public void SetPassword(string password)
{ {
using (SHA512 shaM = new SHA512Managed()) using (SHA512 shaM = new SHA512Managed())
@ -271,6 +283,8 @@ namespace bsmd.database
} }
} }
#endregion
#region public static methods #region public static methods
public static LogonResult Login(string name, string password, out ReportingParty reportingParty) public static LogonResult Login(string name, string password, out ReportingParty reportingParty)

View File

@ -30,51 +30,61 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
[ENI2Validation]
public bool? SECSimplification { get; set; } public bool? SECSimplification { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.LOCODE_GER)] [Validation1(ValidationCode.LOCODE_GER)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfCallWhereCompleteSECNotified { get; set; } public string PortOfCallWhereCompleteSECNotified { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("SEC.CSOLastName")] [LookupName("SEC.CSOLastName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CSOLastName { get; set; } public string CSOLastName { get; set; }
[ShowReport] [ShowReport]
[LookupName("SEC.CSOFirstName")] [LookupName("SEC.CSOFirstName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CSOFirstName { get; set; } public string CSOFirstName { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("SEC.CSOPhone")] [LookupName("SEC.CSOPhone")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CSOPhone { get; set; } public string CSOPhone { get; set; }
[ShowReport] [ShowReport]
[LookupName("SEC.CSOFax")] [LookupName("SEC.CSOFax")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CSOFax { get; set; } public string CSOFax { get; set; }
[ShowReport] [ShowReport]
[LookupName("SEC.CSOEMail")] [LookupName("SEC.CSOEMail")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string CSOEMail { get; set; } public string CSOEMail { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("SEC.ValidISSCOnBoard")] [LookupName("SEC.ValidISSCOnBoard")]
[ENI2Validation]
public bool? ValidISSCOnBoard { get; set; } public bool? ValidISSCOnBoard { get; set; }
[ShowReport] [ShowReport]
[LookupName("SEC.ReasonsForNoValidISSC")] [LookupName("SEC.ReasonsForNoValidISSC")]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ReasonsForNoValidISSC { get; set; } public string ReasonsForNoValidISSC { get; set; }
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? ISSCType { get; set; } public byte? ISSCType { get; set; }
[ShowReport] [ShowReport]
@ -82,6 +92,7 @@ namespace bsmd.database
public string ISSCTypeDisplay { get { return Util.GetISSCTypeDisplay(this.ISSCType); } } public string ISSCTypeDisplay { get { return Util.GetISSCTypeDisplay(this.ISSCType); } }
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
// [LookupName("SEC.ISSCIssuerType")] // wird manuell gescannt und konvertiert // [LookupName("SEC.ISSCIssuerType")] // wird manuell gescannt und konvertiert
public byte? ISSCIssuerType { get; set; } public byte? ISSCIssuerType { get; set; }
@ -93,41 +104,51 @@ namespace bsmd.database
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("SEC.ISSCIssuerName")] [LookupName("SEC.ISSCIssuerName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ISSCIssuerName { get; set; } public string ISSCIssuerName { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("SEC.ISSCDateOfExpiration")] [LookupName("SEC.ISSCDateOfExpiration")]
[ENI2Validation]
public DateTime? ISSCDateOfExpiration { get; set; } public DateTime? ISSCDateOfExpiration { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("SEC.ApprovedSecurityPlanOnBoard")] [LookupName("SEC.ApprovedSecurityPlanOnBoard")]
[ENI2Validation]
public bool? ApprovedSecurityPlanOnBoard { get; set; } public bool? ApprovedSecurityPlanOnBoard { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? CurrentShipSecurityLevel { get; set; } public byte? CurrentShipSecurityLevel { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string PortFacilityOfArrival { get; set; } public string PortFacilityOfArrival { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? GeneralDescriptionOfCargo { get; set; } public byte? GeneralDescriptionOfCargo { get; set; }
[ENI2Validation]
public bool? AreMatterToReport { get; set; } public bool? AreMatterToReport { get; set; }
[LookupName("SEC.MatterToReport")] [LookupName("SEC.MatterToReport")]
[MaxLength(1024)] [MaxLength(1024)]
[ENI2Validation]
public string MatterToReport { get; set; } public string MatterToReport { get; set; }
[ENI2Validation]
public bool? KielCanalPassagePlanned { get; set; } public bool? KielCanalPassagePlanned { get; set; }
[ENI2Validation]
public DateTime? KielCanalPassagePlannedIncomming { get; set; } public DateTime? KielCanalPassagePlannedIncomming { get; set; }
[ENI2Validation]
public DateTime? KielCanalPassagePlannedOutgoing { get; set; } public DateTime? KielCanalPassagePlannedOutgoing { get; set; }
public List<LastTenPortFacilitiesCalled> LastTenPortFacilitesCalled { get { return this.ltpfc; } } public List<LastTenPortFacilitiesCalled> LastTenPortFacilitesCalled { get { return this.ltpfc; } }

View File

@ -26,18 +26,21 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ServiceName { get; set; } public string ServiceName { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
[LookupName("SERV.ServiceBeneficiary")] [LookupName("SERV.ServiceBeneficiary")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ServiceBeneficiary { get; set; } public string ServiceBeneficiary { get; set; }
[ShowReport] [ShowReport]
[Validation1(ValidationCode.NOT_NULL)] [Validation1(ValidationCode.NOT_NULL)]
[LookupName("SERV.ServiceInvoiceRecipient")] [LookupName("SERV.ServiceInvoiceRecipient")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ServiceInvoiceRecipient { get; set; } public string ServiceInvoiceRecipient { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,46 +28,55 @@ namespace bsmd.database
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("STAT.ShipName")] [LookupName("STAT.ShipName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ShipName { get; set; } public string ShipName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string CallSign { get; set; } public string CallSign { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(50)] [MaxLength(50)]
[ENI2Validation]
public string MMSINumber { get; set; } public string MMSINumber { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.FLAG_CODE)] [Validation(ValidationCode.FLAG_CODE)]
[MaxLength(2)] [MaxLength(2)]
[ENI2Validation]
public string Flag { get; set; } public string Flag { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[LookupName("STAT.LengthOverall_MTR")] [LookupName("STAT.LengthOverall_MTR")]
[ENI2Validation]
public double? LengthOverall_MTR { get; set; } public double? LengthOverall_MTR { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[LookupName("STAT.Beam_MTR")] [LookupName("STAT.Beam_MTR")]
[ENI2Validation]
public double? Beam_MTR { get; set; } public double? Beam_MTR { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[LookupName("STAT.GrossTonnage")] [LookupName("STAT.GrossTonnage")]
[ENI2Validation]
public int? GrossTonnage { get; set; } public int? GrossTonnage { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.LOCODE)] [Validation(ValidationCode.LOCODE)]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string PortOfRegistry { get; set; } public string PortOfRegistry { get; set; }
[ShowReport] [ShowReport]
[LookupName("STAT.InmarsatCallNumber")] [LookupName("STAT.InmarsatCallNumber")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string InmarsatCallNumber { get; set; } public string InmarsatCallNumber { get; set; }
/// <summary> /// <summary>
@ -75,6 +84,7 @@ namespace bsmd.database
/// </summary> /// </summary>
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(1)] [MaxLength(1)]
[ENI2Validation]
public string TransportMode { get; set; } public string TransportMode { get; set; }
[ShowReport] [ShowReport]
@ -95,36 +105,43 @@ namespace bsmd.database
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[LookupName("STAT.ShipType")] [LookupName("STAT.ShipType")]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string ShipType { get; set; } public string ShipType { get; set; }
[ShowReport] [ShowReport]
[LookupName("STAT.ISMCompanyName")] [LookupName("STAT.ISMCompanyName")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ISMCompanyName { get; set; } public string ISMCompanyName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.STRING_EXACT_LEN, 7)] [Validation(ValidationCode.STRING_EXACT_LEN, 7)]
[MaxLength(10)] [MaxLength(10)]
[ENI2Validation]
public string ISMCompanyId { get; set; } public string ISMCompanyId { get; set; }
[ShowReport] [ShowReport]
[LookupName("STAT.ISMCompanyStreetAndNumber")] [LookupName("STAT.ISMCompanyStreetAndNumber")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ISMCompanyStreetAndNumber { get; set; } public string ISMCompanyStreetAndNumber { get; set; }
[ShowReport] [ShowReport]
[LookupName("STAT.ISMCompanyPostalCode")] [LookupName("STAT.ISMCompanyPostalCode")]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string ISMCompanyPostalCode { get; set; } public string ISMCompanyPostalCode { get; set; }
[ShowReport] [ShowReport]
[LookupName("STAT.ISMCompanyCity")] [LookupName("STAT.ISMCompanyCity")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ISMCompanyCity { get; set; } public string ISMCompanyCity { get; set; }
[ShowReport] [ShowReport]
[LookupName("STAT.ISMCompanyCountry")] [LookupName("STAT.ISMCompanyCountry")]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string ISMCompanyCountry { get; set; } public string ISMCompanyCountry { get; set; }
public override string Subtitle public override string Subtitle
@ -136,13 +153,16 @@ namespace bsmd.database
} }
[LookupName("STAT.NetTonnage")] [LookupName("STAT.NetTonnage")]
[ENI2Validation]
public double? NetTonnage { get; set; } public double? NetTonnage { get; set; }
[LookupName("STAT.RegistryDate")] [LookupName("STAT.RegistryDate")]
[ENI2Validation]
public DateTime? RegistryDate { get; set; } public DateTime? RegistryDate { get; set; }
[LookupName("STAT.CertificateOfRegistryNumber")] [LookupName("STAT.CertificateOfRegistryNumber")]
[MaxLength(35)] [MaxLength(35)]
[ENI2Validation]
public string CertificateOfRegistryNumber { get; set; } public string CertificateOfRegistryNumber { get; set; }
public static Dictionary<string, string> VesselTypeDict { get; set; } public static Dictionary<string, string> VesselTypeDict { get; set; }

View File

@ -36,21 +36,26 @@ namespace bsmd.database
[LookupName("STO.Name")] [LookupName("STO.Name")]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string Name { get; set; } public string Name { get; set; }
[LookupName("STO.Quantity")] [LookupName("STO.Quantity")]
[ENI2Validation]
public int? Quantity { get; set; } public int? Quantity { get; set; }
[LookupName("STO.QuantityUnit")] [LookupName("STO.QuantityUnit")]
[MaxLength(16)] [MaxLength(16)]
[ENI2Validation]
public string QuantityUnit { get; set; } public string QuantityUnit { get; set; }
[LookupName("STO.LocationOnBoard")] [LookupName("STO.LocationOnBoard")]
[MaxLength(64)] [MaxLength(64)]
[ENI2Validation]
public string LocationOnBoard { get; set; } public string LocationOnBoard { get; set; }
[LookupName("STO.OfficialUse")] [LookupName("STO.OfficialUse")]
[MaxLength(16)] [MaxLength(16)]
[ENI2Validation]
public string OfficialUse { get; set; } public string OfficialUse { get; set; }
#endregion #endregion

View File

@ -29,13 +29,16 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string SanitaryMeasuresType { get; set; } public string SanitaryMeasuresType { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string SanitaryMeasuresLocation { get; set; } public string SanitaryMeasuresLocation { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public DateTime? SanitaryMeasuresDate { get; set; } public DateTime? SanitaryMeasuresDate { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,33 +28,41 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ShipToShipActivityLocationName { get; set; } public string ShipToShipActivityLocationName { get; set; }
[ShowReport] [ShowReport]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string ShipToShipActivityLocationLoCode { get; set; } public string ShipToShipActivityLocationLoCode { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int? ShipToShipActivityLocationCoordinatesLatitude { get; set; } public int? ShipToShipActivityLocationCoordinatesLatitude { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public int? ShipToShipActivityLocationCoordinatesLongitude { get; set; } public int? ShipToShipActivityLocationCoordinatesLongitude { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? ShipToShipActivityDateFrom { get; set; } public DateTime? ShipToShipActivityDateFrom { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public DateTime? ShipToShipActivityDateTo { get; set; } public DateTime? ShipToShipActivityDateTo { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ShipToShipActivityType { get; set; } public string ShipToShipActivityType { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string ShipToShipActivitySecurityMattersToReport { get; set; } public string ShipToShipActivitySecurityMattersToReport { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -29,6 +29,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string StowawayJoiningLocation { get; set; } public string StowawayJoiningLocation { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,6 +28,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(11)] [MaxLength(11)]
[ENI2Validation]
public string SubsidiaryRisk { get; set; } public string SubsidiaryRisk { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -26,6 +26,7 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)] [Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)]
[LookupName("TIEFA.DraughtUponArrival_DMT")] [LookupName("TIEFA.DraughtUponArrival_DMT")]
[ENI2Validation]
public double? DraughtUponArrival_DMT { get; set; } public double? DraughtUponArrival_DMT { get; set; }
public override string Subtitle public override string Subtitle

View File

@ -23,9 +23,11 @@ namespace bsmd.database
} }
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)] [Validation(ValidationCode.DRAUGHT_IMPLAUSIBLE)]
[LookupName("TIEFD.DraughtUponDeparture_DMT")] [LookupName("TIEFD.DraughtUponDeparture_DMT")]
[ENI2Validation]
public double? DraughtUponDeparture_DMT { get; set; } public double? DraughtUponDeparture_DMT { get; set; }
public override string Subtitle public override string Subtitle

View File

@ -23,71 +23,88 @@ namespace bsmd.database
} }
#region Properties #region Properties
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalName { get; set; } public string TowageOnArrivalName { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.FLAG_CODE)] [Validation(ValidationCode.FLAG_CODE)]
[MaxLength(2)] [MaxLength(2)]
[ENI2Validation]
public string TowageOnArrivalFlag { get; set; } public string TowageOnArrivalFlag { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorCompanyName { get; set; } public string TowageOnArrivalOperatorCompanyName { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorStreetNameAndNumber { get; set; } public string TowageOnArrivalOperatorStreetNameAndNumber { get; set; }
[ShowReport] [ShowReport]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string TowageOnArrivalOperatorPostalCode { get; set; } public string TowageOnArrivalOperatorPostalCode { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorCity { get; set; } public string TowageOnArrivalOperatorCity { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorCountry { get; set; } public string TowageOnArrivalOperatorCountry { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorPhone { get; set; } public string TowageOnArrivalOperatorPhone { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorFax { get; set; } public string TowageOnArrivalOperatorFax { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalOperatorEmail { get; set; } public string TowageOnArrivalOperatorEmail { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.INT_GT_ZERO)] [Validation(ValidationCode.INT_GT_ZERO)]
[ENI2Validation]
public int? TowageOnArrivalGrossTonnage { get; set; } public int? TowageOnArrivalGrossTonnage { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? TowageOnArrivalLengthOverall_MTR { get; set; } public double? TowageOnArrivalLengthOverall_MTR { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? TowageOnArrivalBeam_MTR { get; set; } public double? TowageOnArrivalBeam_MTR { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnArrivalPurposeOfCall { get; set; } public string TowageOnArrivalPurposeOfCall { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? TowageOnArrivalDraught_DMT { get; set; } public double? TowageOnArrivalDraught_DMT { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string TowageOnArrivalRemarks { get; set; } public string TowageOnArrivalRemarks { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -27,56 +27,70 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureName { get; set; } public string TowageOnDepartureName { get; set; }
[ShowReport] [ShowReport]
[MaxLength(2)] [MaxLength(2)]
[ENI2Validation]
public string TowageOnDepartureFlag { get; set; } public string TowageOnDepartureFlag { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorCompanyName { get; set; } public string TowageOnDepartureOperatorCompanyName { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorStreetNameAndNumber { get; set; } public string TowageOnDepartureOperatorStreetNameAndNumber { get; set; }
[ShowReport] [ShowReport]
[MaxLength(24)] [MaxLength(24)]
[ENI2Validation]
public string TowageOnDepartureOperatorPostalCode { get; set; } public string TowageOnDepartureOperatorPostalCode { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorCity { get; set; } public string TowageOnDepartureOperatorCity { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorCountry { get; set; } public string TowageOnDepartureOperatorCountry { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorPhone { get; set; } public string TowageOnDepartureOperatorPhone { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorFax { get; set; } public string TowageOnDepartureOperatorFax { get; set; }
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string TowageOnDepartureOperatorEmail { get; set; } public string TowageOnDepartureOperatorEmail { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? TowageOnDepartureLengthOverall_MTR { get; set; } public double? TowageOnDepartureLengthOverall_MTR { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? TowageOnDepartureBeam_MTR { get; set; } public double? TowageOnDepartureBeam_MTR { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.DOUBLE_GT_ZERO)] [Validation(ValidationCode.DOUBLE_GT_ZERO)]
[ENI2Validation]
public double? TowageOnDepartureDraught_DMT { get; set; } public double? TowageOnDepartureDraught_DMT { get; set; }
[ShowReport] [ShowReport]
[MaxLength(255)] [MaxLength(255)]
[ENI2Validation]
public string TowageOnDepartureRemarks { get; set; } public string TowageOnDepartureRemarks { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -70,6 +70,22 @@ namespace bsmd.database
#endregion #endregion
#region ENI2 Validierung
/// <summary>
/// Wenn ein Property damit dekoriert ist, steht es im Validierungs-Editor als Parameter zur Verfügung
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ENI2Validation : Attribute
{
public ENI2Validation()
{
}
}
#endregion
#region allg. ValidationAttribute (wird immer geprüft) #region allg. ValidationAttribute (wird immer geprüft)
[AttributeUsage(AttributeTargets.Property)] [AttributeUsage(AttributeTargets.Property)]

View File

@ -10,6 +10,7 @@ using log4net;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Collections; using System.Collections;
using System.Windows.Data; using System.Windows.Data;
using System.ComponentModel;
namespace bsmd.database namespace bsmd.database
{ {
@ -22,10 +23,18 @@ namespace bsmd.database
public enum ConditionOperatorEnum public enum ConditionOperatorEnum
{ {
[Description("==")]
EQUAL, EQUAL,
[Description("!=")]
NOT_EQUAL, NOT_EQUAL,
[Description(">")]
GREATER, GREATER,
LESS [Description("<")]
LESS,
[Description("IS NULL")]
NULL,
[Description("IS NOT NULL")]
NOT_NULL
} }
#region Properties #region Properties
@ -113,6 +122,8 @@ namespace bsmd.database
return result; return result;
} }
#region Serialization
public static ConditionGroup LoadFromString(string serializedConditions) public static ConditionGroup LoadFromString(string serializedConditions)
{ {
if ((serializedConditions == null) || if ((serializedConditions == null) ||
@ -125,6 +136,7 @@ namespace bsmd.database
{ {
XmlSerializer serializer = new XmlSerializer(typeof(ConditionGroup)); XmlSerializer serializer = new XmlSerializer(typeof(ConditionGroup));
ConditionGroup container = serializer.Deserialize(sr) as ConditionGroup; ConditionGroup container = serializer.Deserialize(sr) as ConditionGroup;
container.CopyToObservable();
return container; return container;
} }
catch (Exception) catch (Exception)
@ -144,6 +156,7 @@ namespace bsmd.database
{ {
Type theType = Type.GetType("bsmd.database.ConditionGroup, bsmd.database"); Type theType = Type.GetType("bsmd.database.ConditionGroup, bsmd.database");
XmlSerializer serializer = new XmlSerializer(theType); XmlSerializer serializer = new XmlSerializer(theType);
group.CopyToXML();
serializer.Serialize(sw, group); serializer.Serialize(sw, group);
return sw.ToString(); return sw.ToString();
} }
@ -154,6 +167,8 @@ namespace bsmd.database
} }
} }
#endregion
/// <summary> /// <summary>
/// evaluate logical group operator /// evaluate logical group operator
/// </summary> /// </summary>
@ -259,6 +274,11 @@ namespace bsmd.database
#region class ConditionGroup #region class ConditionGroup
/// <summary>
/// Diese Klasse benötigt (blöderweise) für eine Sache 2 Collections: einmal für die XML Serialisierung und einmal
/// für die Hierarchie im WPF Treecontrol (ObservableCollection). Daher müssen die Inhalte beim Laden und Speichern hin und herkopiert
/// werden. Was für ein Scheiß.
/// </summary>
[Serializable] [Serializable]
public class ConditionGroup public class ConditionGroup
{ {
@ -274,28 +294,37 @@ namespace bsmd.database
public ConditionGroup() { public ConditionGroup() {
Conditions = new ObservableCollection<ValidationCondition>(); Conditions = new ObservableCollection<ValidationCondition>();
SubGroups = new ObservableCollection<ConditionGroup>(); SubGroups = new ObservableCollection<ConditionGroup>();
XMLConditions = new List<ValidationCondition>();
XMLSubGroups = new List<ConditionGroup>();
} }
#region Properties #region Properties
[XmlIgnore]
public ObservableCollection<ValidationCondition> Conditions public ObservableCollection<ValidationCondition> Conditions
{ {
get; get;
set; set;
} }
public List<ValidationCondition> XMLConditions { get; set; }
public GroupOperatorEnum GroupOperator public GroupOperatorEnum GroupOperator
{ {
get; get;
set; set;
} }
[XmlIgnore]
public ObservableCollection<ConditionGroup> SubGroups public ObservableCollection<ConditionGroup> SubGroups
{ {
get; get;
set; set;
} }
public List<ConditionGroup> XMLSubGroups { get; set; }
[XmlIgnore]
public IList Children public IList Children
{ {
get get
@ -315,7 +344,7 @@ namespace bsmd.database
#endregion #endregion
#region public recursive removal methods #region public recursive methods
public void Remove(ConditionGroup group) public void Remove(ConditionGroup group)
{ {
@ -341,12 +370,57 @@ namespace bsmd.database
subGroup.RemoveCondition(condition); subGroup.RemoveCondition(condition);
} }
public void CopyToObservable()
{
this.SubGroups.Clear();
foreach (ConditionGroup cg in this.XMLSubGroups)
this.SubGroups.Add(cg);
this.Conditions.Clear();
foreach (ValidationCondition vc in this.XMLConditions)
this.Conditions.Add(vc);
foreach (ConditionGroup subGroup in this.XMLSubGroups)
subGroup.CopyToObservable();
}
public void CopyToXML()
{
this.XMLSubGroups.Clear();
this.XMLSubGroups.AddRange(this.SubGroups);
this.XMLConditions.Clear();
this.XMLConditions.AddRange(this.Conditions);
foreach (ConditionGroup subGroup in this.SubGroups)
subGroup.CopyToXML();
}
#endregion #endregion
} }
#endregion #endregion
#region class ValidationField
/// <summary>
/// Diese Klasse wird beim Bearbeiten im Regel-Editor verwendet (ENI-2)
/// </summary>
public class ValidationField
{
public string PropertyName { get; set; }
public string NotificationClassText { get; set; }
public Message.NotificationClass NotificationClass { get; set; }
public bool IsInListType { get; set; }
public override string ToString()
{
return string.Format("{0}.{1}", NotificationClassText, PropertyName);
}
}
#endregion
#region struct KeyValuePairS #region struct KeyValuePairS

View File

@ -36,29 +36,35 @@ namespace bsmd.database
public static string[] DKWasteTypes { get { return dkWasteTypes; } } public static string[] DKWasteTypes { get { return dkWasteTypes; } }
[ShowReport] [ShowReport]
[ENI2Validation]
public bool? WasteDisposalValidExemption { get; set; } public bool? WasteDisposalValidExemption { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("WAS.LastWasteDisposalPort")] [LookupName("WAS.LastWasteDisposalPort")]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string LastWasteDisposalPort { get; set; } public string LastWasteDisposalPort { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("WAS.ConfirmationOfCorrectness")] [LookupName("WAS.ConfirmationOfCorrectness")]
[ENI2Validation]
public bool? ConfirmationOfCorrectness { get; set; } public bool? ConfirmationOfCorrectness { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[LookupName("WAS.LastWasteDisposalDate")] [LookupName("WAS.LastWasteDisposalDate")]
[ENI2Validation]
public DateTime? LastWasteDisposalDate { get; set; } public DateTime? LastWasteDisposalDate { get; set; }
[ShowReport] [ShowReport]
[Validation2(ValidationCode.NOT_NULL)] [Validation2(ValidationCode.NOT_NULL)]
[ENI2Validation]
public byte? WasteDisposalDelivery { get; set; } public byte? WasteDisposalDelivery { get; set; }
[LookupName("WAS.ConfirmationOfSufficiency")] [LookupName("WAS.ConfirmationOfSufficiency")]
[ENI2Validation]
public bool? ConfirmationOfSufficiency { get; set; } public bool? ConfirmationOfSufficiency { get; set; }
public List<Waste> Waste { get { return this.waste; } } public List<Waste> Waste { get { return this.waste; } }

View File

@ -83,31 +83,39 @@ namespace bsmd.database
} }
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public int? WasteType { get; set; } public int? WasteType { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string WasteDescription { get; set; } public string WasteDescription { get; set; }
[ShowReport] [ShowReport]
[Validation(ValidationCode.NOT_NULL)] [Validation(ValidationCode.NOT_NULL)]
[ENI2Validation]
public double? WasteDisposalAmount_MTQ { get; set; } public double? WasteDisposalAmount_MTQ { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? WasteCapacity_MTQ { get; set; } public double? WasteCapacity_MTQ { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? WasteAmountRetained_MTQ { get; set; } public double? WasteAmountRetained_MTQ { get; set; }
[ShowReport] [ShowReport]
[MaxLength(5)] [MaxLength(5)]
[ENI2Validation]
public string WasteDisposalPort { get; set; } public string WasteDisposalPort { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; } public double? WasteAmountGeneratedTillNextPort_MTQ { get; set; }
// "dänisches" Zusatzfeld // "dänisches" Zusatzfeld
[ENI2Validation]
public double? WasteDisposedAtLastPort_MTQ { get; set; } public double? WasteDisposedAtLastPort_MTQ { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }

View File

@ -28,9 +28,11 @@ namespace bsmd.database
[ShowReport] [ShowReport]
[MaxLength(100)] [MaxLength(100)]
[ENI2Validation]
public string WasteDisposalServiceProviderName { get; set; } public string WasteDisposalServiceProviderName { get; set; }
[ShowReport] [ShowReport]
[ENI2Validation]
public byte? WasteDisposalDelivery { get; set; } public byte? WasteDisposalDelivery { get; set; }
public string Identifier { get; set; } public string Identifier { get; set; }