fixed missing / wrong comparer logic in case Identifier is null on the object
This commit is contained in:
parent
272dbcc1f3
commit
0b2893ecde
@ -36,7 +36,7 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>3</ApplicationRevision>
|
||||
<ApplicationRevision>5</ApplicationRevision>
|
||||
<ApplicationVersion>7.12.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@ -145,7 +145,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((BRKA)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((BRKA)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -144,7 +144,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((BRKD)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((BRKD)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -133,7 +133,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((CallPurpose)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((CallPurpose)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -314,7 +314,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IBCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IBCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -214,7 +214,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IGCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IGCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -627,7 +627,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IMDGPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IMDGPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -262,7 +262,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((IMSBCPosition)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((IMSBCPosition)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -122,7 +122,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((InfectedArea)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((InfectedArea)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -242,7 +242,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((LADG)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((LADG)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -201,7 +201,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((LastTenPortFacilitiesCalled)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((LastTenPortFacilitiesCalled)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -227,7 +227,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((MARPOL_Annex_I_Position)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((MARPOL_Annex_I_Position)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -300,7 +300,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfCallLast30Days)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((PortOfCallLast30Days)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -120,7 +120,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((PortOfCallLast30DaysCrewJoinedShip)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -129,7 +129,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((PortOfItinerary)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((PortOfItinerary)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -131,7 +131,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SERV)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((SERV)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -147,7 +147,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((STO)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((STO)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -141,7 +141,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SanitaryMeasuresDetail)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((SanitaryMeasuresDetail)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -234,7 +234,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -115,7 +115,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((StowawaysJoiningLocation)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((StowawaysJoiningLocation)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -108,7 +108,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((SubsidiaryRisks)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((SubsidiaryRisks)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ namespace bsmd.database
|
||||
#region Properties
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalName { get; set; }
|
||||
@ -36,42 +36,42 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalFlag { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorCompanyName { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorStreetNameAndNumber { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(24)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorPostalCode { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorCity { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorCountry { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorPhone { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorFax { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalOperatorEmail { get; set; }
|
||||
@ -92,7 +92,7 @@ namespace bsmd.database
|
||||
public double? TowageOnArrivalBeam_MTR { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
[MaxLength(100)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalPurposeOfCall { get; set; }
|
||||
@ -102,7 +102,7 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public double? TowageOnArrivalDraught_DMT { get; set; }
|
||||
|
||||
[ShowReport]
|
||||
[ShowReport]
|
||||
[MaxLength(255)]
|
||||
[ENI2Validation]
|
||||
public string TowageOnArrivalRemarks { get; set; }
|
||||
@ -216,7 +216,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(9)) towa.TowageOnArrivalOperatorFax = reader.GetString(9);
|
||||
if (!reader.IsDBNull(10)) towa.TowageOnArrivalOperatorEmail = reader.GetString(10);
|
||||
if (!reader.IsDBNull(11)) towa.TowageOnArrivalGrossTonnage = reader.GetInt32(11);
|
||||
if (!reader.IsDBNull(12)) towa.TowageOnArrivalLengthOverall_MTR = (float) reader.GetDouble(12);
|
||||
if (!reader.IsDBNull(12)) towa.TowageOnArrivalLengthOverall_MTR = (float)reader.GetDouble(12);
|
||||
if (!reader.IsDBNull(13)) towa.TowageOnArrivalBeam_MTR = (float)reader.GetDouble(13);
|
||||
if (!reader.IsDBNull(14)) towa.TowageOnArrivalPurposeOfCall = reader.GetString(14);
|
||||
if (!reader.IsDBNull(15)) towa.TowageOnArrivalDraught_DMT = (float)reader.GetDouble(15);
|
||||
@ -271,13 +271,14 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TOWA)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((TOWA)obj).Identifier);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -254,7 +254,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TOWD)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((TOWD)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -104,7 +104,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((TreatmentFacilityProvider)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((TreatmentFacilityProvider)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -421,7 +421,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WAS_RCPT)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((WAS_RCPT)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -279,7 +279,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((Waste)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((Waste)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -110,7 +110,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WasteDisposalServiceProvider)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((WasteDisposalServiceProvider)obj).Identifier);
|
||||
}
|
||||
|
||||
@ -146,7 +146,8 @@ namespace bsmd.database
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is null)
|
||||
if (this.Identifier == null) return 1;
|
||||
if ((obj is null) || (((WasteReceived)obj).Identifier == null))
|
||||
return 1;
|
||||
return this.Identifier.CompareTo(((WasteReceived)obj).Identifier);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user