Update models because contracts were removed
This commit is contained in:
@ -411,7 +411,7 @@ namespace Elwig.Helpers {
|
||||
return new(true, null);
|
||||
}
|
||||
|
||||
public static ValidationResult CheckVNr(TextBox input, bool required, AppDbContext ctx, Contract? c) {
|
||||
public static ValidationResult CheckFbNr(TextBox input, bool required, AppDbContext ctx, AreaCom? c) {
|
||||
var res = CheckInteger(input, required);
|
||||
if (!res.IsValid) {
|
||||
return res;
|
||||
@ -420,8 +420,8 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
int nr = int.Parse(input.Text);
|
||||
if (nr != c?.VNr && ctx.VNrExists(nr).GetAwaiter().GetResult()) {
|
||||
return new(false, "Vertragsnummer wird bereits verwendet");
|
||||
if (nr != c?.FbNr && ctx.FbNrExists(nr).GetAwaiter().GetResult()) {
|
||||
return new(false, "Flächenbindungsnummer wird bereits verwendet");
|
||||
}
|
||||
|
||||
return new(true, null);
|
||||
|
Reference in New Issue
Block a user