Add PaymentVariantsWindow
This commit is contained in:
@ -21,11 +21,6 @@ namespace Elwig.Windows {
|
||||
MyListBox.ItemsSource = new string[] { "Test 1", "Test 2", "Test 3", "Test 4" };
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||
PdfDeliveryButton.IsEnabled = App.IsPrintingReady;
|
||||
PdfCreditButton.IsEnabled = App.IsPrintingReady;
|
||||
}
|
||||
|
||||
private void OnItemSelectionChanged(object sender, ItemSelectionChangedEventArgs e) {
|
||||
MyText.Text = string.Join(", ", MyComboBox.SelectedItems.Cast<string>());
|
||||
}
|
||||
@ -50,33 +45,10 @@ namespace Elwig.Windows {
|
||||
}
|
||||
}
|
||||
|
||||
private void ChartButton_Click(object sender, RoutedEventArgs evt) {
|
||||
var w = new ChartWindow();
|
||||
w.Show();
|
||||
}
|
||||
|
||||
private async void ZipButton_Click(object sender, RoutedEventArgs evt) {
|
||||
using var ctx = new AppDbContext();
|
||||
using var ods = new OdsFile(@"C:\Users\Lorenz\Desktop\test.ods");
|
||||
await ods.AddTable(await DeliveryConfirmationData.ForMember(ctx.DeliveryParts, 2023, ctx.Members.Find(2948)));
|
||||
}
|
||||
|
||||
private async void PdfDeliveryButton_Click(object sender, RoutedEventArgs evt) {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
using var ctx = new AppDbContext();
|
||||
using var doc = new DeliveryNote(await ctx.Deliveries.OrderBy(d => d.Parts.Count).ThenBy(d => d.Year).ThenBy(d => d.DId).LastAsync(), ctx);
|
||||
await doc.Generate();
|
||||
doc.Show();
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
|
||||
private async void PdfCreditButton_Click(object sender, RoutedEventArgs evt) {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
using var ctx = new AppDbContext();
|
||||
using var doc = new CreditNote(await ctx.Credits.FirstAsync(), ctx);
|
||||
await doc.Generate();
|
||||
doc.Show();
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user