Make methods in Utils async
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using Elwig.Models;
|
||||
|
||||
@ -265,7 +266,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
int nr = int.Parse(input.Text);
|
||||
if (nr != m?.MgNr && Utils.MgNrExists(ctx, nr)) {
|
||||
if (nr != m?.MgNr && Utils.MgNrExists(ctx, nr).GetAwaiter().GetResult()) {
|
||||
return new(false, "Mitgliedsnummer wird bereits verwendet");
|
||||
}
|
||||
|
||||
@ -278,7 +279,7 @@ namespace Elwig.Helpers {
|
||||
return res;
|
||||
} else if (!required && input.Text.Length == 0) {
|
||||
return new(true, null);
|
||||
} else if (!Utils.MgNrExists(ctx, int.Parse(input.Text))) {
|
||||
} else if (!Utils.MgNrExists(ctx, int.Parse(input.Text)).GetAwaiter().GetResult()) {
|
||||
return new(false, "Ein Mitglied mit dieser Mitgliedsnummer existiert nicht");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user