Merge branch 'release/eni_7.2.5'

This commit is contained in:
Daniel Schick 2024-11-07 14:36:54 +01:00
commit 10b4500fb3
26 changed files with 79 additions and 58 deletions

View File

@ -12,7 +12,7 @@
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup> </startup>
<applicationSettings> <applicationSettings>
<ENI2.Properties.Settings> <ENI2.Properties.Settings>
@ -36,7 +36,7 @@
<userSettings> <userSettings>
<ENI2.Properties.Settings> <ENI2.Properties.Settings>
<setting name="MainWindowPlacement" serializeAs="String"> <setting name="MainWindowPlacement" serializeAs="String">
<value /> <value/>
</setting> </setting>
</ENI2.Properties.Settings> </ENI2.Properties.Settings>
</userSettings> </userSettings>

View File

@ -750,7 +750,7 @@ namespace ENI2
vViolations.AddRange(violations); vViolations.AddRange(violations);
} }
#region 12.11.18 / 6.3.21 / 23.5.22: globale Plausi-Prüfungen #region 12.11.18 / 6.3.21 / 23.5.22 / 26.10.24: globale Plausi-Prüfungen
Message crewaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA); Message crewaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA);
Message crewdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD); Message crewdMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD);
@ -764,6 +764,8 @@ namespace ENI2
Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT); Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT);
Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS); Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS);
Message servMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SERV); Message servMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SERV);
Message statMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.STAT);
Message pre72hMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PRE72H);
#region CREW / PAS Count Plausibility #region CREW / PAS Count Plausibility
@ -1117,6 +1119,20 @@ namespace ENI2
#endregion #endregion
#region Tanker validation STAT/PRE72H
if ((statMessage.Elements[0] is STAT stat) && (pre72hMessage.Elements[0] is PRE72H pre72h))
{
if((pre72h.Tanker ?? false) != (stat.IsTanker ?? false))
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.LIST_EMPTY, "Tanker: Please check PRE72H / STAT", null, "PRE72H / STAT", null, "STAT");
mv.MessageGroupName = Properties.Resources.textPortNotification;
vViolations.Add(mv);
}
}
#endregion
#endregion #endregion
foreach (MessageError me in vErrors) foreach (MessageError me in vErrors)

View File

@ -14,6 +14,7 @@ using System.IO;
using System; using System;
using Microsoft.Win32; using Microsoft.Win32;
using System.Diagnostics; using System.Diagnostics;
using System.Threading.Tasks;
namespace ENI2.DetailViewControls namespace ENI2.DetailViewControls
{ {
@ -178,7 +179,7 @@ namespace ENI2.DetailViewControls
#region init WSDP provider #region init WSDP provider
InitTemplates(); await InitTemplates();
this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates; this.comboBox_WSDPTemplate.ItemsSource = _wsdpTemplates;
@ -188,7 +189,7 @@ namespace ENI2.DetailViewControls
#region Waste receipt grid event handler #region Waste receipt grid event handler
private void DataGridWasteReceipt_CreateRequested() private async void DataGridWasteReceipt_CreateRequested()
{ {
EditWasteReceiptDialog epd = new EditWasteReceiptDialog(); EditWasteReceiptDialog epd = new EditWasteReceiptDialog();
epd.WAS_RCPT = new WAS_RCPT(); epd.WAS_RCPT = new WAS_RCPT();
@ -219,7 +220,8 @@ namespace ENI2.DetailViewControls
this.dataGridWasteReceived.ItemsSource = null; this.dataGridWasteReceived.ItemsSource = null;
dataGridWasteReceipt_SelectionChanged(this, null); dataGridWasteReceipt_SelectionChanged(this, null);
} }
InitTemplates(); // templates might have changed in the dialog
await InitTemplates(); // templates might have changed in the dialog
} }
private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj) private void DataGridWasteReceipt_DeleteRequested(DatabaseEntity obj)
@ -238,7 +240,7 @@ namespace ENI2.DetailViewControls
} }
} }
private void DataGridWasteReceipt_EditRequested(DatabaseEntity obj) private async void DataGridWasteReceipt_EditRequested(DatabaseEntity obj)
{ {
EditWasteReceiptDialog epd = new EditWasteReceiptDialog(); EditWasteReceiptDialog epd = new EditWasteReceiptDialog();
epd.WAS_RCPT = obj as WAS_RCPT; epd.WAS_RCPT = obj as WAS_RCPT;
@ -265,7 +267,7 @@ namespace ENI2.DetailViewControls
this.dataGridWasteReceipt.Items.Refresh(); this.dataGridWasteReceipt.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT); this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
dataGridWasteReceipt_SelectionChanged(this, null); dataGridWasteReceipt_SelectionChanged(this, null);
InitTemplates(); // templates might have changed in the dialog await InitTemplates(); // templates might have changed in the dialog
} }
private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e) private void DataGridWasteReceipt_AddingNewItem(object sender, AddingNewItemEventArgs e)
@ -595,10 +597,11 @@ namespace ENI2.DetailViewControls
#endregion #endregion
#region Waste disposal Service Provider templates event handler #region Waste disposal Service Provider templates event handler
private async void InitTemplates() private async Task InitTemplates()
{ {
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync(); _wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
_wsdpTemplates.Sort(); _wsdpTemplates.Sort();

View File

@ -30,14 +30,14 @@
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<InstallUrl>http://192.168.2.24/eni2.publish/</InstallUrl> <InstallUrl>http://192.168.2.24/eni2.publish/</InstallUrl>
<SupportUrl>http://www.textbausteine.net/</SupportUrl> <SupportUrl>http://www.textbausteine.net/</SupportUrl>
<ProductName>ENI 2</ProductName> <ProductName>ENI</ProductName>
<PublisherName>Informatikbüro Daniel Schick</PublisherName> <PublisherName>Informatikbüro Daniel Schick</PublisherName>
<SuiteName>NSW</SuiteName> <SuiteName>NSW</SuiteName>
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>6</ApplicationRevision> <ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>7.2.4.6</ApplicationVersion> <ApplicationVersion>7.2.5.3</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -38,11 +38,11 @@
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" /> <Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Margin="2" Grid.ColumnSpan="2" Width="auto" MaxLength="99" TextWrapping="Wrap" /> <TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Margin="2" Grid.ColumnSpan="2" Width="auto" MaxLength="99" TextWrapping="Wrap" />
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999" />
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownMaxCapacity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
<xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="4" Grid.Column="1" Name="doubleUpDownAmountRetained" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
<enictrl:LocodeControl Grid.Row="5" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" LocodeSource="SSN" /> <enictrl:LocodeControl Grid.Row="5" Grid.Column="1" x:Name="locodePortOfDeliveryRemainingWaste" LocodeSource="SSN" />
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownAmountGeneratedTilNextPort" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" /> <Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "2" Grid.Column="2" />
<Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" /> <Label Content="{x:Static p:Resources.textCubicMeters}" Grid.Row = "3" Grid.Column="2" />

View File

@ -26,7 +26,7 @@
<ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" /> <ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
<TextBox Name="textBoxDescription" Grid.Row="1" Margin="2" Grid.Column="1" Width="auto" MaxLength="99" TextWrapping="Wrap" /> <TextBox Name="textBoxDescription" Grid.Row="1" Margin="2" Grid.Column="1" Width="auto" MaxLength="99" TextWrapping="Wrap" />
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountReceived" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left"/> <xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountReceived" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2" FormatString="N3" TextAlignment="Left" Maximum="9999.999"/>
</Grid> </Grid>
</enictrl:EditWindowBase> </enictrl:EditWindowBase>

View File

@ -10,9 +10,9 @@
xmlns:util="clr-namespace:ENI2.Util" xmlns:util="clr-namespace:ENI2.Util"
xmlns:local="clr-namespace:ENI2" xmlns:local="clr-namespace:ENI2"
mc:Ignorable="d" mc:Ignorable="d"
Title="ENI 2" Title="ENI 2"
Height="{util:SettingBinding Height}" Width="{util:SettingBinding Width}" Height="{util:SettingBinding Height}" Width="{util:SettingBinding Width}"
Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
SourceInitialized="Window_SourceInitialized"> SourceInitialized="Window_SourceInitialized">
<Window.CommandBindings> <Window.CommandBindings>

View File

@ -101,7 +101,7 @@ namespace ENI2.Report
string migraTempFile = string.Format("{1}\\{0}.mdddl", filenameCore, Path.GetDirectoryName(filename)); string migraTempFile = string.Format("{1}\\{0}.mdddl", filenameCore, Path.GetDirectoryName(filename));
MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, migraTempFile); MigraDoc.DocumentObjectModel.IO.DdlWriter.WriteToFile(document, migraTempFile);
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true); PdfDocumentRenderer renderer = new PdfDocumentRenderer();
renderer.Document = document; renderer.Document = document;
renderer.RenderDocument(); renderer.RenderDocument();
@ -1250,8 +1250,9 @@ namespace ENI2.Report
private static void CreateWAS_RCPTTable(Document document, Message message) private static void CreateWAS_RCPTTable(Document document, Message message)
{ {
foreach (WAS_RCPT was_rpct in message.Elements) for (int i = 0; i < message.Elements.Count; i++)
{ {
WAS_RCPT was_rpct = (WAS_RCPT)message.Elements[i];
document.LastSection.AddParagraph(""); document.LastSection.AddParagraph("");
Table table = AddGrayTable(document); Table table = AddGrayTable(document);

View File

@ -40,8 +40,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.17" targetFramework="net48" /> <package id="log4net" version="3.0.1" targetFramework="net48" />
</packages> </packages>

View File

@ -40,8 +40,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
@ -52,8 +52,8 @@
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WinSCPnet, Version=1.15.0.14955, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf, processorArchitecture=MSIL"> <Reference Include="WinSCPnet, Version=1.15.0.14991, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf, processorArchitecture=MSIL">
<HintPath>..\packages\WinSCP.6.3.4\lib\net40\WinSCPnet.dll</HintPath> <HintPath>..\packages\WinSCP.6.3.5\lib\net40\WinSCPnet.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -93,12 +93,12 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\WinSCP.6.3.4\build\WinSCP.targets" Condition="Exists('..\packages\WinSCP.6.3.4\build\WinSCP.targets')" /> <Import Project="..\packages\WinSCP.6.3.5\build\WinSCP.targets" Condition="Exists('..\packages\WinSCP.6.3.5\build\WinSCP.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\WinSCP.6.3.4\build\WinSCP.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WinSCP.6.3.4\build\WinSCP.targets'))" /> <Error Condition="!Exists('..\packages\WinSCP.6.3.5\build\WinSCP.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WinSCP.6.3.5\build\WinSCP.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.17" targetFramework="net48" /> <package id="log4net" version="3.0.1" targetFramework="net48" />
<package id="WinSCP" version="6.3.4" targetFramework="net48" /> <package id="WinSCP" version="6.3.5" targetFramework="net48" />
</packages> </packages>

View File

@ -191,7 +191,7 @@ namespace bsmd.dakosy
RemovalOperationResult removalResult = session.RemoveFiles(remoteDir + "/*.*"); RemovalOperationResult removalResult = session.RemoveFiles(remoteDir + "/*.*");
if ((removalResult.IsSuccess) && (removalResult.Removals.Count > 0)) if ((removalResult.IsSuccess) && (removalResult.Removals.Count > 0))
{ {
_log.InfoFormat("Removed {0} downloaded files on remote host", removalResult.Removals); _log.InfoFormat("Removed {0} downloaded file(s) on remote host", removalResult.Removals.Count);
} }
if (!removalResult.IsSuccess) if (!removalResult.IsSuccess)
{ {

View File

@ -510,9 +510,9 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations) public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{ {
if ((this.NoDPGOnBoardOnArrival ?? false) && this.MessageHeader.InternalStatus == Message.BSMDStatus.TOSEND) if (!(this.NoDPGOnBoardOnArrival ?? true) && !this.HasPositions)
{ {
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set!", null, this.Title, null, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set", null, this.Title, null, this.Tablename));
} }
if((NoDPGOnBoardOnArrival ?? false) && this.HasPositions) if((NoDPGOnBoardOnArrival ?? false) && this.HasPositions)

View File

@ -62,7 +62,8 @@ namespace bsmd.database
} }
else else
{ {
_log.ErrorFormat("trying to deque a message from telemetry that we don't know about. Provider: {0} MessageId: {1}", // this can happen if the service gets re-started and not all sent messages have yet been received
_log.WarnFormat("trying to deque a message from telemetry that we don't know about. Provider: {0} MessageId: {1}",
provider.ToString(), message.Id.Value); provider.ToString(), message.Id.Value);
} }
} }

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")] [assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")] [assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("7.2.4")] [assembly: AssemblyInformationalVersion("7.2.5")]
[assembly: AssemblyCopyright("Copyright © 2014-2024 schick Informatik")] [assembly: AssemblyCopyright("Copyright © 2014-2024 schick Informatik")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("7.2.4.*")] [assembly: AssemblyVersion("7.2.5.*")]

View File

@ -254,17 +254,17 @@ namespace bsmd.database
if (!this.HasValidWasteCode) if (!this.HasValidWasteCode)
violations.Add(RuleEngine.CreateViolation(ValidationCode.V784, "WasteCode", null, this.Title, this.Identifier, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.V784, "WasteCode", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteDisposalAmount_MTQ > 10000) if (this.WasteDisposalAmount_MTQ >= 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount", null, this.Title, this.Identifier, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteCapacity_MTQ > 10000) if (this.WasteCapacity_MTQ >= 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste capacity", null, this.Title, this.Identifier, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste capacity too high", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteAmountRetained_MTQ > 10000) if (this.WasteAmountRetained_MTQ >= 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste amount retained", null, this.Title, this.Identifier, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste amount retained too high", null, this.Title, this.Identifier, this.Tablename));
if (this.WasteAmountGeneratedTillNextPort_MTQ > 10000) if (this.WasteAmountGeneratedTillNextPort_MTQ >= 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated till next port", null, this.Title, this.Identifier, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste generated till next port too high", null, this.Title, this.Identifier, this.Tablename));
if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ) if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename)); violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename));

View File

@ -136,8 +136,8 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations) public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{ {
if (this.AmountWasteReceived_MTQ > 10000) if (this.AmountWasteReceived_MTQ >= 10000)
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too big", null, this.Title, this.Identifier, this.Tablename)); errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename));
} }
#endregion #endregion

View File

@ -38,8 +38,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.17" targetFramework="net48" /> <package id="log4net" version="3.0.1" targetFramework="net48" />
</packages> </packages>

View File

@ -38,8 +38,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.17" targetFramework="net48" /> <package id="log4net" version="3.0.1" targetFramework="net48" />
</packages> </packages>

View File

@ -38,8 +38,8 @@
<AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\bsmdKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.17.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.17\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.17" targetFramework="net48" /> <package id="log4net" version="3.0.1" targetFramework="net48" />
</packages> </packages>

Binary file not shown.