Helpers/Export: Add Dto file export

This commit is contained in:
2023-11-13 00:22:21 +01:00
parent 2cdde60644
commit db8a449785
5 changed files with 233 additions and 21 deletions

View File

@ -1,8 +1,12 @@
using Elwig.Documents;
using Elwig.Helpers;
using Elwig.Helpers.Billing;
using Elwig.Helpers.Export;
using Elwig.Models.Dtos;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Input;
@ -51,6 +55,12 @@ namespace Elwig.Windows {
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, 2948));
}
private async void PdfDeliveryButton_Click(object sender, RoutedEventArgs evt) {
Mouse.OverrideCursor = Cursors.AppStarting;
using var ctx = new AppDbContext();