5.0.18: ein paar aktuelle Korrekturpunkte bearbeitet

This commit is contained in:
Daniel Schick 2018-09-06 18:08:16 +00:00
parent e3fea3560f
commit e3e89271d3
8 changed files with 18 additions and 15 deletions

View File

@ -70,10 +70,16 @@ namespace ENI2.EditControls
bool imo_OR_eni = ((doubleUpDownIMO.Value.HasValue) && (doubleUpDownIMO.Value >= 1000000) && (doubleUpDownIMO.Value <= 9999999)) ||
((doubleUpDownENI.Value.HasValue) && (doubleUpDownENI.Value >= 100000) && (doubleUpDownENI.Value <= 99999999));
if(!this.textBoxVisitTransitId.Text.IsNullOrEmpty())
{
bool isValidId = bsmd.database.Util.IsVisitId(textBoxVisitTransitId.Text) || bsmd.database.Util.IsTransitId(textBoxVisitTransitId.Text);
isComplete &= isValidId;
}
isComplete &= imo_OR_eni;
string locode = this.locodePoC.LocodeValue;
bool validLocode = (locode != null) && (locode.Length == 5) && (locode.StartsWith("DE") || locode.StartsWith("DK") || locode.Equals("ZZNOK"));
bool validLocode = (locode?.Length == 5) && (locode.StartsWith("DE") || locode.StartsWith("DK") || locode.Equals("ZZNOK"));
isComplete &= validLocode;

View File

@ -42,7 +42,7 @@
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
<DatePicker Grid.Row="3" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199">
<DatePicker.BlackoutDates>
<CalendarDateRange Start="1/1/0001" End="1/1/1900"/>
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
</DatePicker.BlackoutDates>

View File

@ -44,7 +44,7 @@
<ComboBox Grid.Row="2" Grid.Column="1" Name="comboBoxNationality" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
<DatePicker Grid.Row="2" Grid.Column="3" Name="datePickerDateOfBirth" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199">
<DatePicker.BlackoutDates>
<CalendarDateRange Start="1/1/0001" End="1/1/1900"/>
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
</DatePicker.BlackoutDates>
</DatePicker>

View File

@ -36,7 +36,7 @@
<Label Name="labelAmountWasteDischarged" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textWasteAmountDischargedLastPort}" />
<ComboBox Name="comboBoxWasteCode" Grid.Row="0" Grid.Column="1" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
<Label Name="labelWasteCodeText" Grid.Row="0" Grid.Column="2" />
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Width="auto" MaxLength="100" />
<TextBox Name="textBoxDescription" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Width="auto" MaxLength="99" />
<xctk:DoubleUpDown Grid.Row="2" Grid.Column="1" Name="doubleUpDownAmountDisposed" 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"/>

Binary file not shown.

View File

@ -17,9 +17,6 @@ namespace bsmd.database
{
public class NOA_NOD : DatabaseEntity, ISublistContainer
{
ObservableCollection<DatabaseEntity> callPurposes = new ObservableCollection<DatabaseEntity>();
public NOA_NOD()
{
this.tablename = "[dbo].[NOA_NOD]";
@ -38,7 +35,7 @@ namespace bsmd.database
public DateTime? ETDFromPortOfCall { get; set; }
[Validation1(ValidationCode.LIST_EMPTY)]
public ObservableCollection<DatabaseEntity> CallPurposes { get { return this.callPurposes; } }
public ObservableCollection<DatabaseEntity> CallPurposes { get; private set; } = new ObservableCollection<DatabaseEntity>();
[ShowReport]
[Validation2(ValidationCode.NOT_NULL)]
@ -244,20 +241,20 @@ namespace bsmd.database
errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromKielCanal", this.ETDFromKielCanal.ToString(), this.Title, null, this.Tablename));
}
if((this.LastPort != null) && !this.LastPort.Equals("ZZUKN") && !this.ETDFromLastPort.HasValue)
if((this.LastPort?.Equals("ZZUKN") == false) && !this.ETDFromLastPort.HasValue)
errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, "ETDFromLastPort", null, this.Title, null, this.Tablename));
if((this.LastPort != null) && this.LastPort.Equals("ZZUKN") && this.ETDFromLastPort.HasValue)
if((this.LastPort?.Equals("ZZUKN") == true) && this.ETDFromLastPort.HasValue)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE_ZZUKN, "ETDFromLastPort", null, this.Title, null, this.Tablename));
if (this.ETDFromPortOfCall.HasValue && this.ETAToNextPort.HasValue && !this.NextPort.Equals("ZZUKN") &&
(this.ETAToNextPort <= ETDFromPortOfCall))
errors.Add(RuleEngine.CreateError(ValidationCode.E122, "ETAToNextPort", null, this.Title, null, this.Tablename));
if ((this.NextPort != null) && !this.NextPort.Equals("ZZUKN") && !this.ETAToNextPort.HasValue)
if ((this.NextPort?.Equals("ZZUKN") == false) && !this.ETAToNextPort.HasValue)
errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, "ETAToNextPort", null, this.Title, null, this.Tablename));
if((this.NextPort != null) && this.NextPort.Equals("ZZUKN") && this.ETAToNextPort.HasValue)
if((this.NextPort?.Equals("ZZUKN") == true) && this.ETAToNextPort.HasValue)
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE_ZZUKN, "ETAToNextPort", null, this.Title, null, this.Tablename));
if (this.ETDFromLastPort.HasValue && this.ETAToPortOfCall.HasValue && (this.ETDFromLastPort >= this.ETAToPortOfCall))
@ -318,7 +315,7 @@ namespace bsmd.database
noanod.IsAnchored = this.IsAnchored;
noanod.id = null;
noanod.callPurposes = new ObservableCollection<DatabaseEntity>();
noanod.CallPurposes = new ObservableCollection<DatabaseEntity>();
foreach (CallPurpose cp in this.CallPurposes)
{

View File

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

View File

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