Bugfixing, Version 7.0.0.11 erzeugt (Testing)
This commit is contained in:
parent
03c31936de
commit
10c4171190
@ -78,7 +78,7 @@
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textCrewFunctionOnBoard}" Binding="{Binding CrewMemberDuty, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textNationality}" Binding="{Binding CrewMemberNationality, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textPlaceOfBirth}" Binding="{Binding CrewMemberPlaceOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding CrewMemberCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<!--<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding CrewMemberCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />--> <!-- XXX: TODO -->
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textDateOfBirth}" Binding="{Binding CrewMemberDateOfBirth, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocType}" Binding="{Binding CrewMemberIdentityDocumentTypeDisplay}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocNumber}" Binding="{Binding CrewMemberIdentityDocumentId, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
@ -163,15 +163,15 @@
|
||||
<DataGridCheckBoxColumn Header="{x:Static p:Resources.textTransitPassenger}" Binding="{Binding PassengerInTransit}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textNationality}" Binding="{Binding PassengerNationality}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textPlaceOfBirth}" Binding="{Binding PassengerPlaceOfBirth}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding PassengerCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<!--<DataGridTextColumn Header="{x:Static p:Resources.textCountryOfBirth}" Binding="{Binding PassengerCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />-->
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textDateOfBirth}" Binding="{Binding PassengerDateOfBirth, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocType}" Binding="{Binding PassengerIdentityDocumentTypeDisplay}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textIdDocNumber}" Binding="{Binding PassengerIdentityDocumentId}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentIssuingState}" Binding="{Binding PassengerIdentityDocumentIssuingState}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentExpiryDate}" Binding="{Binding PassengerIdentityDocumentExpiryDate, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding PassengerVisaNumber}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textEmergencyCare}" Binding="{Binding EmergencyCare, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<DataGridTextColumn Header="{x:Static p:Resources.textEmergencyContactNumber}" Binding="{Binding EmergencyContactNumber, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
||||
<!--<DataGridTextColumn Header="{x:Static p:Resources.textEmergencyCare}" Binding="{Binding EmergencyCare, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />--> <!-- XXX : TODO -->
|
||||
<!-- <DataGridTextColumn Header="{x:Static p:Resources.textEmergencyContactNumber}" Binding="{Binding EmergencyContactNumber, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> -->
|
||||
|
||||
</DataGrid.Columns>
|
||||
</enictrl:ENIDataGrid>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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<DatabaseEntity>(_wasRcptMessage.Elements));
|
||||
DatabaseEntity.ResetIdentifiers(new List<DatabaseEntity>(_selectedWAS_RCPT.WasteReceived));
|
||||
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
|
||||
this.dataGridWasteReceived.Items.Refresh();
|
||||
}
|
||||
|
||||
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>10</ApplicationRevision>
|
||||
<ApplicationVersion>7.0.0.10</ApplicationVersion>
|
||||
<ApplicationRevision>11</ApplicationRevision>
|
||||
<ApplicationVersion>7.0.0.11</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<Label Name="labelNationality" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textNationality}" />
|
||||
<Label Name="labelDateOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textDateOfBirth}" />
|
||||
<Label Name="labelIdDocType" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
||||
<Label Name="labelCountryOfBirth" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textCountryOfBirth}" />
|
||||
<!--<Label Name="labelCountryOfBirth" Grid.Row="4" Grid.Column="1" Content="{x:Static p:Resources.textCountryOfBirth}" Grid.ColumnSpan="2" Margin="263,0,1,0" />--> <!-- XXX : TODO -->
|
||||
<Label Name="labelIdDocNumber" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
||||
<Label Name="labelVisaNumber" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
||||
<Label Name="labelIssuingState" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textDocumentIssuingState}" />
|
||||
@ -53,7 +53,7 @@
|
||||
</DatePicker.BlackoutDates>
|
||||
</DatePicker>
|
||||
<ComboBox Grid.Row="4" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}" />
|
||||
<ComboBox Grid.Row="4" Grid.Column="3" Width="auto" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
<!-- <ComboBox Grid.Row="4" Grid.Column="3" Width="auto" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>-->
|
||||
<TextBox Grid.Row="5" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
|
||||
<ComboBox Grid.Row="6" Grid.Column="3" Width="auto" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<Label Name="labelNationality" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textNationality}" />
|
||||
<Label Name="labelDateOfBirth" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textDateOfBirth}" />
|
||||
<Label Name="labelIdDocType" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textIdDocType}" />
|
||||
<Label Name="labelCountryOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCountryOfBirth}" />
|
||||
<!--<Label Name="labelCountryOfBirth" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCountryOfBirth}" />-->
|
||||
<Label Name="labelIdDocNumber" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
|
||||
<Label Name="labelVisaNumber" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" />
|
||||
<Label Name="labelPortOfEmbarkation" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textPortOfEmbarkation}" />
|
||||
@ -42,8 +42,8 @@
|
||||
<Label Name="labelTransitPassenger" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textTransitPassenger}" />
|
||||
<Label Name="labelIssuingState" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDocumentIssuingState}" />
|
||||
<Label Name="labelExpiryDate" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textDocumentExpiryDate}" />
|
||||
<Label Name="labelEmergencyCare" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyCare}" />
|
||||
<Label Name="labelEmergencyContactNumber" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyContactNumber}" />
|
||||
<!--<Label Name="labelEmergencyCare" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyCare}" />
|
||||
<Label Name="labelEmergencyContactNumber" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textEmergencyContactNumber}" />-->
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
@ -57,7 +57,7 @@
|
||||
</DatePicker.BlackoutDates>
|
||||
</DatePicker>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
||||
<ComboBox Grid.Row="3" Grid.Column="3" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
|
||||
<!--<ComboBox Grid.Row="3" Grid.Column="3" Name="comboBoxCountryOfBirth" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />-->
|
||||
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Width="auto" Name="textBoxVisaNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<enictrl:LocodeControl x:Name="locodePortOfEmbarkation" Grid.Row="5" Grid.Column="3" />
|
||||
@ -70,7 +70,7 @@
|
||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||
</DatePicker.BlackoutDates>
|
||||
</DatePicker>
|
||||
<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEmergencyCare" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Width="auto" Name="textBoxEmergencyContactNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<!--<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEmergencyCare" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Width="auto" Name="textBoxEmergencyContactNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />-->
|
||||
</Grid>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -360,7 +360,7 @@ namespace bsmd.database
|
||||
get {
|
||||
List<KeyValuePair<string, string>> result = new List<KeyValuePair<string, string>>();
|
||||
|
||||
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<string, string>(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 "";
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user