Added Validation for CREW/PAS message classes as defined per document, fixed Resource references
This commit is contained in:
parent
0b677f36cc
commit
51839b1748
@ -36,7 +36,7 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico">
|
||||
Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_grey.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32" />
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_cards.ico">
|
||||
Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_cards.ico">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico" >
|
||||
Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_grey.ico" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/mail_forward.png">
|
||||
Title="{x:Static p:Resources.textEditRules}" Height="402" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2Test;component/Resources/mail_forward.png">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32" />
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_red.ico" Topmost="False">
|
||||
Title="{x:Static p:Resources.textErrors}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_red.ico" Topmost="False">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textMessageHistory}" Height="450" Width="800" Background="AliceBlue" Icon="/ENI2;component/Resources/clock_history.ico">
|
||||
Title="{x:Static p:Resources.textMessageHistory}" Height="450" Width="800" Background="AliceBlue" Icon="/ENI2Test;component/Resources/clock_history.ico">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textNewDGItem}" Height="350" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize"
|
||||
Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
|
||||
Icon="/ENI2Test;component/Resources/bullet_ball_yellow.ico" Loaded="EditWindowBase_Loaded">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textNewWithId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_card_add.ico">
|
||||
Title="{x:Static p:Resources.textNewWithId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_card_add.ico">
|
||||
|
||||
<Grid Margin="4">
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.EditControls"
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
mc:Ignorable="d"
|
||||
Title="Search port area" Height="400" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Loaded="Window_Loaded">
|
||||
Title="Search port area" Height="400" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="CanResize" Icon="/ENI2Test;component/Resources/bullet_ball_yellow.ico" Loaded="Window_Loaded">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_yellow.ico" Topmost="False">
|
||||
Title="{x:Static p:Resources.textViolations}" Height="300" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_yellow.ico" Topmost="False">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:p="clr-namespace:ENI2.Properties"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.textNewVisitTransitId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_card_new.ico">
|
||||
Title="{x:Static p:Resources.textNewVisitTransitId}" Height="220" Width="350" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_card_new.ico">
|
||||
<Grid Margin="4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
@ -145,7 +145,7 @@ namespace bsmd.database
|
||||
{
|
||||
get
|
||||
{
|
||||
return CrewMemberIdentityDocumentType.HasValue && !CrewMemberIdentityDocumentId.IsNullOrEmpty() && CrewMemberIdentityDocumentExpiryDate.HasValue;
|
||||
return CrewMemberIdentityDocumentType.HasValue && !CrewMemberIdentityDocumentId.IsNullOrEmpty() && !CrewMemberIdentityDocumentIssuingState.IsNullOrEmpty() && CrewMemberIdentityDocumentExpiryDate.HasValue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -317,6 +317,19 @@ namespace bsmd.database
|
||||
if (this.CrewMemberDateOfBirth.HasValue && (this.CrewMemberDateOfBirth.Value <= CLAMPMINDATE))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.Tablename));
|
||||
|
||||
// NSW 7.2 rules
|
||||
|
||||
if(!((this.NotificationPAX ?? false) || (this.NotificationSchengen ?? false)))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V181, "Pax / Schengen", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
if(((this.NotificationSchengen ?? false) && (!this.HasSchengenDetails)) ||
|
||||
((!(this.NotificationSchengen ?? false)) && this.HasSchengenDetails))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V182, "Schengen", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -652,9 +652,7 @@ namespace bsmd.database
|
||||
if (isTransit) result = false;
|
||||
break;
|
||||
case NotificationClass.VISIT:
|
||||
case NotificationClass.TRANSIT:
|
||||
case NotificationClass.CREWD:
|
||||
case NotificationClass.PASD:
|
||||
case NotificationClass.TRANSIT:
|
||||
case NotificationClass.STO:
|
||||
result = false;
|
||||
break;
|
||||
|
||||
@ -161,7 +161,7 @@ namespace bsmd.database
|
||||
{
|
||||
get
|
||||
{
|
||||
return PassengerIdentityDocumentType.HasValue && !PassengerIdentityDocumentId.IsNullOrEmpty() &&
|
||||
return PassengerIdentityDocumentType.HasValue && !PassengerIdentityDocumentId.IsNullOrEmpty() && !PassengerIdentityDocumentIssuingState.IsNullOrEmpty() &&
|
||||
PassengerIdentityDocumentExpiryDate.HasValue && !PassengerPortOfEmbarkation.IsNullOrEmpty() && !PassengerPortOfDisembarkation.IsNullOrEmpty();
|
||||
}
|
||||
}
|
||||
@ -374,6 +374,25 @@ namespace bsmd.database
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check date of birth", null, this.Title, this.Identifier, this.Tablename));
|
||||
}
|
||||
|
||||
// NSW 7.2 rules
|
||||
|
||||
if (!((this.NotificationPAX ?? false) || (this.NotificationSchengen ?? false)))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V201, "Pax / Schengen", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
if (((this.NotificationSchengen ?? false) && (!this.HasSchengenDetails)) ||
|
||||
((!(this.NotificationSchengen ?? false)) && this.HasSchengenDetails))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V202, "Schengen", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
if (((this.NotificationPAX ?? false) && (!this.HasPAXDetails)) ||
|
||||
((!(this.NotificationPAX ?? false)) && this.HasPAXDetails))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V203, "PAX", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
1) copyprod.cmd ausführen (damit app.config richtig überschrieben wird)
|
||||
|
||||
|
||||
2) Prüfen ob das ENI App logo richtig ist
|
||||
3) VS: Publish: Folder Location und Url richtig auswählen
|
||||
4) Signing: "Sign the ClickOnce manifests": Hier für Prod das Zertifikat
|
||||
Schiffsmelder CA auswählen, das am 02/24 abläuft.
|
||||
Auswahl über "Select from Store.."
|
||||
|
||||
|
||||
5) Release Build einstellen
|
||||
6) komplett neu bauen (clean!)
|
||||
|
||||
7) In Description bei Product name "ENI" statt "ENI Testversion"
|
||||
8) MainWindow.xaml: "ENI 2 Testversion" -> "ENI 2"
|
||||
9) ENI2 Project Properties -> Application -> Assembly Name: "ENI2Test" -> "ENI2"
|
||||
10) Wo Ressourcen verwendet werden in XAML Referenz umbiegen: "/ENI2Test;" -> "/ENI2;"
|
||||
Loading…
Reference in New Issue
Block a user