Fixed port area data in sqlite and corrected some comparers
This commit is contained in:
parent
1643a22277
commit
ea31386310
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>5</ApplicationRevision>
|
||||
<ApplicationVersion>7.13.0.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>7.14.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -34,7 +34,7 @@ namespace ENI2.EditControls
|
||||
this.comboBoxShipSecurityLevel.ItemsSource = GlobalStructures.ShipSecurityLevels;
|
||||
|
||||
if (this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.HasValue)
|
||||
this.comboBoxShipSecurityLevel.SelectedIndex = (this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.Value - 1);
|
||||
this.comboBoxShipSecurityLevel.SelectedIndex = this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel.Value - 1;
|
||||
else
|
||||
this.comboBoxShipSecurityLevel.SelectedIndex = -1;
|
||||
|
||||
@ -48,18 +48,18 @@ namespace ENI2.EditControls
|
||||
public void CopyValuesToEntity()
|
||||
{
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityPortLoCode = this.locodePort.LocodeValue;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityPortName = this.textBoxPortName.Text;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityPortCountry = this.textBoxPortCountry.Text;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityPortName = this.textBoxPortName.Text.Trim();
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityPortCountry = this.textBoxPortCountry.Text.Trim();
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityDateOfArrival = this.datePickerATA.SelectedDate;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityDateOfDeparture = this.datePickerATD.SelectedDate;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityGISISCode = this.textBoxGisisCode.Text;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityGISISCode = this.textBoxGisisCode.Text.Trim();
|
||||
|
||||
if (this.comboBoxShipSecurityLevel.SelectedIndex == -1)
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = null;
|
||||
else
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityShipSecurityLevel = (byte?) (this.comboBoxShipSecurityLevel.SelectedIndex + 1);
|
||||
this.LastTenPortFacilitiesCalled.PortFacilityGISISCodeLocode = this.locodeGISIS.LocodeValue;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilitySecurityMattersToReport = this.textBoxSecurityMatters.Text;
|
||||
this.LastTenPortFacilitiesCalled.PortFacilitySecurityMattersToReport = this.textBoxSecurityMatters.Text.Trim();
|
||||
}
|
||||
|
||||
private void EditLast10PortFacilitiesDialog_OKClicked()
|
||||
|
||||
@ -147,9 +147,9 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is AGNT_Template)
|
||||
if (obj is AGNT_Template template)
|
||||
{
|
||||
return AgentTitle.CompareTo(((AGNT_Template)obj).AgentTitle);
|
||||
return AgentTitle.CompareTo(template.AgentTitle);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -152,6 +152,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((BRKA)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((BRKA)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((BRKA)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -151,6 +151,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((BRKD)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((BRKD)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((BRKD)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -136,6 +136,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((CallPurpose)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((CallPurpose)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((CallPurpose)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -153,10 +153,7 @@ namespace bsmd.database
|
||||
/// <param name="errors"></param>
|
||||
/// <param name="violations"></param>
|
||||
public virtual void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
errors = new List<MessageError>();
|
||||
violations = new List<MessageViolation>();
|
||||
}
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Diese Methode sollte eigentlich nie einen Effekt haben und dient nur dazu, dass keine Situation
|
||||
|
||||
@ -317,6 +317,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IBCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((IBCPosition)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((IBCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -217,6 +217,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IGCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((IGCPosition)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((IGCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -630,6 +630,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IMDGPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((IMDGPosition)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((IMDGPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -265,6 +265,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IMSBCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((IMSBCPosition)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((IMSBCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@ namespace bsmd.database
|
||||
/// </summary>
|
||||
public class MessageParagraph : IMessageParagraph
|
||||
{
|
||||
private List<IMessageParagraph> childParagraphs = new List<IMessageParagraph>();
|
||||
private List<KeyValuePair<string, string>> messageText = new List<KeyValuePair<string, string>>();
|
||||
private readonly List<IMessageParagraph> childParagraphs = new List<IMessageParagraph>();
|
||||
private readonly List<KeyValuePair<string, string>> messageText = new List<KeyValuePair<string, string>>();
|
||||
|
||||
public List<IMessageParagraph> ChildParagraphs
|
||||
{
|
||||
|
||||
@ -125,6 +125,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((InfectedArea)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((InfectedArea)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((InfectedArea)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -256,6 +256,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((LADG)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((LADG)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((LADG)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -180,10 +180,10 @@ namespace bsmd.database
|
||||
#region Validate
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
{
|
||||
|
||||
if (this.PortFacilityPortLoCode.IsNullOrEmpty())
|
||||
{
|
||||
{
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, "PortFacilityPortLocode", null, this.Title, this.Identifier, this.SEC.Tablename));
|
||||
}
|
||||
|
||||
@ -193,6 +193,11 @@ namespace bsmd.database
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.LOCODE, null, this.PortFacilityPortLoCode, this.Title, this.Identifier, this.SEC.Tablename));
|
||||
}
|
||||
|
||||
if(!this.PortFacilityGISISCode.IsNullOrEmpty() && !this.PortFacilityGISISCode.IsNumber())
|
||||
{
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.INVALID_NUMBER_CHARS, "GISIS Code", this.PortFacilityGISISCode, this.Title, this.Identifier, this.SEC.Tablename));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -204,6 +209,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((LastTenPortFacilitiesCalled)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((LastTenPortFacilitiesCalled)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((LastTenPortFacilitiesCalled)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -230,6 +230,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((MARPOL_Annex_I_Position)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((MARPOL_Annex_I_Position)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((MARPOL_Annex_I_Position)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -303,6 +303,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfCallLast30Days)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((PortOfCallLast30Days)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((PortOfCallLast30Days)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -123,6 +123,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -132,6 +132,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfItinerary)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((PortOfItinerary)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((PortOfItinerary)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("7.13.0")]
|
||||
[assembly: AssemblyInformationalVersion("7.14.0")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2023 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("7.13.0.*")]
|
||||
[assembly: AssemblyVersion("7.14.0.*")]
|
||||
|
||||
|
||||
@ -134,6 +134,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SERV)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((SERV)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((SERV)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -150,6 +150,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((STO)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((STO)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((STO)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -144,6 +144,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SanitaryMeasuresDetail)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((SanitaryMeasuresDetail)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((SanitaryMeasuresDetail)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -237,6 +237,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -118,6 +118,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((StowawaysJoiningLocation)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((StowawaysJoiningLocation)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((StowawaysJoiningLocation)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -111,6 +111,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SubsidiaryRisks)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((SubsidiaryRisks)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((SubsidiaryRisks)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -274,6 +274,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TOWA)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((TOWA)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((TOWA)obj).Identifier);
|
||||
|
||||
#endregion
|
||||
|
||||
@ -257,6 +257,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TOWD)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((TOWD)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((TOWD)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
@ -113,6 +113,8 @@ namespace bsmd.database
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WasteDisposalServiceProvider)obj).Identifier == null))
|
||||
return 1;
|
||||
if (Int32.TryParse(((WasteDisposalServiceProvider)obj).Identifier, out int i1) && Int32.TryParse(this.Identifier, out int i2))
|
||||
return i2.CompareTo(i1);
|
||||
return this.Identifier.CompareTo(((WasteDisposalServiceProvider)obj).Identifier);
|
||||
}
|
||||
|
||||
|
||||
BIN
misc/db.sqlite
BIN
misc/db.sqlite
Binary file not shown.
Loading…
Reference in New Issue
Block a user