Add Gesamtlieferung to DeliveryNote
This commit is contained in:
@ -106,14 +106,14 @@ namespace Elwig.Windows {
|
||||
|
||||
private async void Menu_Print_ShowDeliveryNote_Click(object sender, RoutedEventArgs evt) {
|
||||
if (DeliveryList.SelectedItem is not Delivery d) return;
|
||||
using var doc = new DeliveryNote(d);
|
||||
using var doc = new DeliveryNote(d, Context);
|
||||
await doc.Generate();
|
||||
doc.Show();
|
||||
}
|
||||
|
||||
private async void Menu_Print_PrintDeliveryNote_Click(object sender, RoutedEventArgs evt) {
|
||||
if (DeliveryList.SelectedItem is not Delivery d) return;
|
||||
using var doc = new DeliveryNote(d);
|
||||
using var doc = new DeliveryNote(d, Context);
|
||||
await doc.Generate();
|
||||
await doc.Print();
|
||||
}
|
||||
@ -714,7 +714,7 @@ namespace Elwig.Windows {
|
||||
await RefreshDeliveryList();
|
||||
await RefreshDeliveryParts();
|
||||
if (p?.Delivery != null) {
|
||||
using var doc = new DeliveryNote(p.Delivery);
|
||||
using var doc = new DeliveryNote(p.Delivery, Context);
|
||||
await doc.Generate();
|
||||
doc.Show();
|
||||
//await doc.Print(2);
|
||||
|
@ -41,7 +41,7 @@ namespace Elwig.Windows {
|
||||
private void PdfButton_Click(object sender, RoutedEventArgs evt) {
|
||||
Utils.RunBackground("PDF Generation", async () => {
|
||||
using var ctx = new AppDbContext();
|
||||
using var doc = new DeliveryNote(ctx.Deliveries.OrderBy(d => d.Parts.Count).ThenBy(d => d.Year).ThenBy(d => d.DId).Last());
|
||||
using var doc = new DeliveryNote(ctx.Deliveries.OrderBy(d => d.Parts.Count).ThenBy(d => d.Year).ThenBy(d => d.DId).Last(), ctx);
|
||||
await doc.Generate();
|
||||
doc.Show();
|
||||
});
|
||||
|
Reference in New Issue
Block a user