DeliveryAdminWindow is now able to look at deliveries

This commit is contained in:
2023-07-13 21:10:48 +02:00
parent e8919cc629
commit fd26ee4f52
7 changed files with 390 additions and 55 deletions

View File

@ -119,5 +119,12 @@ namespace Elwig.Helpers {
.ForEach(a => { if (a <= c + 10) 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))
.OrderBy(q => q.MinKmw)
.LastOrDefaultAsync();
}
}
}