diff --git a/Elwig/App.xaml b/Elwig/App.xaml
index bba2122..e351b55 100644
--- a/Elwig/App.xaml
+++ b/Elwig/App.xaml
@@ -84,6 +84,12 @@
+
+
+
+
+
+
@@ -95,7 +101,7 @@
-
+
@@ -103,5 +109,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Elwig/App.xaml.cs b/Elwig/App.xaml.cs
index 23d2767..2c78bf4 100644
--- a/Elwig/App.xaml.cs
+++ b/Elwig/App.xaml.cs
@@ -15,6 +15,7 @@ using System.Reflection;
using Elwig.Helpers.Printing;
using Elwig.Windows;
using Elwig.Dialogs;
+using System.Threading.Tasks;
namespace Elwig {
public partial class App : Application {
@@ -175,6 +176,13 @@ namespace Elwig {
}
}
+ public static async Task HintContextChange() {
+ foreach (Window w in CurrentApp.Windows) {
+ if (w is not ContextWindow c) continue;
+ await c.HintContextChange();
+ }
+ }
+
private static T FocusWindow(Func constructor, Predicate? selector = null) where T : Window {
foreach (Window w in CurrentApp.Windows) {
if (w is T t && (selector == null || selector(t))) {
@@ -218,5 +226,15 @@ namespace Elwig {
public static DeliveryConfirmationsWindow FocusDeliveryConfirmations(int year) {
return FocusWindow(() => new(year), w => w.Year == year);
}
+
+ public static OriginHierarchyWindow FocusOriginHierarchy() {
+ return FocusWindow(() => new());
+ }
+
+ public static OriginHierarchyWindow FocusOriginHierarchyKg(int kgnr) {
+ var w = FocusOriginHierarchy();
+ w.FocusKgNr(kgnr);
+ return w;
+ }
}
}
diff --git a/Elwig/Helpers/AppDbContext.cs b/Elwig/Helpers/AppDbContext.cs
index cb28a14..b0f8071 100644
--- a/Elwig/Helpers/AppDbContext.cs
+++ b/Elwig/Helpers/AppDbContext.cs
@@ -27,6 +27,8 @@ namespace Elwig.Helpers {
public DbSet WineVarieties { get; private set; }
public DbSet ClientParameters { get; private set; }
+ public DbSet WbGls { get; private set; }
+ public DbSet WbGems { get; private set; }
public DbSet WbKgs { get; private set; }
public DbSet WbRde { get; private set; }
public DbSet WineAttributes { get; private set; }
diff --git a/Elwig/Helpers/ControlUtils.cs b/Elwig/Helpers/ControlUtils.cs
index b196505..47c1a3d 100644
--- a/Elwig/Helpers/ControlUtils.cs
+++ b/Elwig/Helpers/ControlUtils.cs
@@ -183,6 +183,15 @@ namespace Elwig.Helpers {
SelectComboBoxItem(cb, getId, getId(item));
}
+ public static void SelectListBoxItem(ListBox lb, Func