Version 5.1.2 Zwischenstand (weitere Validierungen gemäß Trello-Karten)
This commit is contained in:
parent
88592d90c1
commit
d8872b5ec2
@ -404,6 +404,13 @@ namespace ENI2
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(currentControl.Core);
|
||||
}
|
||||
|
||||
if(message.MessageNotificationClass == Message.NotificationClass.STAT)
|
||||
{
|
||||
DetailBaseControl currentControl = this.detailView.Children[0] as DetailBaseControl;
|
||||
currentControl.Core.IsSmallShip = ((STAT)message.Elements[0]).GrossTonnage < 500;
|
||||
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(currentControl.Core);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -614,7 +621,11 @@ namespace ENI2
|
||||
Message crewMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREW);
|
||||
Message pasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PAS);
|
||||
Message pobaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.POBA);
|
||||
|
||||
Message secMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SEC);
|
||||
Message noanodMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.NOA_NOD);
|
||||
|
||||
#region CREW / PAS Count Plausibility
|
||||
|
||||
if (pobaMessage.Elements.Count == 1)
|
||||
{
|
||||
POBA poba = pobaMessage.Elements[0] as POBA;
|
||||
@ -632,11 +643,49 @@ namespace ENI2
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
vViolations.Add(mv);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Kiel Canal Timing Plausibility
|
||||
|
||||
if(!this.Core.IsTransit && (secMessage?.Elements.Count > 0) && (noanodMessage?.Elements.Count > 0))
|
||||
{
|
||||
SEC sec = secMessage.Elements[0] as SEC;
|
||||
NOA_NOD noa_nod = noanodMessage.Elements[0] as NOA_NOD;
|
||||
|
||||
if (sec.KielCanalPassagePlanned ?? false)
|
||||
{
|
||||
// Überprüfung, ob die eingehende NOK-Durchfahrt auch wirklich innerhalb der eingehenden Reise liegt (bei VISIT)
|
||||
bool isValidIncoming = (noa_nod.ETDFromLastPort < sec.KielCanalPassagePlannedIncomming) &&
|
||||
(sec.KielCanalPassagePlannedIncomming < noa_nod.ETAToPortOfCall);
|
||||
if (!sec.KielCanalPassagePlannedIncomming.HasValue) isValidIncoming = true;
|
||||
|
||||
if(!isValidIncoming)
|
||||
{
|
||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Kiel Canal incoming implausible (ETD / ETA ports)!", null, "Kiel Canal timing", null, "SEC");
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
vViolations.Add(mv);
|
||||
}
|
||||
|
||||
|
||||
bool isValidOutgoing = (noa_nod.ETDFromPortOfCall < sec.KielCanalPassagePlannedOutgoing) &&
|
||||
((noa_nod.NextPort == "ZZUKN") || (sec.KielCanalPassagePlannedOutgoing < noa_nod.ETAToNextPort));
|
||||
if (!sec.KielCanalPassagePlannedOutgoing.HasValue) isValidOutgoing = true;
|
||||
|
||||
if(!isValidOutgoing)
|
||||
{
|
||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Kiel Canal outgoing implausible (ETD / ETA ports)!", null, "Kiel Canal timing", null, "SEC");
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
vViolations.Add(mv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
foreach (MessageError me in vErrors)
|
||||
{
|
||||
this.highlightService.HighlightError(me, this.GetContainerForMessageGroupName(me.MessageGroupName));
|
||||
|
||||
@ -99,6 +99,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<Button Name="buttonImportFromSEC" Margin="2" Content="{x:Static p:Resources.textImportFromSEC}" Width="120" VerticalAlignment="Center" Click="buttonImportFromSEC_Click" Background="Transparent" />
|
||||
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumPoCEntries" FontWeight="Bold" Text="{Binding PortOfCallLast30Days.Count}" VerticalAlignment="Center"/>
|
||||
<Label Name="labelPoCEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
||||
</StackPanel>
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPortOfCallLast30Days" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
SelectionMode="Extended" AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||
|
||||
@ -85,7 +85,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
this.mdhGroupBox.DataContext = mdh;
|
||||
this.mainFrame.DataContext = mdh;
|
||||
this._mdh = mdh;
|
||||
|
||||
this.dataGridPortOfCallLast30Days.Initialize();
|
||||
|
||||
@ -105,7 +105,11 @@
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="buttonImportExcel" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcel_Click" />
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<Button Name="buttonImportExcel" Content="{x:Static p:Resources.textImportFromExcel}" Margin="2" Width="120" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Click="buttonImportExcel_Click" />
|
||||
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumL10PEntries" FontWeight="Bold" Text="{Binding LastTenPortFacilitesCalled.Count}" VerticalAlignment="Center"/>
|
||||
<Label Name="labelL10PEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
||||
</StackPanel>
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridLast10PortFacilities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||
<DataGrid.Columns>
|
||||
@ -153,6 +157,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<Button Name="buttonImportFromL10P" Margin="2" Content="{x:Static p:Resources.textCopyFromL10P}" Width="220" VerticalAlignment="Center" Click="buttonImportFromL10P_Click" Background="Transparent" />
|
||||
<TextBlock Margin="20, 0, 0, 0" Name="textBlockNumS2SEntries" FontWeight="Bold" Text="{Binding ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Count}" VerticalAlignment="Center"/>
|
||||
<Label Name="labelS2SEntryCount" Content="{x:Static p:Resources.textEntries}" />
|
||||
</StackPanel>
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridShip2ShipActivities" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0">
|
||||
|
||||
@ -73,8 +73,8 @@ namespace ENI2.DetailViewControls
|
||||
};
|
||||
_secMessage.Elements.Add(sec);
|
||||
}
|
||||
|
||||
this.secGroupBox.DataContext = sec;
|
||||
|
||||
this.mainFrame.DataContext = sec;
|
||||
this._sec = sec;
|
||||
|
||||
this.comboBoxCurrentShipSecurityLevel.ItemsSource = Util.GlobalStructures.ShipSecurityLevels;
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>5.1.0.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>5.1.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
Binary file not shown.
@ -28,16 +28,19 @@ namespace bsmd.database
|
||||
[LookupName("POBA.TotalPersonsOnBoardUponArrival")]
|
||||
[ENI2Validation]
|
||||
public int? TotalPersonsOnBoardUponArrival { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.INT_GT_ZERO)]
|
||||
[LookupName("POBA.TotalCrewMembersOnBoardUponArrival")]
|
||||
[ENI2Validation]
|
||||
public int? TotalCrewMembersOnBoardUponArrival { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("POBA.TotalPassengersOnBoardUponArrival")]
|
||||
[ENI2Validation]
|
||||
public int? TotalPassengersOnBoardUponArrival { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("POBA.TotalStowawaysOnBoardUponArrival")]
|
||||
@ -77,7 +80,7 @@ namespace bsmd.database
|
||||
}
|
||||
else
|
||||
{
|
||||
scmd.Parameters.AddWithValue(@"ID", this.Id);
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("UPDATE {0} SET TotalPersonsOnBoardUponArrival = @P2, " +
|
||||
"TotalCrewMembersOnBoardUponArrival = @P3, TotalPassengersOnBoardUponArrival = @P4, " +
|
||||
"TotalStowawaysOnBoardUponArrival = @P5 WHERE Id = @ID", this.Tablename);
|
||||
@ -133,7 +136,7 @@ namespace bsmd.database
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
if (((TotalCrewMembersOnBoardUponArrival ?? 0) + (TotalPassengersOnBoardUponArrival ?? 0) + (TotalStowawaysOnBoardUponArrival ?? 0)) != (TotalPersonsOnBoardUponArrival ?? 0))
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "TotalPersonsOnBoardUponArrival", null, this.Title, null));
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "TotalPersonsOnBoardUponArrival", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -28,16 +28,19 @@ namespace bsmd.database
|
||||
[LookupName("POBD.TotalPersonsOnBoardUponDeparture")]
|
||||
[ENI2Validation]
|
||||
public int? TotalPersonsOnBoardUponDeparture { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.INT_GT_ZERO)]
|
||||
[LookupName("POBD.TotalCrewMembersOnBoardUponDeparture")]
|
||||
[ENI2Validation]
|
||||
public int? TotalCrewMembersOnBoardUponDeparture { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("POBD.TotalPassengersOnBoardUponDeparture")]
|
||||
[ENI2Validation]
|
||||
public int? TotalPassengersOnBoardUponDeparture { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[LookupName("POBD.TotalStowawaysOnBoardUponDeparture")]
|
||||
@ -77,7 +80,7 @@ namespace bsmd.database
|
||||
}
|
||||
else
|
||||
{
|
||||
scmd.Parameters.AddWithValue(@"ID", this.Id);
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("UPDATE {0} SET TotalPersonsOnBoardUponDeparture = @P2, " +
|
||||
"TotalCrewMembersOnBoardUponDeparture = @P3, TotalPassengersOnBoardUponDeparture = @P4, " +
|
||||
"TotalStowawaysOnBoardUponDeparture = @P5 WHERE Id = @ID", this.Tablename);
|
||||
@ -131,7 +134,7 @@ namespace bsmd.database
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
if (((TotalCrewMembersOnBoardUponDeparture ?? 0) + (TotalPassengersOnBoardUponDeparture ?? 0) + (TotalStowawaysOnBoardUponDeparture ?? 0)) != (TotalPersonsOnBoardUponDeparture ?? 0))
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "TotalPersonsOnBoardUponDeparture", null, this.Title, null));
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "TotalPersonsOnBoardUponDeparture", null, this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("5.1.0")]
|
||||
[assembly: AssemblyInformationalVersion("5.1.2")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2018 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("5.1.0.*")]
|
||||
[assembly: AssemblyVersion("5.1.2.*")]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user