diff --git a/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml b/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
index 653d0816..1c06aaa5 100644
--- a/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
+++ b/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
@@ -78,7 +78,7 @@
-
+
@@ -163,15 +163,15 @@
-
+
-
-
+
+
diff --git a/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs b/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
index f4d28cb6..b3bc701a 100644
--- a/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
@@ -962,7 +962,7 @@ namespace ENI2.DetailViewControls
}
if (importPassenger.Count > 0)
- {
+ {
this.dataGridPassengerList.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.PAS);
MessageBox.Show(String.Format(Properties.Resources.textPassengerImported, importPassenger.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
diff --git a/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
index b9e0452c..6738becf 100644
--- a/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
@@ -461,8 +461,7 @@ namespace ENI2.DetailViewControls
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(this.Core); // löst auch den Watchdog aus
this.OnRequestSendValidation();
this.dataGridMessages.Items.Refresh();
-
-
+
/*
if (this.mssd == null)
diff --git a/ENI2/DetailViewControls/WasteDetailControl.xaml.cs b/ENI2/DetailViewControls/WasteDetailControl.xaml.cs
index 484e87b1..7d1e1890 100644
--- a/ENI2/DetailViewControls/WasteDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/WasteDetailControl.xaml.cs
@@ -273,7 +273,7 @@ namespace ENI2.DetailViewControls
// are you sure dialog is in base class
_selectedWAS_RCPT.WasteReceived.Remove(wasteReceived);
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(wasteReceived);
- DatabaseEntity.ResetIdentifiers(new List(_wasRcptMessage.Elements));
+ DatabaseEntity.ResetIdentifiers(new List(_selectedWAS_RCPT.WasteReceived));
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
this.dataGridWasteReceived.Items.Refresh();
}
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 960f325b..81414ef6 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 10
- 7.0.0.10
+ 11
+ 7.0.0.11
false
true
true
diff --git a/ENI2/EditControls/EditCREWDialog.xaml b/ENI2/EditControls/EditCREWDialog.xaml
index d22fe2f8..f15804ff 100644
--- a/ENI2/EditControls/EditCREWDialog.xaml
+++ b/ENI2/EditControls/EditCREWDialog.xaml
@@ -34,7 +34,7 @@
-
+
@@ -53,7 +53,7 @@
-
+
diff --git a/ENI2/EditControls/EditCREWDialog.xaml.cs b/ENI2/EditControls/EditCREWDialog.xaml.cs
index ae90b998..6bfe2110 100644
--- a/ENI2/EditControls/EditCREWDialog.xaml.cs
+++ b/ENI2/EditControls/EditCREWDialog.xaml.cs
@@ -46,8 +46,8 @@ namespace ENI2.EditControls
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxIssuingState.SelectedValue = this.CREW.CrewMemberIdentityDocumentIssuingState;
this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
- this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
- this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
+ // this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict; // XXX: TODO
+ // this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
// this.textBoxEffects.Text = this.CREW.Effects;
this.OKClicked += EditCREWDialog_OKClicked;
this.AddVisible = true;
@@ -68,7 +68,7 @@ namespace ENI2.EditControls
this.CREW.CrewMemberVisaNumber = this.textBoxVisaNumber.Text.Trim();
this.CREW.CrewMemberIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string)this.comboBoxIssuingState.SelectedValue;
this.CREW.CrewMemberIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
- this.CREW.CrewMemberCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
+ // this.CREW.CrewMemberCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
// this.CREW.Effects = this.textBoxEffects.Text.Trim();
}
diff --git a/ENI2/EditControls/EditPasDialog.xaml b/ENI2/EditControls/EditPasDialog.xaml
index 54732625..8bc3731c 100644
--- a/ENI2/EditControls/EditPasDialog.xaml
+++ b/ENI2/EditControls/EditPasDialog.xaml
@@ -34,7 +34,7 @@
-
+
@@ -42,8 +42,8 @@
-
-
+
@@ -57,7 +57,7 @@
-
+
@@ -70,7 +70,7 @@
-
-
+
diff --git a/ENI2/EditControls/EditPasDialog.xaml.cs b/ENI2/EditControls/EditPasDialog.xaml.cs
index 0daa8960..10575754 100644
--- a/ENI2/EditControls/EditPasDialog.xaml.cs
+++ b/ENI2/EditControls/EditPasDialog.xaml.cs
@@ -48,10 +48,11 @@ namespace ENI2.EditControls
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxIssuingState.SelectedValue = this.PAS.PassengerIdentityDocumentIssuingState;
this.datePickerExpiryDate.SelectedDate = this.PAS.PassengerIdentityDocumentExpiryDate;
- this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
- this.comboBoxCountryOfBirth.SelectedValue = this.PAS.PassengerCountryOfBirth;
- this.textBoxEmergencyCare.Text = this.PAS.EmergencyCare;
- this.textBoxEmergencyContactNumber.Text = this.PAS.EmergencyContactNumber;
+ // XXX : TODO
+ //this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
+ //this.comboBoxCountryOfBirth.SelectedValue = this.PAS.PassengerCountryOfBirth;
+ //this.textBoxEmergencyCare.Text = this.PAS.EmergencyCare;
+ //this.textBoxEmergencyContactNumber.Text = this.PAS.EmergencyContactNumber;
this.OKClicked += EditPasDialog_OKClicked;
this.AddVisible = true;
@@ -74,9 +75,10 @@ namespace ENI2.EditControls
this.PAS.PassengerInTransit = this.checkBoxTransitPassenger.IsChecked;
this.PAS.PassengerIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string)this.comboBoxIssuingState.SelectedValue;
this.PAS.PassengerIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
- this.PAS.PassengerCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
- this.PAS.EmergencyCare = this.textBoxEmergencyCare.Text.Trim();
- this.PAS.EmergencyContactNumber = this.textBoxEmergencyContactNumber.Text.Trim();
+ // XXX : TODO
+ // this.PAS.PassengerCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
+ //this.PAS.EmergencyCare = this.textBoxEmergencyCare.Text.Trim();
+ //this.PAS.EmergencyContactNumber = this.textBoxEmergencyContactNumber.Text.Trim();
}
private void EditPasDialog_OKClicked()
diff --git a/bsmd.database/DBManager.cs b/bsmd.database/DBManager.cs
index 5c13c238..c3494875 100644
--- a/bsmd.database/DBManager.cs
+++ b/bsmd.database/DBManager.cs
@@ -14,7 +14,6 @@ using System.Data.SqlClient;
using System.Diagnostics;
using Newtonsoft.Json;
using log4net;
-using System.Reflection;
using System.Text.RegularExpressions;
namespace bsmd.database
diff --git a/bsmd.database/DatabaseEntity.cs b/bsmd.database/DatabaseEntity.cs
index 6854cc38..738df298 100644
--- a/bsmd.database/DatabaseEntity.cs
+++ b/bsmd.database/DatabaseEntity.cs
@@ -360,7 +360,7 @@ namespace bsmd.database
get {
List> result = new List>();
- Type objType = this.GetType();
+ Type objType = this.GetType();
var props = objType.GetProperties().Where(
prop => Attribute.IsDefined(prop, typeof(ShowReportAttribute)));
@@ -373,18 +373,18 @@ namespace bsmd.database
ReportDisplayNameAttribute reportDisplayNameAttribute = Attribute.GetCustomAttribute(property, typeof(ReportDisplayNameAttribute))
as ReportDisplayNameAttribute;
displayName = reportDisplayNameAttribute.DisplayName;
- }
+ }
result.Add(new KeyValuePair(displayName, this.GetDisplayValue(property)));
- }
+ }
- return result;
+ return result;
}
}
public virtual string GetDisplayValue(PropertyInfo property)
{
- bool isDouble = (property.PropertyType == typeof(double?));
- bool isDateTime = (property.PropertyType == typeof(DateTime?));
+ bool isDouble = property.PropertyType == typeof(double?);
+ bool isDateTime = property.PropertyType == typeof(DateTime?);
object propValue = property.GetValue(this, null);
if (propValue == null) return "";
diff --git a/bsmd.database/MessageCore.cs b/bsmd.database/MessageCore.cs
index 7542b28d..dc8e0950 100644
--- a/bsmd.database/MessageCore.cs
+++ b/bsmd.database/MessageCore.cs
@@ -463,7 +463,7 @@ namespace bsmd.database
"QueryNSWStatus = @P36, ExcelImportComplete = @P37, PONumber = @P38, Flags = @P39, POATA = @P40 WHERE Id = @ID", this.Tablename);
scmd.CommandText = query;
}
- }
+ }
public override void PrepareLoadCommand(System.Data.IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
{
diff --git a/bsmd.database/WAS.cs b/bsmd.database/WAS.cs
index f51ab183..2a3d595d 100644
--- a/bsmd.database/WAS.cs
+++ b/bsmd.database/WAS.cs
@@ -566,9 +566,12 @@ namespace bsmd.database
foreach (Waste waste in this.Waste)
{
- Waste clonedWaste = waste.Clone() as Waste;
- clonedWaste.WAS = was;
- was.Waste.Add(clonedWaste);
+ if (WasteCodeDict.ContainsKey(waste.WasteType.ToString())) // 22.3.22: Don't copy old waste codes
+ {
+ Waste clonedWaste = waste.Clone() as Waste;
+ clonedWaste.WAS = was;
+ was.Waste.Add(clonedWaste);
+ }
}
foreach (WasteDisposalServiceProvider wdsp in this.WasteDisposalServiceProvider)
diff --git a/bsmd.database/WAS_RCPT.cs b/bsmd.database/WAS_RCPT.cs
index df978c77..551a3027 100644
--- a/bsmd.database/WAS_RCPT.cs
+++ b/bsmd.database/WAS_RCPT.cs
@@ -346,6 +346,33 @@ namespace bsmd.database
RuleEngine.ValidateProperties(wasteReceived, errors, violations);
wasteReceived.Validate(errors, violations);
}
+
+ bool entryMissing = false;
+ string missingType = "";
+
+ foreach (string wasteCodeString in WAS.WasteCodes)
+ {
+ bool codeFound = false;
+ foreach (WasteReceived wr in this.WasteReceived)
+ {
+ if (wr.WasteCode.Equals(wasteCodeString))
+ {
+ codeFound = true; break;
+ }
+ }
+ if (!codeFound)
+ {
+ missingType = wasteCodeString;
+ entryMissing = true;
+ break;
+ }
+ }
+
+ if (entryMissing)
+ {
+ errors.Add(RuleEngine.CreateError(ValidationCode.POSITION_COUNT, string.Format("Waste {0}", missingType), null, this.Title, null, this.Tablename));
+ }
+
}
#endregion