Improve DeliveryAdminWindow
This commit is contained in:
@ -100,5 +100,13 @@ namespace Elwig.Helpers {
|
||||
.ForEach(a => { if (a <= c + 100) c = a; });
|
||||
return c + 1;
|
||||
}
|
||||
|
||||
public async Task<int> NextLNr(DateOnly date) {
|
||||
var dateStr = date.ToString("yyyy-MM-dd");
|
||||
int c = 0;
|
||||
(await Deliveries.Where(d => d.DateString == dateStr).Select(d => d.LNr).ToListAsync())
|
||||
.ForEach(a => { if (a <= c + 10) c = a; });
|
||||
return c + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user