Korrekturen für 7.0
This commit is contained in:
parent
428ba1f91a
commit
89d33a261d
@ -742,12 +742,6 @@ namespace ENI2
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -770,12 +764,6 @@ namespace ENI2
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -799,24 +787,12 @@ namespace ENI2
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
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)
|
||||
{
|
||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASA", pasa.Identifier, "PASA");
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -840,24 +816,12 @@ namespace ENI2
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
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)
|
||||
{
|
||||
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.V203, "No PAX details", null, "PASD", pasd.Identifier, "PASD");
|
||||
mv.MessageGroupName = Properties.Resources.textOverview;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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.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.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>
|
||||
</enictrl:ENIDataGrid>
|
||||
</Grid>
|
||||
|
||||
@ -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)
|
||||
{
|
||||
if (this.dataGridMessages.SelectedItems.Count > 0)
|
||||
|
||||
@ -146,6 +146,7 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="120" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="330*" />
|
||||
</Grid.RowDefinitions>
|
||||
<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" />
|
||||
</DataGrid.Columns>
|
||||
</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"
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="1">
|
||||
AutoGenerateColumns="False" Margin="0,5,0,0" Grid.Row="2">
|
||||
<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*" />
|
||||
<DataGridTemplateColumn IsReadOnly="True" Width="0.15*">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
|
||||
@ -64,6 +64,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
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();
|
||||
if(this._was.Waste.Count < 15)
|
||||
{
|
||||
@ -86,6 +87,13 @@ namespace ENI2.DetailViewControls
|
||||
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()
|
||||
{
|
||||
base.Initialize();
|
||||
@ -527,5 +535,6 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>7.0.0.1</ApplicationVersion>
|
||||
<ApplicationRevision>2</ApplicationRevision>
|
||||
<ApplicationVersion>7.0.0.2</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<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="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="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"/>
|
||||
@ -63,6 +63,6 @@
|
||||
<CalendarDateRange Start="1/1/2199" End="1/1/9999"/>
|
||||
</DatePicker.BlackoutDates>
|
||||
</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>
|
||||
</enictrl:EditWindowBase>
|
||||
|
||||
@ -32,7 +32,7 @@ namespace ENI2.EditControls
|
||||
this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName;
|
||||
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
|
||||
//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.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
//this.comboBoxNationality.KeyUp += ComboBox_KeyUp;
|
||||
@ -40,7 +40,7 @@ namespace ENI2.EditControls
|
||||
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
|
||||
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList;
|
||||
//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.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
|
||||
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
@ -48,7 +48,7 @@ namespace ENI2.EditControls
|
||||
this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
|
||||
this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
|
||||
this.textBoxEffects.Text = this.CREW.Effects;
|
||||
// this.textBoxEffects.Text = this.CREW.Effects;
|
||||
this.OKClicked += EditCREWDialog_OKClicked;
|
||||
this.AddVisible = true;
|
||||
}
|
||||
@ -69,7 +69,7 @@ namespace ENI2.EditControls
|
||||
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.Effects = this.textBoxEffects.Text.Trim();
|
||||
// this.CREW.Effects = this.textBoxEffects.Text.Trim();
|
||||
}
|
||||
|
||||
private void EditCREWDialog_OKClicked()
|
||||
|
||||
@ -31,7 +31,7 @@ namespace ENI2.EditControls
|
||||
this.textBoxFirstName.Text = this.PAS.PassengerFirstName;
|
||||
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
|
||||
//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.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
|
||||
//this.comboBoxNationality.KeyUp += ComboBox_KeyUp;
|
||||
@ -39,7 +39,7 @@ namespace ENI2.EditControls
|
||||
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
|
||||
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList;
|
||||
//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.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber;
|
||||
this.locodePortOfEmbarkation.LocodeValue = this.PAS.PassengerPortOfEmbarkation;
|
||||
|
||||
@ -32,10 +32,10 @@
|
||||
<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}" />
|
||||
|
||||
<TextBox Name="textIdentificationNumber" Grid.Row="0" Grid.Column="1" Width="auto" MaxLength="20" TextWrapping="Wrap" />
|
||||
<TextBox Name="textBoxPortReceptionFacilityName" Grid.Row="1" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" />
|
||||
<TextBox Name="textBoxPortReceptionFacilityProviderName" Grid.Row="2" Grid.Column="1" Width="auto" MaxLength="70" TextWrapping="Wrap" />
|
||||
<TextBox Name="textBoxTreatmentFacilityProvider" Grid.Row="3" Grid.Column="1" Height="56" VerticalAlignment="Top" />
|
||||
<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" Margin="2" VerticalContentAlignment="Center"/>
|
||||
<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" 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="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"/>
|
||||
|
||||
|
||||
@ -46,9 +46,7 @@ namespace ENI2.EditControls
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.CREWD) ||
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.STO) ||
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.PASD)
|
||||
(aMessage.MessageNotificationClass == Message.NotificationClass.STO)
|
||||
) continue;
|
||||
|
||||
if (IsTransit &&
|
||||
|
||||
@ -34,7 +34,7 @@ namespace ENI2.EditControls
|
||||
};
|
||||
|
||||
this.comboBoxInitialHIS.ItemsSource = comboDataSource;
|
||||
this.comboBoxInitialHIS.SelectedIndex = 2;
|
||||
this.comboBoxInitialHIS.SelectedIndex = 1;
|
||||
|
||||
this.EnableOK(false);
|
||||
this.locodePoC.PropertyChanged += LocodePoC_PropertyChanged;
|
||||
|
||||
@ -251,8 +251,11 @@ namespace ENI2.Excel
|
||||
if(val!= null)
|
||||
{
|
||||
if (val == "I") result = 1;
|
||||
if (val == "1") result = 1;
|
||||
if (val == "II") result = 2;
|
||||
if (val == "2") result = 2;
|
||||
if (val == "III") result = 3;
|
||||
if (val == "3") result = 3;
|
||||
if (val.Equals("NONE", StringComparison.OrdinalIgnoreCase)) result = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -928,6 +928,12 @@ namespace ENI2.Excel
|
||||
INFO info = infoMessage.Elements[0] as INFO;
|
||||
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
|
||||
bool? fumigatedBulkCargo = reader.ReadBoolean("INFO.FumigatedBulkCargo");
|
||||
info.FumigatedBulkCargo = (byte) ((fumigatedBulkCargo ?? false) ? 1 : 0);
|
||||
@ -1254,10 +1260,10 @@ namespace ENI2.Excel
|
||||
string wasrcpt_delToDate = string.Format("WAS_RCPT.WasteDeliveryReceipt_{0}.WasteDeliveryDateToDate", 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.Identifier = (i).ToString();
|
||||
wasr.Identifier = i.ToString();
|
||||
wasr.MessageHeader = was_rcptMessage;
|
||||
was_rcptMessage.Elements.Add(wasr);
|
||||
}
|
||||
@ -1293,9 +1299,10 @@ namespace ENI2.Excel
|
||||
wasr.WasteReceived.Add(wr);
|
||||
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.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
|
||||
|
||||
@ -86,6 +86,7 @@ namespace ENI2.Util
|
||||
aMessage.ENINotificationDetailIndex = 2;
|
||||
break;
|
||||
case Message.NotificationClass.WAS:
|
||||
case Message.NotificationClass.WAS_RCPT:
|
||||
aMessage.ENINotificationIconString = "../Resources/garbage.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textWaste;
|
||||
aMessage.ENINotificationDetailIndex = 3;
|
||||
@ -129,6 +130,8 @@ namespace ENI2.Util
|
||||
case Message.NotificationClass.BPOL:
|
||||
case Message.NotificationClass.CREW:
|
||||
case Message.NotificationClass.PAS:
|
||||
case Message.NotificationClass.CREWD:
|
||||
case Message.NotificationClass.PASD:
|
||||
aMessage.ENINotificationIconString = "../Resources/policeman_german.png";
|
||||
aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice;
|
||||
aMessage.ENINotificationDetailIndex = 10;
|
||||
|
||||
@ -137,3 +137,10 @@ GO
|
||||
ALTER TABLE [dbo].[PAS]
|
||||
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
|
||||
@ -22,6 +22,9 @@ namespace bsmd.database
|
||||
[JsonConverter(typeof(NoTypeConverterJsonConverter<WAS>))]
|
||||
public class WAS : DatabaseEntity, ISublistContainer
|
||||
{
|
||||
|
||||
private static Dictionary<string, string> _wasteCodeDict = null;
|
||||
|
||||
public WAS()
|
||||
{
|
||||
this.tablename = "[dbo].[WAS]";
|
||||
@ -83,6 +86,20 @@ namespace bsmd.database
|
||||
"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]
|
||||
[ENI2Validation]
|
||||
public bool? WasteDisposalValidExemption { get; set; }
|
||||
|
||||
@ -113,6 +113,38 @@ namespace bsmd.database
|
||||
|
||||
#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
|
||||
|
||||
public ISublistElement GetSublistElementWithIdentifier(string identifier)
|
||||
@ -182,20 +214,21 @@ namespace bsmd.database
|
||||
scmd.Parameters.AddWithNullableValue("@P4", this.PortReceptionFacilityProviderName);
|
||||
scmd.Parameters.AddWithNullableValue("@P5", this.WasteDeliveryDateFrom);
|
||||
scmd.Parameters.AddWithNullableValue("@P6", this.WasteDeliveryDateTo);
|
||||
scmd.Parameters.AddWithNullableValue("@P7", this.Identifier);
|
||||
|
||||
if (this.IsNew)
|
||||
{
|
||||
this.CreateId();
|
||||
scmd.Parameters.AddWithValue("@ID", this.Id);
|
||||
scmd.CommandText = string.Format("INSERT INTO {0} (Id, MessageHeaderId, IdentificationNumber, " +
|
||||
"PortReceptionFacilityName, PortReceptionFacilityProviderName, WasteDeliveryDateFrom, WasteDeliveryDateTo) " +
|
||||
"VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6 )", this.Tablename);
|
||||
"PortReceptionFacilityName, PortReceptionFacilityProviderName, WasteDeliveryDateFrom, WasteDeliveryDateTo, Identifier) " +
|
||||
"VALUES ( @ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7 )", this.Tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
scmd.Parameters.AddWithValue("ID", this.Id);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -203,7 +236,7 @@ namespace bsmd.database
|
||||
public override void PrepareLoadCommand(IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
|
||||
{
|
||||
string query = string.Format("SELECT Id, IdentificationNumber, PortReceptionFacilityName, PortReceptionFacilityProviderName, " +
|
||||
"WasteDeliveryDateFrom, WasteDeliveryDateTo " +
|
||||
"WasteDeliveryDateFrom, WasteDeliveryDateTo, Identifier " +
|
||||
"FROM {0} ", this.Tablename);
|
||||
|
||||
switch (filter)
|
||||
@ -237,6 +270,7 @@ namespace bsmd.database
|
||||
if (!reader.IsDBNull(3)) was_rcpt.PortReceptionFacilityProviderName = reader.GetString(3);
|
||||
if (!reader.IsDBNull(4)) was_rcpt.WasteDeliveryDateFrom = reader.GetDateTime(4);
|
||||
if (!reader.IsDBNull(5)) was_rcpt.WasteDeliveryDateTo = reader.GetDateTime(5);
|
||||
if (!reader.IsDBNull(6)) was_rcpt.Identifier = reader.GetString(6);
|
||||
|
||||
result.Add(was_rcpt);
|
||||
}
|
||||
|
||||
@ -42,6 +42,15 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public string WasteCode { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string WasteTypeDisplayGrid
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("{0} {1}", WasteCode, WAS.WasteCodeDict[WasteCode]);
|
||||
}
|
||||
}
|
||||
|
||||
[ShowReport]
|
||||
[MaxLength(256)]
|
||||
[ENI2Validation]
|
||||
|
||||
@ -425,7 +425,7 @@ namespace bsmd.hisnord
|
||||
if (tiefa.DraughtUponArrival_DMT.HasValue)
|
||||
{
|
||||
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)
|
||||
{
|
||||
items1ChoiceType.Add(Items1ChoiceType.TIEFD);
|
||||
items1.Add((float)tiefd.DraughtUponDeparture_DMT.Value);
|
||||
items1.Add((decimal)tiefd.DraughtUponDeparture_DMT.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user