Services: Move App.HintContextChange() to Windows
Some checks failed
Test / Run tests (push) Has been cancelled

This commit is contained in:
2025-07-09 16:07:47 +02:00
parent 53d82604a1
commit 7e9a27c75d
13 changed files with 53 additions and 72 deletions

View File

@@ -430,7 +430,7 @@ namespace Elwig.Services {
}
public static async Task<DeliveryPart> UpdateDeliveryPart(this DeliveryAdminViewModel vm, int? oldYear, int? oldDid, int? oldDpnr, bool dateHasChanged, bool timeHasChanged, bool timeIsDefault) {
var p = await Task.Run(async () => {
return await Task.Run(async () => {
DeliveryPart p;
using var ctx = new AppDbContext();
@@ -528,14 +528,10 @@ namespace Elwig.Services {
return p;
});
App.HintContextChange();
return p;
}
public static async Task<Delivery> SplitDeliveryToMember(int year, int did, int[] weights, int mgnr) {
var n = await Task.Run(async () => {
return await Task.Run(async () => {
Delivery n;
using var ctx = new AppDbContext();
@@ -584,14 +580,10 @@ namespace Elwig.Services {
return n;
});
App.HintContextChange();
return n;
}
public static async Task<Delivery> SplitDeliveryToLsNr(int year, int did, int[] weights, string lsnr) {
var n = await Task.Run(async () => {
return await Task.Run(async () => {
Delivery n;
using var ctx = new AppDbContext();
var anyLeft = false;
@@ -625,10 +617,6 @@ namespace Elwig.Services {
return n;
});
App.HintContextChange();
return n;
}
public static async Task DepreciateDelivery(int year, int did, int[] weights) {
@@ -658,8 +646,6 @@ namespace Elwig.Services {
}
await ctx.SaveChangesAsync();
});
App.HintContextChange();
}
public static async Task GenerateDeliveryNote(int year, int did, ExportMode mode) {
@@ -1102,8 +1088,6 @@ namespace Elwig.Services {
await ctx.Deliveries.Where(d => d.LsNr == lsnr).ExecuteDeleteAsync();
await ctx.SaveChangesAsync();
});
App.HintContextChange();
}
}
}