AreaComAdminWindow: Allow users to create new reeds inline

This commit is contained in:
lorenz.stechauner committed 2023-11-16 17:42:01 +01:00
1 parent 077e03ab2f
commit f4ec95cdca
12 files changed
+128 -22

No files matched your search

+7
View File
@@ -163,6 +163,13 @@ namespace Elwig.Helpers {
return c + 1;
}
public async Task<int> NextRdNr(int kgnr) {
int c = 0;
(await WbRde.Where(r => r.KgNr == kgnr).Select(r => r.RdNr).ToListAsync())
.ForEach(a => { if (a <= c + 100) c = a; });
return c + 1;
}
public async Task<WineQualLevel> GetWineQualityLevel(double kmw) {
return await WineQualityLevels
.Where(q => !q.IsPredicate && (q.MinKmw == null || q.MinKmw <= kmw))