Added delete all buttons to CREWA CREWD PASA PASD in Border police ctrl
This commit is contained in:
parent
bed3fc397a
commit
c26c19d401
@ -65,6 +65,7 @@
|
||||
<Label Name="labelCrewNotificationSchengen" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||
<CheckBox Name="checkBoxCrewNotificationPAX" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationPAX_Click"/>
|
||||
<Label Name="labelCrewNotificationPAX" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||
<Button Name="buttonDeleteAllCrewA" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllCrewA_Click"/>
|
||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="CREWA" VerticalAlignment="Center" />
|
||||
|
||||
</StackPanel>
|
||||
@ -107,6 +108,7 @@
|
||||
<Label Name="labelCrewNotificationSchengenDeparture" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||
<CheckBox Name="checkBoxCrewNotificationPAXDeparture" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxCrewNotificationPAXDeparture_Click"/>
|
||||
<Label Name="labelCrewNotificationPAXDeparture" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||
<Button Name="buttonDeleteAllCrewD" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllCrewD_Click"/>
|
||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="CREWD" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" x:Name="dataGridCrewListDeparture" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
@ -147,6 +149,7 @@
|
||||
<Label Name="labelPasNotificationSchengen" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||
<CheckBox Name="checkBoxPasNotificationPAX" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationPAX_Click"/>
|
||||
<Label Name="labelPasNotificationPAX" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||
<Button Name="buttonDeleteAllPasA" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllPasA_Click"/>
|
||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="PASA" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPassengerList" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
@ -192,6 +195,7 @@
|
||||
<Label Name="labelPasNotificationSchengenDeparture" Content="{x:Static p:Resources.textNotificationSchengen}" />
|
||||
<CheckBox Name="checkBoxPasNotificationPAXDeparture" IsThreeState="False" VerticalAlignment="Center" Margin="10,0,0,0" Click="checkBoxPasNotificationPAXDeparture_Click"/>
|
||||
<Label Name="labelPasNotificationPAXDeparture" Content="{x:Static p:Resources.textNotificationPAX}" />
|
||||
<Button Name="buttonDeleteAllPasD" Margin="2" Content="{x:Static p:Resources.textDeleteAllEntries}" Background="Transparent" Click="buttonDeleteAllPasD_Click"/>
|
||||
<TextBlock Margin="30,0,0,0" FontWeight="Bold" FontSize="16" Text="PASD" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<enictrl:ENIDataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="dataGridPassengerListDeparture" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
||||
|
||||
@ -14,6 +14,7 @@ using ENI2.Locode;
|
||||
using ExcelDataReader;
|
||||
using bsmd.database;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Linq;
|
||||
|
||||
namespace ENI2.DetailViewControls
|
||||
{
|
||||
@ -1018,7 +1019,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
if (importCrew.Count > 0)
|
||||
{
|
||||
this.dataGridCrewList.Items.Refresh();
|
||||
this.dataGridCrewList.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
||||
MessageBox.Show(String.Format(Properties.Resources.textCrewImported, importCrew.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
@ -1186,9 +1187,7 @@ namespace ENI2.DetailViewControls
|
||||
}
|
||||
stream.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void buttonImportExcelPassengerDeparture_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@ -1314,7 +1313,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxCrewNotificationSchengen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach(CREW crew in _crewMessage.Elements)
|
||||
foreach(CREW crew in _crewMessage.Elements.Cast<CREW>())
|
||||
{
|
||||
crew.NotificationSchengen = checkBoxCrewNotificationSchengen.IsChecked;
|
||||
}
|
||||
@ -1324,7 +1323,7 @@ namespace ENI2.DetailViewControls
|
||||
private void checkBoxCrewNotificationPAX_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
foreach (CREW crew in _crewMessage.Elements)
|
||||
foreach (CREW crew in _crewMessage.Elements.Cast<CREW>())
|
||||
{
|
||||
crew.NotificationPAX = checkBoxCrewNotificationPAX.IsChecked;
|
||||
}
|
||||
@ -1333,7 +1332,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxCrewNotificationSchengenDeparture_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach(CREWD crewd in _crewdMessage.Elements)
|
||||
foreach(CREWD crewd in _crewdMessage.Elements.Cast<CREWD>())
|
||||
{
|
||||
crewd.NotificationSchengen = checkBoxCrewNotificationSchengenDeparture.IsChecked;
|
||||
}
|
||||
@ -1342,7 +1341,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxCrewNotificationPAXDeparture_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach (CREWD crewd in _crewdMessage.Elements)
|
||||
foreach (CREWD crewd in _crewdMessage.Elements.Cast<CREWD>())
|
||||
{
|
||||
crewd.NotificationPAX = checkBoxCrewNotificationPAXDeparture.IsChecked;
|
||||
}
|
||||
@ -1351,7 +1350,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxPasNotificationSchengen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach(PAS pas in _pasMessage.Elements)
|
||||
foreach(PAS pas in _pasMessage.Elements.Cast<PAS>())
|
||||
{
|
||||
pas.NotificationSchengen = checkBoxPasNotificationSchengen.IsChecked;
|
||||
}
|
||||
@ -1360,7 +1359,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxPasNotificationPAX_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach(PAS pas in _pasMessage.Elements)
|
||||
foreach(PAS pas in _pasMessage.Elements.Cast<PAS>())
|
||||
{
|
||||
pas.NotificationPAX = checkBoxPasNotificationPAX.IsChecked;
|
||||
}
|
||||
@ -1369,7 +1368,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxPasNotificationSchengenDeparture_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach(PASD pasd in _pasdMessage.Elements)
|
||||
foreach(PASD pasd in _pasdMessage.Elements.Cast<PASD>())
|
||||
{
|
||||
pasd.NotificationSchengen = checkBoxPasNotificationSchengenDeparture.IsChecked;
|
||||
}
|
||||
@ -1378,12 +1377,72 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private void checkBoxPasNotificationPAXDeparture_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach(PASD pasd in _pasdMessage.Elements)
|
||||
foreach(PASD pasd in _pasdMessage.Elements.Cast<PASD>())
|
||||
{
|
||||
pasd.NotificationPAX = checkBoxPasNotificationPAXDeparture.IsChecked;
|
||||
}
|
||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Buttons to delete all entries from CREWA CREWD PASA PASD
|
||||
|
||||
private async void buttonDeleteAllCrewA_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||
{
|
||||
foreach(CREW crewa in this._crewMessage.Elements.Cast<CREW>())
|
||||
{
|
||||
await DBManagerAsync.DeleteAsync(crewa);
|
||||
}
|
||||
this._crewMessage.Elements.Clear();
|
||||
this.dataGridCrewList.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.CREWA);
|
||||
}
|
||||
}
|
||||
|
||||
private async void buttonDeleteAllCrewD_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||
{
|
||||
foreach (CREWD crewd in this._crewMessage.Elements.Cast<CREWD>())
|
||||
{
|
||||
await DBManagerAsync.DeleteAsync(crewd);
|
||||
}
|
||||
this._crewdMessage.Elements.Clear();
|
||||
this.dataGridCrewListDeparture.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.CREWD);
|
||||
}
|
||||
}
|
||||
|
||||
private async void buttonDeleteAllPasA_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||
{
|
||||
foreach (PAS pasa in this._pasMessage.Elements.Cast<PAS>())
|
||||
{
|
||||
await DBManagerAsync.DeleteAsync(pasa);
|
||||
}
|
||||
this._pasMessage.Elements.Clear();
|
||||
this.dataGridPassengerList.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.PASA);
|
||||
}
|
||||
}
|
||||
|
||||
private async void buttonDeleteAllPasD_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(Properties.Resources.textConfimDeleteAllEntries, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes)
|
||||
{
|
||||
foreach (PASD pasd in this._pasdMessage.Elements.Cast<PASD>())
|
||||
{
|
||||
await DBManagerAsync.DeleteAsync(pasd);
|
||||
}
|
||||
this._pasdMessage.Elements.Clear();
|
||||
this.dataGridPassengerListDeparture.Items.Refresh();
|
||||
this.SublistElementChanged(Message.NotificationClass.PASD);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@ -30,14 +30,7 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
private static List<WasteDisposalServiceProvider_Template> _wsdpTemplates = null;
|
||||
private WasteDisposalServiceProvider_Template _currentTemplate;
|
||||
private string _undoTemplate;
|
||||
|
||||
private static readonly string[] _wasteDeliveryList =
|
||||
{
|
||||
"ALL",
|
||||
"SOME",
|
||||
"NONE"
|
||||
};
|
||||
private string _undoTemplate;
|
||||
|
||||
public WasteDetailControl()
|
||||
{
|
||||
|
||||
18
ENI2/Properties/Resources.Designer.cs
generated
18
ENI2/Properties/Resources.Designer.cs
generated
@ -1433,6 +1433,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This will delete all entries. Are you sure?.
|
||||
/// </summary>
|
||||
public static string textConfimDeleteAllEntries {
|
||||
get {
|
||||
return ResourceManager.GetString("textConfimDeleteAllEntries", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirmation.
|
||||
/// </summary>
|
||||
@ -2000,6 +2009,15 @@ namespace ENI2.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delete all entries.
|
||||
/// </summary>
|
||||
public static string textDeleteAllEntries {
|
||||
get {
|
||||
return ResourceManager.GetString("textDeleteAllEntries", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Departure notification.
|
||||
/// </summary>
|
||||
|
||||
@ -1906,4 +1906,10 @@
|
||||
<data name="textSpecialCaseDEHAM" xml:space="preserve">
|
||||
<value>{0} has not been sent for DEHAM. Close anyway?</value>
|
||||
</data>
|
||||
<data name="textDeleteAllEntries" xml:space="preserve">
|
||||
<value>Delete all entries</value>
|
||||
</data>
|
||||
<data name="textConfimDeleteAllEntries" xml:space="preserve">
|
||||
<value>This will delete all entries. Are you sure?</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Reference in New Issue
Block a user