DeliveryConfirmationsWindow: Remove Stichprobe Button
This commit is contained in:
@ -23,11 +23,8 @@
|
|||||||
<TextBox x:Name="TextElement" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
|
<TextBox x:Name="TextElement" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="200,10,10,10" Height="Auto"/>
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="200,10,10,10" Height="Auto"/>
|
||||||
|
|
||||||
<ProgressBar x:Name="ProgressBar" Margin="10,10,10,106" Height="27" Width="180"
|
<ProgressBar x:Name="ProgressBar" Margin="10,0,0,74" Height="27" Width="180"
|
||||||
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
||||||
<Button x:Name="TestButton" Content="Stichprobe" FontSize="14" Width="180" Margin="10,10,10,74" Height="27" Tag="Print" IsEnabled="False"
|
|
||||||
Click="TestButton_Click"
|
|
||||||
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
|
||||||
<Button x:Name="ShowButton" Content="Vorschau" FontSize="14" Width="180" Margin="10,10,10,42" Height="27" Tag="Print" IsEnabled="False"
|
<Button x:Name="ShowButton" Content="Vorschau" FontSize="14" Width="180" Margin="10,10,10,42" Height="27" Tag="Print" IsEnabled="False"
|
||||||
Click="ShowButton_Click"
|
Click="ShowButton_Click"
|
||||||
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
||||||
|
@ -20,15 +20,9 @@ namespace Elwig.Dialogs {
|
|||||||
Year = year;
|
Year = year;
|
||||||
Title = $"Anlieferungsbestätigungen - Lese {Year} - Elwig";
|
Title = $"Anlieferungsbestätigungen - Lese {Year} - Elwig";
|
||||||
TextElement.Text = App.Client.TextDeliveryConfirmation;
|
TextElement.Text = App.Client.TextDeliveryConfirmation;
|
||||||
if (!App.Config.Debug) {
|
|
||||||
TestButton.Visibility = Visibility.Hidden;
|
|
||||||
var m = ProgressBar.Margin;
|
|
||||||
ProgressBar.Margin = new(m.Left, m.Top, m.Right, m.Bottom - 32);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Window_Loaded(object sender, RoutedEventArgs evt) {
|
private void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||||
TestButton.IsEnabled = App.IsPrintingReady;
|
|
||||||
ShowButton.IsEnabled = App.IsPrintingReady;
|
ShowButton.IsEnabled = App.IsPrintingReady;
|
||||||
PrintButton.IsEnabled = App.IsPrintingReady;
|
PrintButton.IsEnabled = App.IsPrintingReady;
|
||||||
}
|
}
|
||||||
@ -80,11 +74,6 @@ namespace Elwig.Dialogs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IEnumerable<Member> list = await members.ToListAsync();
|
IEnumerable<Member> list = await members.ToListAsync();
|
||||||
if (mode == 0) {
|
|
||||||
var r = new Random().Next(0, 10);
|
|
||||||
list = list.Where((_, n) => n % 10 == r);
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = await DeliveryConfirmationData.ForSeason(Context.DeliveryParts, Year);
|
var data = await DeliveryConfirmationData.ForSeason(Context.DeliveryParts, Year);
|
||||||
using var doc = Document.Merge(list.Select(m =>
|
using var doc = Document.Merge(list.Select(m =>
|
||||||
new DeliveryConfirmation(Context, Year, m, data[m.MgNr]) {
|
new DeliveryConfirmation(Context, Year, m, data[m.MgNr]) {
|
||||||
@ -109,10 +98,6 @@ namespace Elwig.Dialogs {
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void TestButton_Click(object sender, RoutedEventArgs evt) {
|
|
||||||
await Generate(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void ShowButton_Click(object sender, RoutedEventArgs evt) {
|
private async void ShowButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
await Generate(1);
|
await Generate(1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user