[#64] AreaComAdminWindow: Add dialog for modifying/deleting
All checks were successful
Test / Run tests (push) Successful in 2m21s

This commit is contained in:
2025-07-09 18:12:35 +02:00
parent 267aa3d47c
commit c61c2e3fcd
5 changed files with 243 additions and 68 deletions

View File

@ -106,13 +106,13 @@ namespace Elwig.Services {
}
public static async Task<int> UpdateAreaCommitment(this AreaComAdminViewModel vm, int? oldFbNr) {
int newFbNr = (int)vm.FbNr!;
int newFbNr = vm.FbNr!.Value;
return await Task.Run(async () => {
using var ctx = new AppDbContext();
var a = new AreaCom {
FbNr = oldFbNr ?? newFbNr,
MgNr = (int)vm.MgNr!,
MgNr = vm.MgNr!.Value,
YearFrom = vm.YearFrom,
YearTo = vm.YearTo,
VtrgId = vm.AreaComType!.VtrgId,
@ -120,8 +120,8 @@ namespace Elwig.Services {
Comment = string.IsNullOrEmpty(vm.Comment) ? null : vm.Comment,
KgNr = vm.Kg!.KgNr,
RdNr = vm.Rd?.RdNr,
GstNr = vm.GstNr!.Trim(),
Area = (int)vm.Area!,
GstNr = vm.GstNr?.Trim() ?? "-",
Area = vm.Area!.Value,
};
if (vm.Rd?.RdNr == 0) {