Alle neuen Felder im Import mit dem ENI UI geradegezogen

This commit is contained in:
Daniel Schick 2022-02-21 10:56:36 +01:00
parent f68f4e56d9
commit 765c7c2503
7 changed files with 97 additions and 15 deletions

View File

@ -82,6 +82,8 @@
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding CrewMemberVisaNumber, 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.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*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</Grid>
@ -120,6 +122,7 @@
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding CrewMemberVisaNumber, 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.textCountryOfBirth}" Binding="{Binding CrewMemberCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</Grid>
@ -160,6 +163,9 @@
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding PassengerVisaNumber}" 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.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.textCountryOfBirth}" Binding="{Binding PassengerCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</Grid>
@ -200,6 +206,9 @@
<DataGridTextColumn Header="{x:Static p:Resources.textVisaNumber}" Binding="{Binding PassengerVisaNumber}" 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.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.textCountryOfBirth}" Binding="{Binding PassengerCountryOfBirth, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
</DataGrid.Columns>
</enictrl:ENIDataGrid>
</Grid>

View File

@ -8,7 +8,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textCrewMember}" Height="274" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
Title="{x:Static p:Resources.textCrewMember}" Height="302" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
@ -18,6 +18,7 @@
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
@ -33,10 +34,12 @@
<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="labelIdDocNumber" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
<Label Name="labelCountryOfBirth" Grid.Row="4" Grid.Column="2" Content="{x:Static p:Resources.textCountryOfBirth}" />
<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="5" 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="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"/>
@ -50,14 +53,16 @@
</DatePicker.BlackoutDates>
</DatePicker>
<ComboBox Grid.Row="4" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}" />
<TextBox Grid.Row="4" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
<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="5" Grid.Column="3" Width="auto" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" ContextMenu="{DynamicResource ClearContextMenu}"/>
<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}"/>
<DatePicker Grid.Row="6" Grid.Column="1" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
<DatePicker.BlackoutDates>
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
<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"/>
</Grid>
</enictrl:EditWindowBase>

View File

@ -46,6 +46,9 @@ 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.textBoxEffects.Text = this.CREW.Effects;
this.OKClicked += EditCREWDialog_OKClicked;
this.AddVisible = true;
}
@ -65,6 +68,8 @@ 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.Effects = this.textBoxEffects.Text.Trim();
}
private void EditCREWDialog_OKClicked()

View File

@ -8,7 +8,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textPassenger}" Height="274" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
Title="{x:Static p:Resources.textPassenger}" Height="330" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
@ -18,6 +18,8 @@
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
@ -32,13 +34,16 @@
<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="labelIdDocNumber" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textIdDocNumber}" />
<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="4" Grid.Column="2" Content="{x:Static p:Resources.textPortOfEmbarkation}" />
<Label Name="labelPortOfEmbarkation" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textPortOfEmbarkation}" />
<Label Name="labelPortOfDisEmbarkation" Grid.Row="5" Grid.Column="0 " Content="{x:Static p:Resources.textPortOfDisembarkation}" />
<Label Name="labelTransitPassenger" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textTransitPassenger}" />
<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="6" Grid.Column="2" Content="{x:Static p:Resources.textDocumentExpiryDate}" />
<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}" />
<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" />
@ -52,17 +57,20 @@
</DatePicker.BlackoutDates>
</DatePicker>
<ComboBox Grid.Row="3" Grid.Column="1" Name="comboBoxIdDocType" Margin="2" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
<TextBox Grid.Row="3" Grid.Column="3" Width="auto" Name="textBoxIdDocNumber" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
<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="4" Grid.Column="3" />
<enictrl:LocodeControl x:Name="locodePortOfEmbarkation" Grid.Row="5" Grid.Column="3" />
<enictrl:LocodeControl x:Name="locodePortOfDisembarkation" Grid.Row="5" Grid.Column="1" />
<CheckBox Name="checkBoxTransitPassenger" Grid.Row ="5" Grid.Column="3" VerticalAlignment="Center" Margin="2"/>
<CheckBox Name="checkBoxTransitPassenger" Grid.Row="6" Grid.Column="3" VerticalAlignment="Center" Margin="2"/>
<ComboBox Grid.Row="6" Grid.Column="1" Name="comboBoxIssuingState" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" />
<DatePicker Grid.Row="6" Grid.Column="3" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
<DatePicker Grid.Row="7" Grid.Column="3" Name="datePickerExpiryDate" Margin="2" DisplayDateStart="1/1/1900" DisplayDateEnd="12/31/2199" PreviewKeyUp="DateTimePicker_PreviewKeyUpDate">
<DatePicker.BlackoutDates>
<CalendarDateRange Start="1/1/0001" End="12/31/1899"/>
<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" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -48,6 +48,10 @@ 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;
this.OKClicked += EditPasDialog_OKClicked;
this.AddVisible = true;
@ -70,7 +74,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();
}
private void EditPasDialog_OKClicked()
{

View File

@ -1588,6 +1588,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Country of birth.
/// </summary>
public static string textCountryOfBirth {
get {
return ResourceManager.GetString("textCountryOfBirth", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Created.
/// </summary>
@ -1993,6 +2002,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Effects.
/// </summary>
public static string textEffects {
get {
return ResourceManager.GetString("textEffects", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to E-Mail.
/// </summary>
@ -2002,6 +2020,24 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Emergency care.
/// </summary>
public static string textEmergencyCare {
get {
return ResourceManager.GetString("textEmergencyCare", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Emergency contact number.
/// </summary>
public static string textEmergencyContactNumber {
get {
return ResourceManager.GetString("textEmergencyContactNumber", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Emergency temperature.
/// </summary>

View File

@ -1810,4 +1810,16 @@
<data name="textPasDeparture" xml:space="preserve">
<value>Passenger departure</value>
</data>
<data name="textCountryOfBirth" xml:space="preserve">
<value>Country of birth</value>
</data>
<data name="textEffects" xml:space="preserve">
<value>Effects</value>
</data>
<data name="textEmergencyCare" xml:space="preserve">
<value>Emergency care</value>
</data>
<data name="textEmergencyContactNumber" xml:space="preserve">
<value>Emergency contact number</value>
</data>
</root>