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

@ -108,7 +108,7 @@ namespace Elwig.Services {
public static async Task<int> UpdateAreaCommitment(this AreaComAdminViewModel vm, int? oldFbNr) {
int newFbNr = (int)vm.FbNr!;
await Task.Run(async () => {
return await Task.Run(async () => {
using var ctx = new AppDbContext();
var a = new AreaCom {
FbNr = oldFbNr ?? newFbNr,
@ -141,11 +141,9 @@ namespace Elwig.Services {
if (newFbNr != a.FbNr) {
await ctx.Database.ExecuteSqlAsync($"UPDATE area_commitment SET fbnr = {newFbNr} WHERE fbnr = {oldFbNr}");
}
return newFbNr;
});
App.HintContextChange();
return newFbNr;
}
private static void AddToolTipCell(Grid grid, string text, int row, int col, int colSpan = 1, bool bold = false, bool alignRight = false, bool alignCenter = false) {
@ -262,8 +260,6 @@ namespace Elwig.Services {
ctx.Remove(l);
await ctx.SaveChangesAsync();
});
App.HintContextChange();
}
}
}