diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 477b6ae9..7e7fdc1a 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,7 +36,7 @@
5.4.0.0
true
publish.html
- 2
+ 3
7.6.0.%2a
false
true
diff --git a/ENI2/EditControls/EditCREWDialog.xaml.cs b/ENI2/EditControls/EditCREWDialog.xaml.cs
index c9fcae97..5b1bea43 100644
--- a/ENI2/EditControls/EditCREWDialog.xaml.cs
+++ b/ENI2/EditControls/EditCREWDialog.xaml.cs
@@ -31,13 +31,13 @@ namespace ENI2.EditControls
this.textBoxLastName.Text = this.CREW.CrewMemberLastName;
this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderDict;
- this.comboBoxGender.SelectedValue = (this.CREW.CrewMemberGender == null) ? null : this.CREW.CrewMemberGender.ToString();
+ this.comboBoxGender.SelectedValue = this.CREW.CrewMemberGender?.ToString();
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
- this.comboBoxIdDocType.SelectedValue = (this.CREW.CrewMemberIdentityDocumentType == null) ? null : this.CREW.CrewMemberIdentityDocumentType.ToString();
+ this.comboBoxIdDocType.SelectedValue = this.CREW.CrewMemberIdentityDocumentType?.ToString();
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
diff --git a/ENI2/EditControls/EditPasDialog.xaml.cs b/ENI2/EditControls/EditPasDialog.xaml.cs
index fee66aac..50ec611e 100644
--- a/ENI2/EditControls/EditPasDialog.xaml.cs
+++ b/ENI2/EditControls/EditPasDialog.xaml.cs
@@ -30,13 +30,13 @@ namespace ENI2.EditControls
this.textBoxLastName.Text = this.PAS.PassengerLastName;
this.textBoxFirstName.Text = this.PAS.PassengerFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderDict;
- this.comboBoxGender.SelectedValue = this.PAS.PassengerGender ?? -1;
+ this.comboBoxGender.SelectedValue = this.PAS.PassengerGender?.ToString();
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
- this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType ?? null;
+ this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType?.ToString();
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber;
this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation;
diff --git a/ENI2/Util/GlobalStructures.cs b/ENI2/Util/GlobalStructures.cs
index 589c1754..225688fd 100644
--- a/ENI2/Util/GlobalStructures.cs
+++ b/ENI2/Util/GlobalStructures.cs
@@ -134,18 +134,18 @@ namespace ENI2.Util
{
result = true;
}
- else if (o is string)
+ else if (o is string str)
{
- if (((string)o).Contains(cmb.Text, StringComparison.OrdinalIgnoreCase)) result = true;
+ if (str.Contains(cmb.Text, StringComparison.OrdinalIgnoreCase)) result = true;
}
- else if (o is System.Collections.Generic.KeyValuePair)
+ else if (o is System.Collections.Generic.KeyValuePair kvsPair)
{
- if (((System.Collections.Generic.KeyValuePair)o).Value.StartsWith(cmb.Text, StringComparison.OrdinalIgnoreCase))
+ if (kvsPair.Value.StartsWith(cmb.Text, StringComparison.OrdinalIgnoreCase))
result = true;
}
- else if (o is System.Collections.Generic.KeyValuePair)
+ else if (o is System.Collections.Generic.KeyValuePair kviPair)
{
- if (((System.Collections.Generic.KeyValuePair)o).Value.StartsWith(cmb.Text, StringComparison.OrdinalIgnoreCase))
+ if (kviPair.Value.StartsWith(cmb.Text, StringComparison.OrdinalIgnoreCase))
result = true;
}
return result;