Korrekturen für 7.0

This commit is contained in:
Daniel Schick 2022-02-24 12:38:19 +01:00
parent 428ba1f91a
commit 89d33a261d
21 changed files with 147 additions and 133 deletions

View File

@ -741,13 +741,7 @@ namespace ENI2
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "No Schengen details", null, "CREWA", crewa.Identifier, "CREWA"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "No Schengen details", null, "CREWA", crewa.Identifier, "CREWA");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if(!crewaIsSchengen && crewa.HasSchengenDetails)
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "Schengen details but checkbox not set", null, "CREWA", crewa.Identifier, "CREWA");
mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv);
}
} }
} }
@ -769,13 +763,7 @@ namespace ENI2
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "No Schengen details", null, "CREWD", crewd.Identifier, "CREWD"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "No Schengen details", null, "CREWD", crewd.Identifier, "CREWD");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if (!crewdIsSchengen && crewd.HasSchengenDetails)
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V182, "Schengen details but checkbox not set", null, "CREWD", crewd.Identifier, "CREWD");
mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv);
}
} }
} }
@ -798,25 +786,13 @@ namespace ENI2
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "No Schengen details", null, "PASA", pasa.Identifier, "PASA"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "No Schengen details", null, "PASA", pasa.Identifier, "PASA");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if (!pasIsSchengen && pasa.HasSchengenDetails)
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "Schengen details but checkbox not set", null, "PASA", pasa.Identifier, "PASA");
mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv);
}
if(pasIsPAX && !pasa.HasPAXDetails) if(pasIsPAX && !pasa.HasPAXDetails)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASA", pasa.Identifier, "PASA"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASA", pasa.Identifier, "PASA");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if(!pasIsPAX && pasa.HasPAXDetails)
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "PAX details but checkbox not set", null, "PASA", pasa.Identifier, "PASA");
mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv);
}
} }
} }
@ -839,25 +815,13 @@ namespace ENI2
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "No Schengen details", null, "PASD", pasd.Identifier, "PASD"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "No Schengen details", null, "PASD", pasd.Identifier, "PASD");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if (!pasdIsSchengen && pasd.HasSchengenDetails)
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V202, "Schengen details but checkbox not set", null, "PASD", pasd.Identifier, "PASD");
mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv);
}
if (pasdIsPAX && !pasd.HasPAXDetails) if (pasdIsPAX && !pasd.HasPAXDetails)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASD", pasd.Identifier, "PASD"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASD", pasd.Identifier, "PASD");
mv.MessageGroupName = Properties.Resources.textOverview; mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv); vViolations.Add(mv);
} }
if (!pasdIsPAX && pasd.HasPAXDetails)
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "PAX details but checkbox not set", null, "PASD", pasd.Identifier, "PASD");
mv.MessageGroupName = Properties.Resources.textOverview;
vViolations.Add(mv);
}
} }
} }

View File

@ -83,7 +83,7 @@
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentIssuingState}" Binding="{Binding CrewMemberIdentityDocumentIssuingState, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textDocumentIssuingState}" Binding="{Binding CrewMemberIdentityDocumentIssuingState, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDocumentExpiryDate}" Binding="{Binding CrewMemberIdentityDocumentExpiryDate, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textDocumentExpiryDate}" Binding="{Binding CrewMemberIdentityDocumentExpiryDate, Mode=TwoWay, StringFormat=\{0:dd.MM.yyyy\}}" 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*" />
<DataGridTextColumn Header="{x:Static p:Resources.textEffects}" Binding="{Binding Effects, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> <!--<DataGridTextColumn Header="{x:Static p:Resources.textEffects}" Binding="{Binding Effects, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />-->
</DataGrid.Columns> </DataGrid.Columns>
</enictrl:ENIDataGrid> </enictrl:ENIDataGrid>
</Grid> </Grid>

View File

@ -692,52 +692,6 @@ namespace ENI2.DetailViewControls
} }
} }
/* obsolete, da PDF jetzt lokal erzeugt werden können..
*
private void buttonCreatePDF_Click(object sender, RoutedEventArgs e)
{
bool cannotCreateReport = false;
for (int i = 0; i < this.Messages.Count; i++)
{
Message selectedMessage = this.Messages[i];
// 28.3. Diese Nachrichten sollten dabei nicht geprüft werden.. immer diese Spezialfälle
if ((selectedMessage.MessageNotificationClass == Message.NotificationClass.VISIT) ||
(selectedMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
(selectedMessage.MessageNotificationClass == Message.NotificationClass.CREWD) ||
(selectedMessage.MessageNotificationClass == Message.NotificationClass.PASD) ||
(selectedMessage.MessageNotificationClass == Message.NotificationClass.STO)) continue;
if ((selectedMessage.InternalStatus == Message.BSMDStatus.SENT) || (selectedMessage.InternalStatus == Message.BSMDStatus.TOSEND))
{
cannotCreateReport = true;
break;
}
}
if (cannotCreateReport)
{
MessageBox.Show("Cannot create report: some messages still in status TOSEND / SENT", Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Exclamation);
return;
}
for (int i = 0; i < this.dataGridMessages.SelectedItems.Count; i++)
{
Message selectedMessage = this.dataGridMessages.SelectedItems[i] as Message;
selectedMessage.LastStatus = selectedMessage.InternalStatus;
selectedMessage.InternalStatus = Message.BSMDStatus.REPORT;
selectedMessage.ReportingPartyId = App.UserId; // wichtig damit der Richtige(!) die Mail mit dem PDF bekommt
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(selectedMessage);
}
this.Core.ReportStatus = MessageCore.ReportStatusEnum.SINGLE;
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(this.Core);
this.dataGridMessages.Items.Refresh();
}
*/
private void buttonSystemErrors_Click(object sender, RoutedEventArgs e) private void buttonSystemErrors_Click(object sender, RoutedEventArgs e)
{ {
if (this.dataGridMessages.SelectedItems.Count > 0) if (this.dataGridMessages.SelectedItems.Count > 0)

View File

@ -146,6 +146,7 @@
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="120" /> <RowDefinition Height="120" />
<RowDefinition Height="28" />
<RowDefinition Height="330*" /> <RowDefinition Height="330*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<enictrl:ENIDataGrid x:Name="dataGridWasteReceipt" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionMode="Single" <enictrl:ENIDataGrid x:Name="dataGridWasteReceipt" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionMode="Single"
@ -160,10 +161,18 @@
<DataGridTextColumn Header="{x:Static p:Resources.textWasteDeliveryDateTo}" Binding="{Binding WasteDeliveryDateTo}" IsReadOnly="True" Width="Auto" /> <DataGridTextColumn Header="{x:Static p:Resources.textWasteDeliveryDateTo}" Binding="{Binding WasteDeliveryDateTo}" IsReadOnly="True" Width="Auto" />
</DataGrid.Columns> </DataGrid.Columns>
</enictrl:ENIDataGrid> </enictrl:ENIDataGrid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Name="buttonWasteReceivedAddMissingEntries" Content="{x:Static p:Resources.textAddMissingEntries}" Margin="2" Click="buttonWasteReceivedAddMissingEntries_Click"/>
</Grid>
<enictrl:ENIDataGrid x:Name="dataGridWasteReceived" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" <enictrl:ENIDataGrid x:Name="dataGridWasteReceived" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="1"> AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="2">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="{x:Static p:Resources.textWaste}" Binding="{Binding WasteCode}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding WasteTypeDisplayGrid}" IsReadOnly="True" Width="0.2*" />
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding WasteDescription}" IsReadOnly="True" Width="0.3*" /> <DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding WasteDescription}" IsReadOnly="True" Width="0.3*" />
<DataGridTemplateColumn IsReadOnly="True" Width="0.15*"> <DataGridTemplateColumn IsReadOnly="True" Width="0.15*">
<DataGridTemplateColumn.HeaderTemplate> <DataGridTemplateColumn.HeaderTemplate>

View File

@ -64,6 +64,7 @@ namespace ENI2.DetailViewControls
private void buttonAddMissingEntries_Click(object sender, RoutedEventArgs e) private void buttonAddMissingEntries_Click(object sender, RoutedEventArgs e)
{ {
// TODO: Das muss noch für NSW 7.0 gefixt werden, alles doppelt etc.
this._was.AddMissingWaste(); this._was.AddMissingWaste();
if(this._was.Waste.Count < 15) if(this._was.Waste.Count < 15)
{ {
@ -77,7 +78,7 @@ namespace ENI2.DetailViewControls
WasteDescription = "", WasteDescription = "",
WasteDisposalAmount_MTQ = 0, WasteDisposalAmount_MTQ = 0,
WasteDisposalPort = "ZZUKN", WasteDisposalPort = "ZZUKN",
WasteDisposedAtLastPort_MTQ = 0 WasteDisposedAtLastPort_MTQ = 0
}; };
this._was.Waste.Add(newWaste); this._was.Waste.Add(newWaste);
} }
@ -86,6 +87,13 @@ namespace ENI2.DetailViewControls
this.dataGridWaste.Items.Refresh(); this.dataGridWaste.Items.Refresh();
} }
private void buttonWasteReceivedAddMissingEntries_Click(object sender, RoutedEventArgs e)
{
this._selectedWAS_RCPT.AddMissingWasteReceived();
this.SublistElementChanged(Message.NotificationClass.WAS_RCPT);
this.dataGridWasteReceived.Items.Refresh();
}
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
@ -153,7 +161,7 @@ namespace ENI2.DetailViewControls
#endregion #endregion
} }
#region Waste receipt grid event handler #region Waste receipt grid event handler
@ -526,6 +534,7 @@ namespace ENI2.DetailViewControls
} }
#endregion #endregion
} }
} }

View File

@ -36,8 +36,8 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision> <ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>7.0.0.1</ApplicationVersion> <ApplicationVersion>7.0.0.2</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -39,7 +39,7 @@
<Label Name="labelVisaNumber" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textVisaNumber}" /> <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}" /> <Label Name="labelIssuingState" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textDocumentIssuingState}" />
<Label Name="labelExpiryDate" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDocumentExpiryDate}" /> <Label Name="labelExpiryDate" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textDocumentExpiryDate}" />
<Label Name="labelEffects" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEffects}" /> <!--Label Name="labelEffects" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEffects}" /-->
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxDuty" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/> <TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxDuty" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/> <TextBox Grid.Row="1" Grid.Column="1" Width="auto" Name="textBoxLastName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/> <TextBox Grid.Row="1" Grid.Column="3" Width="auto" Name="textBoxFirstName" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/>
@ -63,6 +63,6 @@
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/> <CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
</DatePicker.BlackoutDates> </DatePicker.BlackoutDates>
</DatePicker> </DatePicker>
<TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEffects" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/> <!--TextBox Grid.Row="7" Grid.Column="1" Width="auto" Name="textBoxEffects" Margin="2" MaxLength="100" VerticalContentAlignment="Center"/-->
</Grid> </Grid>
</enictrl:EditWindowBase> </enictrl:EditWindowBase>

View File

@ -32,7 +32,7 @@ namespace ENI2.EditControls
this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName; this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList; this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
//this.comboBoxGender.KeyUp += ComboBox_KeyUp; //this.comboBoxGender.KeyUp += ComboBox_KeyUp;
this.comboBoxGender.SelectedIndex = this.CREW.CrewMemberGender.HasValue ? this.CREW.CrewMemberGender.Value : -1; this.comboBoxGender.SelectedIndex = this.CREW.CrewMemberGender ?? -1;
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth; this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict; this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
//this.comboBoxNationality.KeyUp += ComboBox_KeyUp; //this.comboBoxNationality.KeyUp += ComboBox_KeyUp;
@ -40,7 +40,7 @@ namespace ENI2.EditControls
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth; this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList; this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList;
//this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp; //this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp;
this.comboBoxIdDocType.SelectedIndex = this.CREW.CrewMemberIdentityDocumentType.HasValue ? this.CREW.CrewMemberIdentityDocumentType.Value : -1; this.comboBoxIdDocType.SelectedIndex = this.CREW.CrewMemberIdentityDocumentType ?? -1;
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId; this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber; this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict; this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
@ -48,7 +48,7 @@ namespace ENI2.EditControls
this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate; this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict; this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth; this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
this.textBoxEffects.Text = this.CREW.Effects; // this.textBoxEffects.Text = this.CREW.Effects;
this.OKClicked += EditCREWDialog_OKClicked; this.OKClicked += EditCREWDialog_OKClicked;
this.AddVisible = true; this.AddVisible = true;
} }
@ -69,7 +69,7 @@ namespace ENI2.EditControls
this.CREW.CrewMemberIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string)this.comboBoxIssuingState.SelectedValue; this.CREW.CrewMemberIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string)this.comboBoxIssuingState.SelectedValue;
this.CREW.CrewMemberIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate; 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(); // this.CREW.Effects = this.textBoxEffects.Text.Trim();
} }
private void EditCREWDialog_OKClicked() private void EditCREWDialog_OKClicked()

View File

@ -31,7 +31,7 @@ namespace ENI2.EditControls
this.textBoxFirstName.Text = this.PAS.PassengerFirstName; this.textBoxFirstName.Text = this.PAS.PassengerFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList; this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
//this.comboBoxGender.KeyUp += ComboBox_KeyUp; //this.comboBoxGender.KeyUp += ComboBox_KeyUp;
this.comboBoxGender.SelectedIndex = this.PAS.PassengerGender.HasValue ? this.PAS.PassengerGender.Value : -1; this.comboBoxGender.SelectedIndex = this.PAS.PassengerGender ?? -1;
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth; this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict; this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
//this.comboBoxNationality.KeyUp += ComboBox_KeyUp; //this.comboBoxNationality.KeyUp += ComboBox_KeyUp;
@ -39,7 +39,7 @@ namespace ENI2.EditControls
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth; this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList; this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList;
//this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp; //this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp;
this.comboBoxIdDocType.SelectedIndex = this.PAS.PassengerIdentityDocumentType.HasValue ? this.PAS.PassengerIdentityDocumentType.Value : -1; this.comboBoxIdDocType.SelectedIndex = this.PAS.PassengerIdentityDocumentType ?? -1;
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId; this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber; this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber;
this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation; this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation;

View File

@ -32,10 +32,10 @@
<Label Name="labelWasteDeliveryDateFrom" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateFrom}" /> <Label Name="labelWasteDeliveryDateFrom" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateFrom}" />
<Label Name="labelWasteDeliveryDateTo" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateTo}" /> <Label Name="labelWasteDeliveryDateTo" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textWasteDeliveryDateTo}" />
<TextBox Name="textIdentificationNumber" Grid.Row="0" Grid.Column="1" Width="auto" MaxLength="20" TextWrapping="Wrap" /> <TextBox Name="textIdentificationNumber" Grid.Row="0" Grid.Column="1" Width="auto" MaxLength="20" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
<TextBox Name="textBoxPortReceptionFacilityName" Grid.Row="1" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" /> <TextBox Name="textBoxPortReceptionFacilityName" Grid.Row="1" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
<TextBox Name="textBoxPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" /> <TextBox Name="textBoxPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" Margin="2" VerticalContentAlignment="Center"/>
<TextBox Name="textBoxTreatmentFacilityProvider" Grid.Row="3" Grid.Column="1" Height="56" VerticalAlignment="Top" /> <TextBox Name="textBoxTreatmentFacilityProvider" Grid.Row="3" Grid.Column="1" Height="56" VerticalContentAlignment="Top" Margin="2"/>
<xctk:DateTimePicker Grid.Row="4" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateFrom" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/> <xctk:DateTimePicker Grid.Row="4" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateFrom" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
<xctk:DateTimePicker Grid.Row="5" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateTo" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/> <xctk:DateTimePicker Grid.Row="5" Grid.Column="1" Name="dateTimePickerWasteDeliveryDateTo" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>

View File

@ -46,9 +46,7 @@ namespace ENI2.EditControls
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) || (aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) || (aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) || (aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.CREWD) || (aMessage.MessageNotificationClass == Message.NotificationClass.STO)
(aMessage.MessageNotificationClass == Message.NotificationClass.STO) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.PASD)
) continue; ) continue;
if (IsTransit && if (IsTransit &&
@ -103,7 +101,7 @@ namespace ENI2.EditControls
protected void OnPropertyChanged(string propertyName) protected void OnPropertyChanged(string propertyName)
{ {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
} }
} }
private void buttonAll_Click(object sender, RoutedEventArgs e) private void buttonAll_Click(object sender, RoutedEventArgs e)

View File

@ -29,12 +29,12 @@ namespace ENI2.EditControls
this.OKClicked += VisitIdDialog_OKClicked; this.OKClicked += VisitIdDialog_OKClicked;
List<KeyValuePair<bsmd.database.Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<bsmd.database.Message.NSWProvider, string>>() List<KeyValuePair<bsmd.database.Message.NSWProvider, string>> comboDataSource = new List<KeyValuePair<bsmd.database.Message.NSWProvider, string>>()
{ {
new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DBH, "DBH" ), new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DBH, "DBH" ),
new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ), new KeyValuePair<bsmd.database.Message.NSWProvider, string>( Message.NSWProvider.DUDR, "HIS-Nord" ),
}; };
this.comboBoxInitialHIS.ItemsSource = comboDataSource; this.comboBoxInitialHIS.ItemsSource = comboDataSource;
this.comboBoxInitialHIS.SelectedIndex = 2; this.comboBoxInitialHIS.SelectedIndex = 1;
this.EnableOK(false); this.EnableOK(false);
this.locodePoC.PropertyChanged += LocodePoC_PropertyChanged; this.locodePoC.PropertyChanged += LocodePoC_PropertyChanged;

View File

@ -111,18 +111,18 @@ namespace ENI2.Excel
result = 0; result = 0;
} }
else if (val.Equals("f", StringComparison.CurrentCultureIgnoreCase) || val.Equals("female", StringComparison.CurrentCultureIgnoreCase)) else if (val.Equals("f", StringComparison.CurrentCultureIgnoreCase) || val.Equals("female", StringComparison.CurrentCultureIgnoreCase))
{ {
result = 1; result = 1;
} }
else else
{ {
result = 2; result = 2;
} }
} }
if(result == null) if(result == null)
{ {
_log.ErrorFormat("error reading gender on {0}", lookup); _log.ErrorFormat("error reading gender on {0}", lookup);
} }
return result; return result;
} }
@ -251,8 +251,11 @@ namespace ENI2.Excel
if(val!= null) if(val!= null)
{ {
if (val == "I") result = 1; if (val == "I") result = 1;
if (val == "1") result = 1;
if (val == "II") result = 2; if (val == "II") result = 2;
if (val == "2") result = 2;
if (val == "III") result = 3; if (val == "III") result = 3;
if (val == "3") result = 3;
if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0; if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0;
} }

View File

@ -366,7 +366,7 @@ namespace ENI2.Excel
if (shipClass.Contains('2')) haza.INFShipClass = 1; if (shipClass.Contains('2')) haza.INFShipClass = 1;
if (shipClass.Contains('3')) haza.INFShipClass = 2; if (shipClass.Contains('3')) haza.INFShipClass = 2;
} }
#region IMDG #region IMDG
for (int i = 1; i <= 10; i++) for (int i = 1; i <= 10; i++)
@ -918,7 +918,7 @@ namespace ENI2.Excel
#region INFO #region INFO
private static bool ScanINFO(Message infoMessage, ExcelReader reader) private static bool ScanINFO(Message infoMessage, ExcelReader reader)
{ {
if(infoMessage.Elements.Count == 0) if(infoMessage.Elements.Count == 0)
{ {
INFO newINFO = new INFO(); INFO newINFO = new INFO();
@ -928,6 +928,12 @@ namespace ENI2.Excel
INFO info = infoMessage.Elements[0] as INFO; INFO info = infoMessage.Elements[0] as INFO;
ExcelUtil.ScanMessage(info, reader); ExcelUtil.ScanMessage(info, reader);
string portArea = reader.ReadText("INFO.PortArea")?.ToUpper();
if (!portArea.IsNullOrEmpty() && DBManager.Instance.GetPortAreaDict().ContainsKey(portArea))
info.PortArea = portArea;
else
info.PortArea = "";
info.ShippingArea = reader.ReadShippingArea("INFO.ShippingArea"); // enum read func info.ShippingArea = reader.ReadShippingArea("INFO.ShippingArea"); // enum read func
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo"); bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
info.FumigatedBulkCargo = (byte) ((fumigatedBulkCargo ?? false) ? 1 : 0); info.FumigatedBulkCargo = (byte) ((fumigatedBulkCargo ?? false) ? 1 : 0);
@ -1254,13 +1260,13 @@ namespace ENI2.Excel
string wasrcpt_delToDate = string.Format("WAS_RCPT.WasteDeliveryReceipt_{0}.WasteDeliveryDateToDate", i); string wasrcpt_delToDate = string.Format("WAS_RCPT.WasteDeliveryReceipt_{0}.WasteDeliveryDateToDate", i);
string wasrcpt_delToTime = string.Format("WAS_RCPT.WasteDeliveryReceipt_{0}.WasteDeliveryDateToTime", i); string wasrcpt_delToTime = string.Format("WAS_RCPT.WasteDeliveryReceipt_{0}.WasteDeliveryDateToTime", i);
if (!(was_rcptMessage.GetSublistElementWithIdentifier((i).ToString()) is WAS_RCPT wasr)) if (!(was_rcptMessage.GetSublistElementWithIdentifier(i.ToString()) is WAS_RCPT wasr))
{ {
wasr = new WAS_RCPT(); wasr = new WAS_RCPT();
wasr.Identifier = (i).ToString(); wasr.Identifier = i.ToString();
wasr.MessageHeader = was_rcptMessage; wasr.MessageHeader = was_rcptMessage;
was_rcptMessage.Elements.Add(wasr); was_rcptMessage.Elements.Add(wasr);
} }
else else
{ {
wasr.DeleteElements(); wasr.DeleteElements();
@ -1271,7 +1277,7 @@ namespace ENI2.Excel
wasr.PortReceptionFacilityProviderName = reader.ReadText(wasrcpt_portreceptFacilityProviderName); wasr.PortReceptionFacilityProviderName = reader.ReadText(wasrcpt_portreceptFacilityProviderName);
string treatmentFacility = reader.ReadText(wasrcpt_treatmentFacility); string treatmentFacility = reader.ReadText(wasrcpt_treatmentFacility);
if(!treatmentFacility.IsNullOrEmpty()) if(!treatmentFacility.IsNullOrEmpty())
{ {
TreatmentFacilityProvider tfp = new TreatmentFacilityProvider(); TreatmentFacilityProvider tfp = new TreatmentFacilityProvider();
tfp.WAS_RCPT = wasr; tfp.WAS_RCPT = wasr;
tfp.Identifier = "1"; tfp.Identifier = "1";
@ -1293,9 +1299,10 @@ namespace ENI2.Excel
wasr.WasteReceived.Add(wr); wasr.WasteReceived.Add(wr);
wr.Identifier = j.ToString(); wr.Identifier = j.ToString();
wr.WasteCode = reader.ReadText(wtype); wr.WasteCode = reader.ReadText(wtype); // hier muss immer was stehen, ist ein festes Beschreibungsfeld
wr.WasteDescription = reader.ReadText(wDescr); wr.WasteDescription = reader.ReadText(wDescr);
wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount); wr.AmountWasteReceived_MTQ = reader.ReadNumber(wAmount);
if (!wr.AmountWasteReceived_MTQ.HasValue) wr.AmountWasteReceived_MTQ = 0; // Default ist 0, nicht nix ;-)
} }
// only add message when an identification number was given // only add message when an identification number was given

View File

@ -86,6 +86,7 @@ namespace ENI2.Util
aMessage.ENINotificationDetailIndex = 2; aMessage.ENINotificationDetailIndex = 2;
break; break;
case Message.NotificationClass.WAS: case Message.NotificationClass.WAS:
case Message.NotificationClass.WAS_RCPT:
aMessage.ENINotificationIconString = "../Resources/garbage.png"; aMessage.ENINotificationIconString = "../Resources/garbage.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textWaste; aMessage.ENINotificationDetailGroup = Properties.Resources.textWaste;
aMessage.ENINotificationDetailIndex = 3; aMessage.ENINotificationDetailIndex = 3;
@ -129,6 +130,8 @@ namespace ENI2.Util
case Message.NotificationClass.BPOL: case Message.NotificationClass.BPOL:
case Message.NotificationClass.CREW: case Message.NotificationClass.CREW:
case Message.NotificationClass.PAS: case Message.NotificationClass.PAS:
case Message.NotificationClass.CREWD:
case Message.NotificationClass.PASD:
aMessage.ENINotificationIconString = "../Resources/policeman_german.png"; aMessage.ENINotificationIconString = "../Resources/policeman_german.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice; aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice;
aMessage.ENINotificationDetailIndex = 10; aMessage.ENINotificationDetailIndex = 10;

View File

@ -136,4 +136,11 @@ GO
ALTER TABLE [dbo].[PAS] ALTER TABLE [dbo].[PAS]
ADD [PassengerCountryOfBirth] NCHAR (2) NULL; ADD [PassengerCountryOfBirth] NCHAR (2) NULL;
GO
PRINT N'Altering Table [dbo].[WAS_RCPT]...';
GO
ALTER TABLE [dbo].[WAS_RCPT]
ADD [Identifier] NVARCHAR (50) NULL;
GO GO

View File

@ -427,7 +427,7 @@ namespace bsmd.database
List<DatabaseEntity> portAreas = pa.LoadList(reader); List<DatabaseEntity> portAreas = pa.LoadList(reader);
DBManager.allPortAreas = new Dictionary<string, PortArea>(); DBManager.allPortAreas = new Dictionary<string, PortArea>();
foreach (PortArea aPa in portAreas) foreach (PortArea aPa in portAreas)
DBManager.allPortAreas.Add(aPa.Locode + aPa.Code, aPa); DBManager.allPortAreas.Add(aPa.Locode + aPa.Code, aPa);
} }
return DBManager.allPortAreas; return DBManager.allPortAreas;
} }

View File

@ -22,6 +22,9 @@ namespace bsmd.database
[JsonConverter(typeof(NoTypeConverterJsonConverter<WAS>))] [JsonConverter(typeof(NoTypeConverterJsonConverter<WAS>))]
public class WAS : DatabaseEntity, ISublistContainer public class WAS : DatabaseEntity, ISublistContainer
{ {
private static Dictionary<string, string> _wasteCodeDict = null;
public WAS() public WAS()
{ {
this.tablename = "[dbo].[WAS]"; this.tablename = "[dbo].[WAS]";
@ -83,6 +86,20 @@ namespace bsmd.database
"Passively fished waste" "Passively fished waste"
}; };
public static Dictionary<string, string> WasteCodeDict
{
get
{
if(_wasteCodeDict == null)
{
_wasteCodeDict = new Dictionary<string, string>();
for (int i = 0; i < WasteCodes.Length; i++)
_wasteCodeDict.Add(WasteCodes[i], WasteCodeDescriptions[i]);
}
return _wasteCodeDict;
}
}
[ShowReport] [ShowReport]
[ENI2Validation] [ENI2Validation]
public bool? WasteDisposalValidExemption { get; set; } public bool? WasteDisposalValidExemption { get; set; }

View File

@ -113,6 +113,38 @@ namespace bsmd.database
#endregion #endregion
#region public methods
public void AddMissingWasteReceived()
{
foreach (string wasteCode in WAS.WasteCodes)
{
WasteReceived foundWasteReceived = null;
foreach (WasteReceived wasteReceived in this.WasteReceived)
{
if (!wasteReceived.WasteCode.IsNullOrEmpty() && wasteReceived.WasteCode.Equals(wasteCode))
{
foundWasteReceived = wasteReceived;
break;
}
}
if (foundWasteReceived == null)
{
WasteReceived newWasteReceived = new WasteReceived
{
Identifier = DatabaseEntity.GetNewIdentifier(this.WasteReceived),
WAS_RCPT = this,
WasteDescription = "-",
AmountWasteReceived_MTQ = 0,
WasteCode = wasteCode
};
this.WasteReceived.Add(newWasteReceived);
}
}
}
#endregion
#region ISublistContainer implementation #region ISublistContainer implementation
public ISublistElement GetSublistElementWithIdentifier(string identifier) public ISublistElement GetSublistElementWithIdentifier(string identifier)
@ -182,20 +214,21 @@ namespace bsmd.database
scmd.Parameters.AddWithNullableValue("@P4", this.PortReceptionFacilityProviderName); scmd.Parameters.AddWithNullableValue("@P4", this.PortReceptionFacilityProviderName);
scmd.Parameters.AddWithNullableValue("@P5", this.WasteDeliveryDateFrom); scmd.Parameters.AddWithNullableValue("@P5", this.WasteDeliveryDateFrom);
scmd.Parameters.AddWithNullableValue("@P6", this.WasteDeliveryDateTo); scmd.Parameters.AddWithNullableValue("@P6", this.WasteDeliveryDateTo);
scmd.Parameters.AddWithNullableValue("@P7", this.Identifier);
if (this.IsNew) if (this.IsNew)
{ {
this.CreateId(); this.CreateId();
scmd.Parameters.AddWithValue("@ID", this.Id); scmd.Parameters.AddWithValue("@ID", this.Id);
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, IdentificationNumber, " + scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, IdentificationNumber, " +
"PortReceptionFacilityName, PortReceptionFacilityProviderName, WasteDeliveryDateFrom, WasteDeliveryDateTo) " + "PortReceptionFacilityName, PortReceptionFacilityProviderName, WasteDeliveryDateFrom, WasteDeliveryDateTo, Identifier) " +
"VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6 )", this.Tablename); "VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7 )", this.Tablename);
} }
else else
{ {
scmd.Parameters.AddWithValue("ID", this.Id); scmd.Parameters.AddWithValue("ID", this.Id);
scmd.CommandText = string.Format("UPDATE {0} SET IdentificationNumber = @P2, PortReceptionFacilityName = @P3, " + scmd.CommandText = string.Format("UPDATE {0} SET IdentificationNumber = @P2, PortReceptionFacilityName = @P3, " +
"PortReceptionFacilityProviderName = @P4, WasteDeliveryDateFrom = @P5, WasteDeliveryDateTo = @P6 " + "PortReceptionFacilityProviderName = @P4, WasteDeliveryDateFrom = @P5, WasteDeliveryDateTo = @P6, Identifier = @P7 " +
"WHERE Id = @ID", this.Tablename); "WHERE Id = @ID", this.Tablename);
} }
} }
@ -203,7 +236,7 @@ namespace bsmd.database
public override void PrepareLoadCommand(IDbCommand cmd, Message.LoadFilter filter, params object[] criteria) public override void PrepareLoadCommand(IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
{ {
string query = string.Format("SELECT Id, IdentificationNumber, PortReceptionFacilityName, PortReceptionFacilityProviderName, " + string query = string.Format("SELECT Id, IdentificationNumber, PortReceptionFacilityName, PortReceptionFacilityProviderName, " +
"WasteDeliveryDateFrom, WasteDeliveryDateTo " + "WasteDeliveryDateFrom, WasteDeliveryDateTo, Identifier " +
"FROM {0} ", this.Tablename); "FROM {0} ", this.Tablename);
switch (filter) switch (filter)
@ -237,6 +270,7 @@ namespace bsmd.database
if (!reader.IsDBNull(3)) was_rcpt.PortReceptionFacilityProviderName = reader.GetString(3); if (!reader.IsDBNull(3)) was_rcpt.PortReceptionFacilityProviderName = reader.GetString(3);
if (!reader.IsDBNull(4)) was_rcpt.WasteDeliveryDateFrom = reader.GetDateTime(4); if (!reader.IsDBNull(4)) was_rcpt.WasteDeliveryDateFrom = reader.GetDateTime(4);
if (!reader.IsDBNull(5)) was_rcpt.WasteDeliveryDateTo = reader.GetDateTime(5); if (!reader.IsDBNull(5)) was_rcpt.WasteDeliveryDateTo = reader.GetDateTime(5);
if (!reader.IsDBNull(6)) was_rcpt.Identifier = reader.GetString(6);
result.Add(was_rcpt); result.Add(was_rcpt);
} }
@ -315,4 +349,4 @@ namespace bsmd.database
#endregion #endregion
} }
} }

View File

@ -42,6 +42,15 @@ namespace bsmd.database
[ENI2Validation] [ENI2Validation]
public string WasteCode { get; set; } public string WasteCode { get; set; }
[JsonIgnore]
public string WasteTypeDisplayGrid
{
get
{
return string.Format("{0} {1}", WasteCode, WAS.WasteCodeDict[WasteCode]);
}
}
[ShowReport] [ShowReport]
[MaxLength(256)] [MaxLength(256)]
[ENI2Validation] [ENI2Validation]

View File

@ -425,7 +425,7 @@ namespace bsmd.hisnord
if (tiefa.DraughtUponArrival_DMT.HasValue) if (tiefa.DraughtUponArrival_DMT.HasValue)
{ {
items1ChoiceType.Add(Items1ChoiceType.TIEFA); items1ChoiceType.Add(Items1ChoiceType.TIEFA);
items1.Add((float)tiefa.DraughtUponArrival_DMT.Value); items1.Add((decimal)tiefa.DraughtUponArrival_DMT.Value);
} }
} }
} }
@ -447,7 +447,7 @@ namespace bsmd.hisnord
if (tiefd.DraughtUponDeparture_DMT.HasValue) if (tiefd.DraughtUponDeparture_DMT.HasValue)
{ {
items1ChoiceType.Add(Items1ChoiceType.TIEFD); items1ChoiceType.Add(Items1ChoiceType.TIEFD);
items1.Add((float)tiefd.DraughtUponDeparture_DMT.Value); items1.Add((decimal)tiefd.DraughtUponDeparture_DMT.Value);
} }
} }
} }