[#10] DeliveryAdminWindow: Implement MVVM
This commit is contained in:
@ -264,11 +264,11 @@ namespace Elwig {
|
||||
}
|
||||
|
||||
public static DeliveryAdminWindow FocusReceipt() {
|
||||
return FocusWindow<DeliveryAdminWindow>(() => new(true), w => w.IsReceipt);
|
||||
return FocusWindow<DeliveryAdminWindow>(() => new(true), w => w.ViewModel.IsReceipt);
|
||||
}
|
||||
|
||||
public static DeliveryAdminWindow FocusMemberDeliveries(int mgnr) {
|
||||
return FocusWindow<DeliveryAdminWindow>(() => new(mgnr), w => w.MgNr == mgnr);
|
||||
return FocusWindow<DeliveryAdminWindow>(() => new(mgnr), w => w.ViewModel.FilterMgNr == mgnr);
|
||||
}
|
||||
|
||||
public static AreaComAdminWindow FocusMemberAreaComs(int mgnr) {
|
||||
|
640
Elwig/Services/DeliveryService.cs
Normal file
640
Elwig/Services/DeliveryService.cs
Normal file
@ -0,0 +1,640 @@
|
||||
using Elwig.Documents;
|
||||
using Elwig.Helpers.Export;
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Models.Dtos;
|
||||
using Elwig.Models.Entities;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using System.Windows;
|
||||
using System;
|
||||
using Elwig.ViewModels;
|
||||
using LinqKit;
|
||||
using System.Globalization;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.IO;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
|
||||
namespace Elwig.Services {
|
||||
public static class DeliveryService {
|
||||
|
||||
public static async Task<Member?> GetMemberAsync(int mgnr) {
|
||||
using var ctx = new AppDbContext();
|
||||
return await ctx.Members
|
||||
.Include(m => m.PostalDest.AtPlz!.Ort)
|
||||
.Include(m => m.DefaultWbKg!.AtKg)
|
||||
.FirstOrDefaultAsync(m => m.MgNr == mgnr);
|
||||
}
|
||||
|
||||
public static Member? GetMember(int mgnr) {
|
||||
return GetMemberAsync(mgnr).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public static void ClearInputs(this DeliveryAdminViewModel vm) {
|
||||
}
|
||||
|
||||
public static void FillInputs(this DeliveryAdminViewModel vm, Delivery d) {
|
||||
vm.MgNrString = $"{d.MgNr}";
|
||||
vm.Branch = (Branch?)ControlUtils.GetItemFromSourceWithPk(vm.BranchSource, d.ZwstId);
|
||||
vm.LsNr = d.LsNr;
|
||||
vm.Date = $"{d.Date:dd.MM.yyyy}";
|
||||
vm.Time = $"{d.Time:HH:mm}";
|
||||
vm.Comment = d.Comment ?? "";
|
||||
|
||||
vm.SortId = "";
|
||||
vm.GradationKmwString = "";
|
||||
vm.WeightString = "";
|
||||
vm.IsManualWeighing = false;
|
||||
vm.PartComment = "";
|
||||
vm.TemperatureString = "";
|
||||
vm.AcidString = "";
|
||||
}
|
||||
|
||||
public static void FillInputs(this DeliveryAdminViewModel vm, DeliveryPart p) {
|
||||
vm.SortId = p.SortId;
|
||||
vm.WineAttr = ControlUtils.GetItemFromSourceWithPk(vm.WineAttrSource, p.AttrId) as WineAttr;
|
||||
vm.WineCult = ControlUtils.GetItemFromSourceWithPk(vm.WineCultSource, p.CultId) as WineCult;
|
||||
vm.GradationKmwString = $"{p.Kmw:N1}";
|
||||
vm.WineQualityLevel = (WineQualLevel?)ControlUtils.GetItemFromSourceWithPk(vm.WineQualityLevelSource, p.QualId);
|
||||
vm.WineKg = ControlUtils.GetItemFromSourceWithPk(vm.WineKgSource, p.KgNr) as AT_Kg;
|
||||
vm.WineRd = ControlUtils.GetItemFromSourceWithPk(vm.WineRdSource, p.KgNr, p.RdNr) as WbRd;
|
||||
vm.WineOrigin = ControlUtils.GetItemFromSourceWithPk(vm.WineOriginSource, p.HkId) as WineOrigin;
|
||||
vm.WeightString = $"{p.Weight:N0}";
|
||||
vm.IsManualWeighing = p.IsManualWeighing;
|
||||
vm.IsNetWeight = p.IsNetWeight;
|
||||
|
||||
vm.Modifiers.Clear();
|
||||
foreach (var m in p.Modifiers) {
|
||||
vm.Modifiers.Add((Modifier)ControlUtils.GetItemFromSourceWithPk(vm.ModifiersSource, m.Year, m.ModId)!);
|
||||
}
|
||||
|
||||
vm.PartComment = p.Comment ?? "";
|
||||
vm.TemperatureString = (p.Temperature != null) ? $"{p.Temperature:N1}" : "";
|
||||
vm.AcidString = (p.Acid != null) ? $"{p.Acid:N1}" : "";
|
||||
vm.IsLesewagen = p.IsLesewagen ?? false;
|
||||
vm.IsHandPicked = p.IsHandPicked;
|
||||
vm.IsGebunden = p.IsGebunden;
|
||||
|
||||
vm.ScaleId = p.ScaleId;
|
||||
vm.WeighingId = p.WeighingId;
|
||||
vm.ManualWeighingReason = p.WeighingReason;
|
||||
}
|
||||
|
||||
public static async Task<(List<string>, IQueryable<Delivery>, IQueryable<DeliveryPart>, Predicate<DeliveryPart>, List<string>)> GetFilters(this DeliveryAdminViewModel vm, AppDbContext ctx) {
|
||||
List<string> filterNames = [];
|
||||
IQueryable<Delivery> deliveryQuery = ctx.Deliveries;
|
||||
if (vm.IsReceipt && App.BranchNum > 1) {
|
||||
deliveryQuery = deliveryQuery.Where(d => d.ZwstId == App.ZwstId);
|
||||
filterNames.Add($"Zweigstelle {App.BranchName}");
|
||||
}
|
||||
if (vm.FilterMember != null) {
|
||||
deliveryQuery = deliveryQuery.Where(d => d.MgNr == vm.FilterMember.MgNr);
|
||||
filterNames.Add(vm.FilterMember.AdministrativeName);
|
||||
}
|
||||
if (vm.FilterTodayOnly) {
|
||||
deliveryQuery = deliveryQuery
|
||||
.Where(d => (d.DateString == Utils.Today.ToString("yyyy-MM-dd") && (d.TimeString == null || d.TimeString.CompareTo("03:00:00") > 0)) ||
|
||||
(d.DateString == Utils.Today.AddDays(1).ToString("yyyy-MM-dd") && (d.TimeString == null || d.TimeString.CompareTo("03:00:00") <= 0)));
|
||||
filterNames.Add(Utils.Today.ToString("dd.MM.yyyy"));
|
||||
} else if (!vm.FilterAllSeasons) {
|
||||
deliveryQuery = deliveryQuery.Where(d => d.Year == vm.FilterSeason);
|
||||
filterNames.Add($"{vm.FilterSeason}");
|
||||
}
|
||||
|
||||
Expression<Func<DeliveryPart, bool>> prd = p => true;
|
||||
|
||||
var filterVar = new List<string>();
|
||||
var filterNotVar = new List<string>();
|
||||
var filterQual = new List<string>();
|
||||
var filterNotQual = new List<string>();
|
||||
var filterMgNr = new List<int>();
|
||||
var filterZwst = new List<string>();
|
||||
var filterAttr = new List<string>();
|
||||
var filterNotAttr = new List<string>();
|
||||
var filterCult = new List<string>();
|
||||
var filterNotCult = new List<string>();
|
||||
var filterDate = new List<(string?, string?)>();
|
||||
var filterTime = new List<(string?, string?)>();
|
||||
int filterYearGt = 0, filterYearLt = 0;
|
||||
double filterKmwGt = 0, filterKmwLt = 0;
|
||||
double filterOeGt = 0, filterOeLt = 0;
|
||||
|
||||
var filter = vm.TextFilter;
|
||||
if (filter.Count > 0) {
|
||||
var var = await ctx.WineVarieties.ToDictionaryAsync(v => v.SortId, v => v);
|
||||
var qual = await ctx.WineQualityLevels.Where(q => !q.IsPredicate).ToDictionaryAsync(q => q.QualId, q => q);
|
||||
var mgnr = await ctx.Members.ToDictionaryAsync(m => m.MgNr.ToString(), m => m);
|
||||
var zwst = await ctx.Branches.ToDictionaryAsync(b => b.Name.ToLower().Split(" ")[0], b => b);
|
||||
var attr = await ctx.WineAttributes.ToDictionaryAsync(a => a.Name.ToLower().Split(' ')[0], a => a);
|
||||
var cult = await ctx.WineCultivations.ToDictionaryAsync(c => c.Name.ToLower().Split(' ')[0], c => c);
|
||||
|
||||
for (int i = 0; i < filter.Count; i++) {
|
||||
var e = filter[i];
|
||||
if (e.ToLower() is "r" or "rot") {
|
||||
filterVar.AddRange(var.Values.Where(v => v.IsRed).Select(v => v.SortId));
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("Rotweinsorten");
|
||||
} else if (e.ToLower() is "w" or "weiß" or "weiss") {
|
||||
filterVar.AddRange(var.Values.Where(v => v.IsWhite).Select(v => v.SortId));
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("Weißweinsorten");
|
||||
} else if (e.Length >= 3 && e.Length <= 8 && "gebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsGebunden == true);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("gebunden");
|
||||
} else if (e.Length >= 4 && e.Length <= 9 && "!gebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsGebunden != true);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("nicht gebunden");
|
||||
} else if (e.Length >= 5 && e.Length <= 10 && "ungebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsGebunden == false);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("ungebunden");
|
||||
} else if (e.Length >= 6 && e.Length <= 11 && "!ungebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsGebunden != false);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("nicht ungebunden");
|
||||
} else if (e.Length >= 5 && e.Length <= 8 && "handlese".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsHandPicked == true);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("Handlese");
|
||||
} else if (e.Length >= 6 && e.Length <= 9 && "!handlese".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsHandPicked == false);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("keine Handlese");
|
||||
} else if (e.Length >= 5 && e.Length <= 11 && "handwiegung".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsManualWeighing == true);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("Handwiegung");
|
||||
} else if (e.Length >= 6 && e.Length <= 12 && "!handwiegung".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsManualWeighing == false);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("keine Handwiegung");
|
||||
} else if (e.ToLower() is "bto" or "brut" or "brutt" or "brutto" or "!gerebelt") {
|
||||
prd = prd.And(p => p.IsNetWeight == false);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("brutto Wiegung");
|
||||
} else if (e.ToLower() is "nto" or "net" or "nett" or "netto" or "gerebelt") {
|
||||
prd = prd.And(p => p.IsNetWeight == true);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("netto Wiegung");
|
||||
} else if (e.Length >= 5 && e.Length <= 9 && "lesewagen".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsLesewagen == true);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("Lesewagen");
|
||||
} else if (e.Length >= 6 && e.Length <= 10 && "!lesewagen".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
prd = prd.And(p => p.IsLesewagen == false);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("kein Lesewagen");
|
||||
} else if (e.Length == 2 && var.ContainsKey(e.ToUpper())) {
|
||||
filterVar.Add(e.ToUpper());
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add(var[e.ToUpper()].Name);
|
||||
} else if (e.Length == 3 && e[0] == '!' && var.ContainsKey(e[1..].ToUpper())) {
|
||||
filterNotVar.Add(e[1..].ToUpper());
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("außer " + var[e[1..].ToUpper()].Name);
|
||||
} else if (e.Length == 3 && qual.ContainsKey(e.ToUpper())) {
|
||||
var qualId = e.ToUpper();
|
||||
filterQual.Add(qualId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add(qualId == "WEI" ? "abgewertet" : qual[e.ToUpper()].Name);
|
||||
} else if (e[0] == '!' && qual.ContainsKey(e[1..].ToUpper())) {
|
||||
var qualId = e[1..].ToUpper();
|
||||
filterNotQual.Add(qualId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add(qualId == "WEI" ? "nicht abgewertet" : "außer " + qual[e[1..].ToUpper()].Name);
|
||||
} else if (e.Length >= 5 && e.Length <= 10 && "abgewertet".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
filterQual.Add("WEI");
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("abgewertet");
|
||||
} else if (e.Length >= 6 && e.Length <= 11 && "!abgewertet".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
|
||||
filterNotQual.Add("WEI");
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add("nicht abgewertet");
|
||||
} else if (e.All(char.IsAsciiDigit) && mgnr.TryGetValue(e, out var member)) {
|
||||
filterMgNr.Add(int.Parse(e));
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add(member.AdministrativeName);
|
||||
} else if (attr.ContainsKey(e.ToLower())) {
|
||||
var a = attr[e.ToLower()];
|
||||
filterAttr.Add(a.AttrId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add($"Attribut {a.Name}");
|
||||
} else if (e[0] == '!' && attr.ContainsKey(e[1..].ToLower())) {
|
||||
var a = attr[e[1..].ToLower()];
|
||||
filterNotAttr.Add(a.AttrId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add($"ohne Attribut {a.Name}");
|
||||
} else if (cult.ContainsKey(e.ToLower())) {
|
||||
var c = cult[e.ToLower()];
|
||||
filterCult.Add(c.CultId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add($"Bewirtschaftung {c.Name}");
|
||||
} else if (e[0] == '!' && cult.ContainsKey(e[1..].ToLower())) {
|
||||
var c = cult[e[1..].ToLower()];
|
||||
filterNotCult.Add(c.CultId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add($"ohne Bewirtschaftung {c.Name}");
|
||||
} else if (zwst.ContainsKey(e.ToLower())) {
|
||||
var b = zwst[e.ToLower()];
|
||||
filterZwst.Add(b.ZwstId);
|
||||
filter.RemoveAt(i--);
|
||||
filterNames.Add($"Zweigstelle {b.Name}");
|
||||
} else if (e.StartsWith('>') || e.StartsWith('<')) {
|
||||
if (double.TryParse(e[1..], out var num)) {
|
||||
switch ((e[0], num)) {
|
||||
case ('>', <= 30): filterKmwGt = num; break;
|
||||
case ('<', <= 30): filterKmwLt = num; break;
|
||||
case ('>', >= 1900): filterYearGt = (int)num; break;
|
||||
case ('<', >= 1900): filterYearLt = (int)num; break;
|
||||
case ('>', _): filterOeGt = num; break;
|
||||
case ('<', _): filterOeLt = num; break;
|
||||
}
|
||||
filter.RemoveAt(i--);
|
||||
}
|
||||
if (e.Length == 1) filter.RemoveAt(i--);
|
||||
} else if (e.Length > 1 && Utils.FromToRegex.IsMatch(e)) {
|
||||
var parts = e.Split("-");
|
||||
double? from = (parts[0].Length > 0) ? double.Parse(parts[0], CultureInfo.InvariantCulture) : null;
|
||||
double? to = (parts[1].Length > 0) ? double.Parse(parts[1], CultureInfo.InvariantCulture) : null;
|
||||
switch ((from, to)) {
|
||||
case ( <= 30, <= 30):
|
||||
case ( <= 30, null):
|
||||
case (null, <= 30):
|
||||
filterKmwGt = from ?? 0;
|
||||
filterKmwLt = to ?? 0;
|
||||
break;
|
||||
case ( >= 1900, >= 1900):
|
||||
case ( >= 1900, null):
|
||||
case (null, >= 1900):
|
||||
filterYearGt = (int)(from ?? 0);
|
||||
filterYearLt = (int)(to ?? -1) + 1;
|
||||
break;
|
||||
case (_, _):
|
||||
filterOeGt = from ?? 0;
|
||||
filterOeLt = to ?? 0;
|
||||
break;
|
||||
}
|
||||
filter.RemoveAt(i--);
|
||||
} else if (e.Length > 1 && Utils.FromToTimeRegex.IsMatch(e)) {
|
||||
var parts = e.Split("-");
|
||||
filterTime.Add((TimeOnly.TryParse(parts[0], out var from) ? $"{from:HH:mm}" : null, TimeOnly.TryParse(parts[1], out var to) ? $"{to:HH:mm}" : null));
|
||||
filter.RemoveAt(i--);
|
||||
var t = filterTime.Last();
|
||||
if (t.Item1 != null && t.Item2 != null) {
|
||||
filterNames.Add($"{t.Item1}–{t.Item2}");
|
||||
} else if (t.Item1 != null) {
|
||||
filterNames.Add($"ab {t.Item1}");
|
||||
} else if (t.Item2 != null) {
|
||||
filterNames.Add($"bis {t.Item2}");
|
||||
}
|
||||
} else if (DateOnly.TryParse(e, out var date)) {
|
||||
var s = date.ToString("yyyy-MM-dd");
|
||||
filterDate.Add((s, s));
|
||||
filter.RemoveAt(i--);
|
||||
if (filterNames.Contains($"{vm.FilterSeason}") && vm.FilterSeason == date.Year)
|
||||
filterNames.Remove($"{vm.FilterSeason}");
|
||||
filterNames.Add(date.ToString("dd.MM.yyyy"));
|
||||
} else if (Utils.DateFromToRegex.IsMatch(e)) {
|
||||
var parts = e.Split("-");
|
||||
if (parts.Length == 1) {
|
||||
// single date
|
||||
var dParts = parts[0].Split('.');
|
||||
var s = $"{dParts[2]}-{dParts[1].PadLeft(2, '0')}-{dParts[0].PadLeft(2, '0')}";
|
||||
filterDate.Add((s, s));
|
||||
filter.RemoveAt(i--);
|
||||
var n = string.Join('.', s.Split('-').Reverse());
|
||||
if (dParts[2] == "") {
|
||||
filterNames.Remove($"{vm.FilterSeason}");
|
||||
filterNames.Add(n + $"{vm.FilterSeason}");
|
||||
} else {
|
||||
if ($"{vm.FilterSeason}" == dParts[2])
|
||||
filterNames.Remove($"{vm.FilterSeason}");
|
||||
filterNames.Add(n);
|
||||
}
|
||||
} else if (parts.Length == 2) {
|
||||
// from/to date
|
||||
var d1Parts = parts[0].Split('.');
|
||||
var d2Parts = parts[1].Split('.');
|
||||
var s1 = d1Parts.Length < 2 ? null : $"{d1Parts.ElementAtOrDefault(2)}-{d1Parts[1].PadLeft(2, '0')}-{d1Parts[0].PadLeft(2, '0')}";
|
||||
var s2 = d2Parts.Length < 2 ? null : $"{d2Parts.ElementAtOrDefault(2)}-{d2Parts[1].PadLeft(2, '0')}-{d2Parts[0].PadLeft(2, '0')}";
|
||||
filterDate.Add((s1, s2));
|
||||
filter.RemoveAt(i--);
|
||||
var n1 = s1 == null ? null : string.Join('.', s1.Split('-').Reverse());
|
||||
var n2 = s2 == null ? null : string.Join('.', s2.Split('-').Reverse());
|
||||
if (n1 != null && n2 != null) {
|
||||
filterNames.Add($"{n1}–{n2}");
|
||||
} else if (n1 != null) {
|
||||
filterNames.Add($"ab dem {n1}");
|
||||
} else if (n2 != null) {
|
||||
filterNames.Add($"bis zum {n2}");
|
||||
}
|
||||
}
|
||||
} else if (e.Length > 2 && e.StartsWith('"') && e.EndsWith('"')) {
|
||||
filter[i] = e[1..^1];
|
||||
} else if (e.Length <= 2) {
|
||||
filter.RemoveAt(i--);
|
||||
}
|
||||
}
|
||||
|
||||
if (filterYearGt > 0) prd = prd.And(p => p.Year >= filterYearGt);
|
||||
if (filterYearLt > 0) prd = prd.And(p => p.Year < filterYearLt);
|
||||
if (filterMgNr.Count > 0) prd = prd.And(p => filterMgNr.Contains(p.Delivery.MgNr));
|
||||
if (filterDate.Count > 0) {
|
||||
var pr = PredicateBuilder.New<DeliveryPart>(false);
|
||||
foreach (var (d1, d2) in filterDate)
|
||||
pr.Or(p => (d1 == null || d1.CompareTo(p.Delivery.DateString.Substring(10 - d1.Length)) <= 0) && (d2 == null || d2.CompareTo(p.Delivery.DateString.Substring(10 - d2.Length)) >= 0));
|
||||
prd = prd.And(pr);
|
||||
}
|
||||
if (filterTime.Count > 0) {
|
||||
var pr = PredicateBuilder.New<DeliveryPart>(false);
|
||||
foreach (var (t1, t2) in filterTime)
|
||||
pr.Or(p => (t1 == null || t1.CompareTo(p.Delivery.TimeString) <= 0) && (t2 == null || t2.CompareTo(p.Delivery.TimeString) > 0));
|
||||
prd = prd.And(p => p.Delivery.TimeString != null).And(pr);
|
||||
}
|
||||
if (filterVar.Count > 0) prd = prd.And(p => filterVar.Contains(p.SortId));
|
||||
if (filterNotVar.Count > 0) prd = prd.And(p => !filterNotVar.Contains(p.SortId));
|
||||
if (filterQual.Count > 0) prd = prd.And(p => filterQual.Contains(p.QualId));
|
||||
if (filterNotQual.Count > 0) prd = prd.And(p => !filterNotQual.Contains(p.QualId));
|
||||
if (filterZwst.Count > 0) prd = prd.And(p => filterZwst.Contains(p.Delivery.ZwstId));
|
||||
if (filterAttr.Count > 0) prd = prd.And(p => p.AttrId != null && filterAttr.Contains(p.AttrId));
|
||||
if (filterNotAttr.Count > 0) prd = prd.And(p => p.AttrId == null || !filterNotAttr.Contains(p.AttrId));
|
||||
if (filterCult.Count > 0) prd = prd.And(p => p.CultId != null && filterCult.Contains(p.CultId));
|
||||
if (filterNotCult.Count > 0) prd = prd.And(p => p.CultId == null || !filterNotCult.Contains(p.CultId));
|
||||
if (filterKmwGt > 0) prd = prd.And(p => p.Kmw >= filterKmwGt);
|
||||
if (filterKmwLt > 0) prd = prd.And(p => p.Kmw < filterKmwLt);
|
||||
if (filterOeGt > 0) prd = prd.And(p => p.Kmw * (4.54 + 0.022 * p.Kmw) >= filterOeGt);
|
||||
if (filterOeLt > 0) prd = prd.And(p => p.Kmw * (4.54 + 0.022 * p.Kmw) < filterOeLt);
|
||||
|
||||
if (filterYearGt > 0 && filterYearLt > 0) {
|
||||
filterNames.Insert(0, $"{filterYearGt}–{filterYearLt - 1}");
|
||||
} else if (filterYearGt > 0) {
|
||||
filterNames.Insert(0, $"ab {filterYearGt}");
|
||||
} else if (filterYearLt > 0) {
|
||||
filterNames.Insert(0, $"bis {filterYearLt - 1}");
|
||||
}
|
||||
if (filterKmwGt > 0 && filterKmwLt > 0) {
|
||||
filterNames.Add($"{filterKmwGt:N1}–{filterKmwLt:N1} °KMW");
|
||||
} else if (filterKmwGt > 0) {
|
||||
filterNames.Add($"ab {filterKmwGt:N1} °KMW");
|
||||
} else if (filterKmwLt > 0) {
|
||||
filterNames.Add($"unter {filterKmwLt:N1} °KMW");
|
||||
}
|
||||
if (filterOeGt > 0 && filterOeLt > 0) {
|
||||
filterNames.Add($"{filterOeGt:N1}–{filterOeLt:N1} °Oe");
|
||||
} else if (filterOeGt > 0) {
|
||||
filterNames.Add($"ab {filterOeGt:N1} °Oe");
|
||||
} else if (filterOeLt > 0) {
|
||||
filterNames.Add($"unter {filterOeLt:N1} °Oe");
|
||||
}
|
||||
}
|
||||
|
||||
IQueryable<DeliveryPart> dpq = deliveryQuery
|
||||
.SelectMany(d => d.Parts)
|
||||
.Where(prd)
|
||||
.OrderBy(p => p.Delivery.DateString)
|
||||
.ThenBy(p => p.Delivery.TimeString)
|
||||
.ThenBy(p => p.Delivery.LsNr)
|
||||
.ThenBy(p => p.DPNr);
|
||||
|
||||
return (filterNames, dpq.Select(p => p.Delivery).Distinct().OrderBy(d => d.DateString).ThenBy(d => d.TimeString), dpq, prd.Invoke, filter);
|
||||
}
|
||||
|
||||
public static async Task<DeliveryPart> UpdateDeliveryPart(this DeliveryAdminViewModel vm, int? oldYear, int? oldDid, int? oldDpnr, bool dateHasChanged, bool timeHasChanged, bool timeIsDefault) {
|
||||
using var ctx = new AppDbContext();
|
||||
|
||||
int year = oldYear ?? Utils.CurrentYear;
|
||||
int did = oldDid ?? await ctx.NextDId(year);
|
||||
int dpnr = oldDpnr ?? await ctx.NextDPNr(year, did);
|
||||
|
||||
var oldDelivery = await ctx.Deliveries.FindAsync(year, did);
|
||||
bool deliveryNew = (oldDid == null);
|
||||
bool partNew = (oldDpnr == null);
|
||||
var originalMgNr = oldDelivery?.MgNr;
|
||||
var originalMemberKgNr = oldDelivery?.Member.DefaultKgNr;
|
||||
|
||||
var date = DateOnly.ParseExact(vm.Date!, "dd.MM.yyyy");
|
||||
int? newLnr = (deliveryNew || dateHasChanged) ? await ctx.NextLNr(date) : null;
|
||||
|
||||
string? newTimeString = null;
|
||||
if (partNew && timeIsDefault) {
|
||||
newTimeString = DateTime.Now.ToString("HH:mm:ss");
|
||||
} else if (partNew || timeHasChanged) {
|
||||
newTimeString = string.IsNullOrEmpty(vm.Time) ? null : vm.Time + ":00";
|
||||
}
|
||||
|
||||
var d = new Delivery {
|
||||
Year = year,
|
||||
DId = did,
|
||||
DateString = $"{date:yyyy-MM-dd}",
|
||||
TimeString = newTimeString ?? oldDelivery?.TimeString,
|
||||
LNr = newLnr ?? oldDelivery!.LNr,
|
||||
ZwstId = vm.Branch!.ZwstId,
|
||||
LsNr = vm.LsNr!,
|
||||
MgNr = (int)vm.MgNr!,
|
||||
Comment = string.IsNullOrEmpty(vm.Comment) ? null : vm.Comment,
|
||||
};
|
||||
|
||||
var p = new DeliveryPart {
|
||||
Year = year,
|
||||
DId = did,
|
||||
DPNr = dpnr,
|
||||
|
||||
SortId = vm.WineVar!.SortId,
|
||||
AttrId = vm.WineAttr?.AttrId,
|
||||
CultId = vm.WineCult?.CultId,
|
||||
Kmw = (double)vm.GradationKmw!,
|
||||
QualId = vm.WineQualityLevel!.QualId,
|
||||
HkId = vm.WineOrigin!.HkId,
|
||||
KgNr = vm.WineKg?.KgNr,
|
||||
RdNr = vm.WineRd?.RdNr,
|
||||
|
||||
IsNetWeight = vm.IsNetWeight,
|
||||
IsHandPicked = vm.IsHandPicked,
|
||||
IsLesewagen = vm.IsLesewagen,
|
||||
IsGebunden = vm.IsGebunden,
|
||||
Temperature = vm.Temperature,
|
||||
Acid = vm.Acid,
|
||||
Comment = string.IsNullOrEmpty(vm.PartComment) ? null : vm.PartComment,
|
||||
|
||||
Weight = (int)vm.Weight!,
|
||||
IsManualWeighing = vm.IsManualWeighing,
|
||||
ScaleId = vm.ScaleId,
|
||||
WeighingId = vm.WeighingId,
|
||||
WeighingReason = vm.ManualWeighingReason,
|
||||
};
|
||||
|
||||
try {
|
||||
if (oldDelivery != null && ctx.Entry(oldDelivery) is EntityEntry<Delivery> entry) {
|
||||
entry.State = EntityState.Detached;
|
||||
}
|
||||
if (!deliveryNew) {
|
||||
ctx.Update(d);
|
||||
} else {
|
||||
ctx.Add(d);
|
||||
}
|
||||
if (!partNew) {
|
||||
ctx.Update(p);
|
||||
} else {
|
||||
ctx.Add(p);
|
||||
}
|
||||
|
||||
ctx.UpdateDeliveryPartModifiers(p, await ctx.DeliveryPartModifiers
|
||||
.Where(m => m.Year == p.Year && m.DId == p.DId && m.DPNr == p.DPNr)
|
||||
.Select(m => m.Modifier)
|
||||
.ToListAsync(), vm.Modifiers);
|
||||
|
||||
if (originalMgNr != null && originalMgNr.Value != d.MgNr) {
|
||||
// update origin (KgNr), if default is selected
|
||||
var newKgNr = (await ctx.Members.FindAsync(d.MgNr))?.DefaultKgNr;
|
||||
foreach (var part in d.Parts.Where(part => part.DPNr != dpnr && part.KgNr == originalMemberKgNr)) {
|
||||
part.KgNr = newKgNr;
|
||||
ctx.Update(part);
|
||||
}
|
||||
}
|
||||
|
||||
await ctx.SaveChangesAsync();
|
||||
} catch (Exception exc) {
|
||||
var str = "Der Eintrag konnte nicht in der Datenbank aktualisiert werden!\n\n" + exc.Message;
|
||||
if (exc.InnerException != null) str += "\n\n" + exc.InnerException.Message;
|
||||
MessageBox.Show(str, "Lieferung aktualisieren", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
public static async Task GenerateDeliveryNote(int year, int did, ExportMode mode) {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
using var ctx = new AppDbContext();
|
||||
var d = (await ctx.Deliveries.FindAsync(year, did))!;
|
||||
using var doc = new DeliveryNote(d, ctx);
|
||||
await Utils.ExportDocument(doc, mode, d.LsNr, (d.Member, $"{DeliveryNote.Name} Nr. {d.LsNr}", $"Im Anhang finden Sie den {DeliveryNote.Name} Nr. {d.LsNr}"));
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
|
||||
public static async Task GenerateDeliveryJournal(this DeliveryAdminViewModel vm, int modeWho, ExportMode exportMode) {
|
||||
using var ctx = new AppDbContext();
|
||||
IQueryable<DeliveryPart> query;
|
||||
List<string> filterNames = [];
|
||||
if (modeWho == 0) {
|
||||
var (f, _, q, _, _) = await vm.GetFilters(ctx);
|
||||
query = q;
|
||||
filterNames.AddRange(f);
|
||||
} else {
|
||||
var date = $"{Utils.Today:yyyy-MM-dd}";
|
||||
query = ctx.DeliveryParts
|
||||
.Where(p => p.Delivery.DateString == date);
|
||||
filterNames.Add($"{Utils.Today:dd.MM.yyyy}");
|
||||
}
|
||||
if (exportMode == ExportMode.Upload && !filterNames.Contains($"Zweigstelle {App.BranchName}")) {
|
||||
query = query.Where(p => p.Delivery.ZwstId == App.ZwstId);
|
||||
filterNames.Add($"Zweigstelle {App.BranchName}");
|
||||
}
|
||||
|
||||
query = query
|
||||
.OrderBy(p => p.Delivery.DateString)
|
||||
.ThenBy(p => p.Delivery.TimeString)
|
||||
.ThenBy(p => p.Delivery.LsNr)
|
||||
.ThenBy(p => p.DPNr);
|
||||
|
||||
if (exportMode == ExportMode.SaveList) {
|
||||
var d = new SaveFileDialog() {
|
||||
FileName = $"{DeliveryJournal.Name}.ods",
|
||||
DefaultExt = "ods",
|
||||
Filter = "OpenDocument Format Spreadsheet (*.ods)|*.ods",
|
||||
Title = $"{DeliveryJournal.Name} speichern unter - Elwig"
|
||||
};
|
||||
if (d.ShowDialog() == true) {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
var data = await DeliveryJournalData.FromQuery(query, filterNames);
|
||||
using var ods = new OdsFile(d.FileName);
|
||||
await ods.AddTable(data);
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
} else if (exportMode == ExportMode.Export) {
|
||||
var d = new SaveFileDialog() {
|
||||
FileName = $"Lieferungen.zip",
|
||||
DefaultExt = "zip",
|
||||
Filter = "ZIP-Datei (*.zip)|*.zip",
|
||||
Title = $"{DeliveryJournal.Name} speichern unter - Elwig"
|
||||
};
|
||||
if (d.ShowDialog() == true) {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
await ElwigData.ExportDeliveries(d.FileName, await query.Select(p => p.Delivery).Distinct().ToListAsync(), filterNames);
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
} else if (exportMode == ExportMode.Upload && App.Config.SyncUrl != null) {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
var filename = $"{DateTime.Now:yyyy-MM-dd_HH-mm-ss}_{App.ZwstId}.zip";
|
||||
var path = Path.Combine(App.TempPath, filename);
|
||||
var list = await query.Select(p => p.Delivery).Distinct().ToListAsync();
|
||||
if (list.Count == 0) {
|
||||
MessageBox.Show("Es wurden keine Lieferungen zum Hochladen ausgewählt!", "Fehler",
|
||||
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
} else {
|
||||
await ElwigData.ExportDeliveries(path, list, filterNames);
|
||||
await Utils.UploadExportData(path, App.Config.SyncUrl, App.Config.SyncUsername, App.Config.SyncPassword);
|
||||
MessageBox.Show($"Lieferungen erfolgreich hochgeladen!", "Lieferungen hochgeladen",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
Mouse.OverrideCursor = null;
|
||||
} else {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
var data = await DeliveryJournalData.FromQuery(query, filterNames);
|
||||
using var doc = new DeliveryJournal(string.Join(" / ", filterNames), data);
|
||||
await Utils.ExportDocument(doc, exportMode);
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task GenerateWineQualityStatistics(this DeliveryAdminViewModel vm, int modeWho, ExportMode exportMode) {
|
||||
using var ctx = new AppDbContext();
|
||||
IQueryable<DeliveryPart> query;
|
||||
List<string> filterNames = [];
|
||||
if (modeWho == 0) {
|
||||
var (f, _, q, _, _) = await vm.GetFilters(ctx);
|
||||
query = q;
|
||||
filterNames.AddRange(f);
|
||||
} else {
|
||||
var date = $"{Utils.Today:yyyy-MM-dd}";
|
||||
query = ctx.DeliveryParts
|
||||
.Where(p => p.Delivery.DateString == date);
|
||||
filterNames.Add($"{Utils.Today:dd.MM.yyyy}");
|
||||
}
|
||||
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
try {
|
||||
var data = await WineQualityStatisticsData.FromQuery(query, App.Client.OrderingMemberList);
|
||||
using var doc = new WineQualityStatistics(string.Join(" / ", filterNames), data);
|
||||
await Utils.ExportDocument(doc, exportMode);
|
||||
} catch (Exception exc) {
|
||||
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
}
|
||||
}
|
171
Elwig/ViewModels/DeliveryAdminViewModel.cs
Normal file
171
Elwig/ViewModels/DeliveryAdminViewModel.cs
Normal file
@ -0,0 +1,171 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Models.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace Elwig.ViewModels {
|
||||
public partial class DeliveryAdminViewModel : ObservableObject {
|
||||
|
||||
public bool IsReceipt = false;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _title = "Lieferungen - Elwig";
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _searchQuery = "";
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ').ToList().FindAll(e => e.Length > 0)];
|
||||
|
||||
public Member? FilterMember { get; set; }
|
||||
public int? FilterMgNr => FilterMember?.MgNr;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _lastScaleError;
|
||||
[ObservableProperty]
|
||||
private string? _manualWeighingReason;
|
||||
[ObservableProperty]
|
||||
private string? _scaleId;
|
||||
[ObservableProperty]
|
||||
private string? _weighingId;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _filterTodayOnly;
|
||||
[ObservableProperty]
|
||||
private bool _filterAllSeasons;
|
||||
[ObservableProperty]
|
||||
private bool _enableAllSeasons;
|
||||
[ObservableProperty]
|
||||
private string? _filterSeasonString;
|
||||
public int? FilterSeason {
|
||||
get => int.TryParse(FilterSeasonString, out var year) ? year : null;
|
||||
set => FilterSeasonString = $"{value}";
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private Delivery? _selectedDelivery;
|
||||
[ObservableProperty]
|
||||
private IEnumerable<Delivery> _deliveries = [];
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _mgNrString;
|
||||
public int? MgNr {
|
||||
get => int.TryParse(MgNrString, out var mgnr) ? mgnr : null;
|
||||
set => MgNrString = $"{value}";
|
||||
}
|
||||
[ObservableProperty]
|
||||
private Member? _member;
|
||||
[ObservableProperty]
|
||||
private IEnumerable<Member> _memberSource = [];
|
||||
[ObservableProperty]
|
||||
private string? _memberAddress;
|
||||
[ObservableProperty]
|
||||
private string? _lsNr;
|
||||
[ObservableProperty]
|
||||
private string? _date;
|
||||
[ObservableProperty]
|
||||
private string? _time;
|
||||
[ObservableProperty]
|
||||
private Branch? _branch;
|
||||
[ObservableProperty]
|
||||
private IEnumerable<Branch> _branchSource = [];
|
||||
[ObservableProperty]
|
||||
private string? _comment;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _sortId;
|
||||
[ObservableProperty]
|
||||
private WineVar? _wineVar;
|
||||
[ObservableProperty]
|
||||
private IEnumerable<WineVar> _wineVarSource = [];
|
||||
[ObservableProperty]
|
||||
private object? _wineAttrObj;
|
||||
public WineAttr? WineAttr {
|
||||
get => WineAttrObj as WineAttr;
|
||||
set => WineAttrObj = value ?? WineAttrSource.FirstOrDefault();
|
||||
}
|
||||
[ObservableProperty]
|
||||
private IEnumerable<object> _wineAttrSource = [];
|
||||
[ObservableProperty]
|
||||
private object? _wineCultObj;
|
||||
public WineCult? WineCult {
|
||||
get => WineCultObj as WineCult;
|
||||
set => WineCultObj = value ?? WineCultSource.FirstOrDefault();
|
||||
}
|
||||
[ObservableProperty]
|
||||
private IEnumerable<object> _wineCultSource = [];
|
||||
[ObservableProperty]
|
||||
private string? _gradationOeString;
|
||||
public double? GradationOe => double.TryParse(GradationOeString, out var oe) ? oe : null;
|
||||
[ObservableProperty]
|
||||
private string? _gradationKmwString;
|
||||
public double? GradationKmw => double.TryParse(GradationKmwString, out var kmw) ? kmw : null;
|
||||
[ObservableProperty]
|
||||
private WineQualLevel? _wineQualityLevel;
|
||||
[ObservableProperty]
|
||||
private IEnumerable<WineQualLevel> _wineQualityLevelSource = [];
|
||||
[ObservableProperty]
|
||||
private bool _abgewertet;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? _weightString;
|
||||
public int? Weight {
|
||||
get => int.TryParse(WeightString?.Replace(Utils.GroupSeparator, ""), out var w) ? w : null;
|
||||
set => WeightString = $"{value:N0}";
|
||||
}
|
||||
[ObservableProperty]
|
||||
private bool _isManualWeighing;
|
||||
[ObservableProperty]
|
||||
private bool _isNetWeight;
|
||||
|
||||
[ObservableProperty]
|
||||
private WineOrigin? _wineOrigin;
|
||||
[ObservableProperty]
|
||||
private IEnumerable<WineOrigin> _wineOriginSource = [];
|
||||
[ObservableProperty]
|
||||
private object? _wineKgObj;
|
||||
public AT_Kg? WineKg {
|
||||
get => WineKgObj as AT_Kg;
|
||||
set => WineKgObj = value ?? WineKgSource.FirstOrDefault();
|
||||
}
|
||||
[ObservableProperty]
|
||||
private IEnumerable<object> _wineKgSource = [];
|
||||
[ObservableProperty]
|
||||
private object? _wineRdObj;
|
||||
public WbRd? WineRd {
|
||||
get => WineRdObj as WbRd;
|
||||
set => WineRdObj = value ?? WineRdSource.FirstOrDefault();
|
||||
}
|
||||
[ObservableProperty]
|
||||
private IEnumerable<object> _wineRdSource = [];
|
||||
[ObservableProperty]
|
||||
private bool? _isGebunden;
|
||||
|
||||
public ObservableCollection<Modifier> Modifiers { get; set; } = [];
|
||||
[ObservableProperty]
|
||||
private IEnumerable<Modifier> _modifiersSource = [];
|
||||
[ObservableProperty]
|
||||
private string? _partComment;
|
||||
[ObservableProperty]
|
||||
private string? _temperatureString;
|
||||
public double? Temperature => double.TryParse(TemperatureString, out var t) ? t : null;
|
||||
[ObservableProperty]
|
||||
private string? _acidString;
|
||||
public double? Acid => double.TryParse(AcidString, out var a) ? a : null;
|
||||
[ObservableProperty]
|
||||
private bool _isLesewagen;
|
||||
[ObservableProperty]
|
||||
private bool? _isHandPicked;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _statusMembers = "Mitglieder: -";
|
||||
[ObservableProperty]
|
||||
private string _statusDeliveries = "Lieferungen: -";
|
||||
[ObservableProperty]
|
||||
private string _statusVarieties = "Sorten: -";
|
||||
[ObservableProperty]
|
||||
private string _statusWeight = "Gewicht: -";
|
||||
[ObservableProperty]
|
||||
private string _statusGradation = "Gradation: -";
|
||||
}
|
||||
}
|
@ -4,9 +4,13 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Elwig.Windows"
|
||||
xmlns:vm="clr-namespace:Elwig.ViewModels"
|
||||
xmlns:ctrl="clr-namespace:Elwig.Controls"
|
||||
Title="Lieferungen - Elwig" Height="720" Width="1100" MinHeight="720" MinWidth="1000"
|
||||
Title="{Binding Title}" Height="720" Width="1100" MinHeight="720" MinWidth="1000"
|
||||
Loaded="Window_Loaded">
|
||||
<Window.DataContext>
|
||||
<vm:DeliveryAdminViewModel/>
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
@ -148,7 +152,8 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="SearchInput" Grid.ColumnSpan="3" Margin="5,10,161,0" IsReadOnly="False"
|
||||
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.ColumnSpan="3" Margin="5,10,156,0" IsReadOnly="False"
|
||||
TextChanged="SearchInput_TextChanged">
|
||||
<TextBox.ToolTip>
|
||||
<TextBlock>
|
||||
@ -176,13 +181,14 @@
|
||||
</TextBlock>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<ctrl:IntegerUpDown x:Name="SeasonInput" Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||
Margin="0,10,100,0" VerticalAlignment="Top" HorizontalAlignment="Right" Text="2020"
|
||||
<ctrl:IntegerUpDown x:Name="SeasonInput" Text="{Binding FilterSeasonString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||
Margin="0,10,95,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||
TextChanged="SeasonInput_TextChanged"/>
|
||||
<CheckBox x:Name="TodayOnlyInput" Content="Nur heute"
|
||||
<CheckBox x:Name="TodayOnlyInput" Content="Nur heute" IsChecked="{Binding FilterTodayOnly, Mode=TwoWay}"
|
||||
HorizontalAlignment="Right" Margin="0,7,18,0" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
Checked="TodayOnlyInput_Changed" Unchecked="TodayOnlyInput_Changed"/>
|
||||
<CheckBox x:Name="AllSeasonsInput" Content="Jede Saison" IsEnabled="False"
|
||||
<CheckBox x:Name="AllSeasonsInput" Content="Jede Saison" IsEnabled="{Binding EnableAllSeasons, Mode=TwoWay}" IsChecked="{Binding FilterAllSeasons, Mode=TwoWay}"
|
||||
HorizontalAlignment="Right" Margin="0,24,10,0" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
Checked="AllSeasonsInput_Changed" Unchecked="AllSeasonsInput_Changed"/>
|
||||
<DataGrid x:Name="DeliveryList" AutoGenerateColumns="False" HeadersVisibility="Column" IsReadOnly="True" GridLinesVisibility="None" SelectionMode="Single"
|
||||
@ -325,9 +331,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Mitglied:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="MgNrInput" Width="48" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
<TextBox x:Name="MgNrInput" Text="{Binding MgNrString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="48" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" HorizontalAlignment="Left" TextAlignment="Right"
|
||||
TextChanged="MgNrInput_TextChanged" LostFocus="MgNrInput_LostFocus" KeyUp="Input_KeyUp"/>
|
||||
<ComboBox x:Name="MemberInput" Grid.Column="1" Margin="53,10,40,10" IsEditable="True"
|
||||
<ComboBox x:Name="MemberInput" SelectedItem="{Binding Member, Mode=TwoWay}" ItemsSource="{Binding MemberSource, Mode=TwoWay}"
|
||||
Grid.Column="1" Margin="53,10,40,10" IsEditable="True"
|
||||
ItemTemplate="{StaticResource MemberAdminNameTemplate}" TextSearch.TextPath="AdministrativeName"
|
||||
SelectionChanged="MemberInput_SelectionChanged" KeyUp="Input_KeyUp"/>
|
||||
<Button x:Name="MemberReferenceButton" Grid.Column="1" Height="25" Width="25" FontFamily="Segoe MDL2 Assets" Content="" Padding="0,0,0,0"
|
||||
@ -335,7 +343,8 @@
|
||||
Click="MemberReferenceButton_Click"/>
|
||||
|
||||
<Label Content="Wohnort:" Margin="10,38,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="MemberAddressField" Grid.Column="1" Margin="0,40,10,10" FontSize="12" Height="22"
|
||||
<TextBox x:Name="MemberAddressField" Text="{Binding MemberAddress}"
|
||||
Grid.Column="1" Margin="0,40,10,10" FontSize="12" Height="22"
|
||||
IsReadOnly="True" IsTabStop="False"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@ -348,26 +357,31 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="LieferscheinNr.:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="LsNrInput" Width="126" Grid.Column="1" HorizontalAlignment="Left" Margin="0,10,0,0"
|
||||
<TextBox x:Name="LsNrInput" Text="{Binding LsNr, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="126" Grid.Column="1" HorizontalAlignment="Left" Margin="0,10,0,0"
|
||||
IsReadOnly="True" IsTabStop="False"
|
||||
TextChanged="TextBox_TextChanged"/>
|
||||
|
||||
<Label Content="Datum/Uhrzeit:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="DateInput" Width="77" Grid.Column="1" HorizontalAlignment="Left" Margin="0,40,0,0"
|
||||
<TextBox x:Name="DateInput" Text="{Binding Date, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="77" Grid.Column="1" HorizontalAlignment="Left" Margin="0,40,0,0"
|
||||
IsReadOnly="True"
|
||||
TextChanged="DateInput_TextChanged" LostFocus="DateInput_LostFocus"/>
|
||||
<TextBox x:Name="TimeInput" Width="44" Grid.Column="1" HorizontalAlignment="Left" Margin="82,40,0,0"
|
||||
<TextBox x:Name="TimeInput" Text="{Binding Time, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="44" Grid.Column="1" HorizontalAlignment="Left" Margin="82,40,0,0"
|
||||
IsReadOnly="True"
|
||||
TextChanged="TimeInput_TextChanged" LostFocus="TimeInput_LostFocus"/>
|
||||
|
||||
<Label Content="Zweigstelle:" Margin="10,70,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="BranchInput" Width="126" Margin="0,70,10,0" Grid.Column="1" HorizontalAlignment="Left"
|
||||
<ComboBox x:Name="BranchInput" SelectedItem="{Binding Branch, Mode=TwoWay}" ItemsSource="{Binding BranchSource, Mode=TwoWay}"
|
||||
Width="126" Margin="0,70,10,0" Grid.Column="1" HorizontalAlignment="Left"
|
||||
IsEnabled="False"
|
||||
SelectionChanged="BranchInput_SelectionChanged"
|
||||
DisplayMemberPath="Name" TextSearch.TextPath="Name"/>
|
||||
|
||||
<Label Content="Anmerkung:" Margin="10,100,0,10"/>
|
||||
<TextBox x:Name="CommentInput" Grid.Column="1" Margin="0,100,10,10"
|
||||
<TextBox x:Name="CommentInput" Text="{Binding Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="1" Margin="0,100,10,10"
|
||||
TextChanged="TextBox_TextChanged"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@ -381,9 +395,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Sorte:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<TextBox x:Name="SortIdInput" Width="36" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" HorizontalAlignment="Left"
|
||||
<TextBox x:Name="SortIdInput" Text="{Binding SortId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="36" Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" HorizontalAlignment="Left"
|
||||
TextChanged="SortIdInput_TextChanged" LostFocus="SortIdInput_LostFocus" KeyUp="Input_KeyUp"/>
|
||||
<ComboBox x:Name="WineVarietyInput" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="41,10,10,10"
|
||||
<ComboBox x:Name="WineVarietyInput" SelectedItem="{Binding WineVar, Mode=TwoWay}" ItemsSource="{Binding WineVarSource, Mode=TwoWay}"
|
||||
Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="41,10,10,10"
|
||||
TextSearch.TextPath="Name"
|
||||
SelectionChanged="WineVarietyInput_SelectionChanged" KeyUp="Input_KeyUp">
|
||||
<ComboBox.ItemTemplateSelector>
|
||||
@ -392,10 +408,12 @@
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="Attr./Bewirt.:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<ComboBox x:Name="AttributeInput" Grid.Row="1" Grid.Column="1" Margin="0,40,5,10"
|
||||
<ComboBox x:Name="AttributeInput" SelectedItem="{Binding WineAttrObj, Mode=TwoWay}" ItemsSource="{Binding WineAttrSource, Mode=TwoWay}"
|
||||
Grid.Row="1" Grid.Column="1" Margin="0,40,5,10"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionChanged="AttributeInput_SelectionChanged" KeyUp="Input_KeyUp"/>
|
||||
<ComboBox x:Name="CultivationInput" Grid.Row="1" Grid.Column="2" Margin="0,40,10,10"
|
||||
<ComboBox x:Name="CultivationInput" SelectedItem="{Binding WineCultObj, Mode=TwoWay}" ItemsSource="{Binding WineCultSource, Mode=TwoWay}"
|
||||
Grid.Row="1" Grid.Column="2" Margin="0,40,10,10"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionChanged="CultivationInput_SelectionChanged" KeyUp="Input_KeyUp"/>
|
||||
</Grid>
|
||||
@ -408,15 +426,18 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Gradation:" Margin="10,10,10,10"/>
|
||||
<ctrl:UnitTextBox x:Name="GradationOeInput" Unit="°Oe" TextChanged="GradationOeInput_TextChanged" KeyUp="Input_KeyUp"
|
||||
<ctrl:UnitTextBox x:Name="GradationOeInput" Unit="°Oe" Text="{Binding GradationOeString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextChanged="GradationOeInput_TextChanged" KeyUp="Input_KeyUp"
|
||||
Grid.Column="1" Width="54" Margin="0,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
|
||||
<Label Content="=" Margin="60,10,10,10" Grid.Column="1"/>
|
||||
<ctrl:UnitTextBox x:Name="GradationKmwInput" Unit="°KMW" TextChanged="GradationKmwInput_TextChanged" KeyUp="Input_KeyUp"
|
||||
<ctrl:UnitTextBox x:Name="GradationKmwInput" Unit="°KMW" Text="{Binding GradationKmwString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextChanged="GradationKmwInput_TextChanged" KeyUp="Input_KeyUp"
|
||||
Grid.Column="1" Width="68" Margin="78,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
|
||||
<Label Content="Qualitätsstufe:" Margin="10,40,10,10"/>
|
||||
<ComboBox x:Name="WineQualityLevelInput" Width="146" Margin="0,40,10,10" Grid.Column="1" HorizontalAlignment="Left"
|
||||
<ComboBox x:Name="WineQualityLevelInput" SelectedItem="{Binding WineQualityLevel, Mode=TwoWay}" ItemsSource="{Binding WineQualityLevelSource, Mode=TwoWay}"
|
||||
Width="146" Margin="0,40,10,10" Grid.Column="1" HorizontalAlignment="Left"
|
||||
TextSearch.TextPath="Name"
|
||||
SelectionChanged="WineQualityLevelInput_SelectionChanged" KeyUp="Input_KeyUp">
|
||||
<ComboBox.ItemTemplateSelector>
|
||||
@ -424,7 +445,8 @@
|
||||
</ComboBox.ItemTemplateSelector>
|
||||
</ComboBox>
|
||||
|
||||
<CheckBox x:Name="AbgewertetInput" Content="Abgewertet" IsEnabled="False"
|
||||
<CheckBox x:Name="AbgewertetInput" IsChecked="{Binding Abgewertet, Mode=TwoWay}"
|
||||
Content="Abgewertet" IsEnabled="False"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,75,10,10" Grid.Column="0" Grid.ColumnSpan="2"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@ -437,14 +459,17 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Gewicht:" Margin="10,10,10,10"/>
|
||||
<ctrl:UnitTextBox x:Name="WeightInput" Unit="kg" TextChanged="WeightInput_TextChanged"
|
||||
<ctrl:UnitTextBox x:Name="WeightInput" Unit="kg" Text="{Binding WeightString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextChanged="WeightInput_TextChanged"
|
||||
Grid.Column="1" Width="70" Margin="0,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
|
||||
<CheckBox x:Name="ManualWeighingInput" Content="Handwiegung" IsEnabled="False"
|
||||
<CheckBox x:Name="ManualWeighingInput" IsChecked="{Binding IsManualWeighing, Mode=TwoWay}"
|
||||
Content="Handwiegung" IsEnabled="False"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,45,10,10" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"/>
|
||||
|
||||
<CheckBox x:Name="GerebeltGewogenInput" Content="Netto (gerebelt gewogen)"
|
||||
<CheckBox x:Name="GerebeltGewogenInput" IsChecked="{Binding IsNetWeight, Mode=TwoWay}"
|
||||
Content="Netto (gerebelt gewogen)"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,75,10,10" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
Checked="GerebeltGewogenInput_Changed" Unchecked="GerebeltGewogenInput_Changed"/>
|
||||
|
||||
@ -475,28 +500,32 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Zu-/Abschläge:" Margin="10,10,0,10"/>
|
||||
<ctrl:CheckComboBox x:Name="ModifiersInput" Margin="0,10,10,10" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
<ctrl:CheckComboBox x:Name="ModifiersInput" SelectedItems="{Binding Modifiers}" ItemsSource="{Binding ModifiersSource, Mode=TwoWay}"
|
||||
Margin="0,10,10,10" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
ItemTemplate="{StaticResource ModifierTemplate}" Delimiter=", " AllItemsSelectedContent="Alle"
|
||||
SelectionChanged="ModifiersInput_SelectionChanged"/>
|
||||
|
||||
<Label Content="Anmerkung:" Margin="10,40,0,10"/>
|
||||
<TextBox x:Name="PartCommentInput" Grid.Column="1" Margin="0,40,10,10" Grid.ColumnSpan="2"
|
||||
<TextBox x:Name="PartCommentInput" Text="{Binding PartComment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="1" Margin="0,40,10,10" Grid.ColumnSpan="2"
|
||||
TextChanged="TextBox_TextChanged"/>
|
||||
|
||||
<Label Content="Temperatur:" Margin="10,70,0,10"/>
|
||||
<ctrl:UnitTextBox x:Name="TemperatureInput" Unit="°C"
|
||||
<ctrl:UnitTextBox x:Name="TemperatureInput" Unit="°C" Text="{Binding TemperatureString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextChanged="TemperatureAcidInput_TextChanged" LostFocus="TemperatureAcidInput_LostFocus"
|
||||
Grid.Column="1" Margin="0,70,10,10" VerticalAlignment="Top"/>
|
||||
|
||||
<Label Content="Säure:" Margin="10,100,0,10"/>
|
||||
<ctrl:UnitTextBox x:Name="AcidInput" Unit="g/l"
|
||||
<ctrl:UnitTextBox x:Name="AcidInput" Unit="g/l" Text="{Binding AcidString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextChanged="TemperatureAcidInput_TextChanged" LostFocus="TemperatureAcidInput_LostFocus"
|
||||
Grid.Column="1" Margin="0,100,10,10" VerticalAlignment="Top"/>
|
||||
|
||||
<CheckBox x:Name="LesewagenInput" Content="Lesewagen" Margin="10,75,0,0" Grid.Column="2"
|
||||
<CheckBox x:Name="LesewagenInput" IsChecked="{Binding IsLesewagen, Mode=TwoWay}"
|
||||
Content="Lesewagen" Margin="10,75,0,0" Grid.Column="2"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="LesewagenInput_Changed" Unchecked="LesewagenInput_Changed" Click="HandPickedInput_Changed"/>
|
||||
<CheckBox x:Name="HandPickedInput" Content="Handlese" Margin="10,105,0,0" Grid.Column="2" IsThreeState="True"
|
||||
<CheckBox x:Name="HandPickedInput" IsChecked="{Binding IsHandPicked, Mode=TwoWay}"
|
||||
Content="Handlese" Margin="10,105,0,0" Grid.Column="2" IsThreeState="True"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="HandPickedInput_Changed" Unchecked="HandPickedInput_Changed" Click="HandPickedInput_Changed"/>
|
||||
</Grid>
|
||||
@ -543,7 +572,8 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Content="Weinbaugebiet:" Margin="10,10,0,10" Grid.Column="0"/>
|
||||
<ComboBox x:Name="WineOriginInput" Margin="0,10,10,10" Grid.Column="1"
|
||||
<ComboBox x:Name="WineOriginInput" SelectedItem="{Binding WineOrigin, Mode=TwoWay}" ItemsSource="{Binding WineOriginSource, Mode=TwoWay}"
|
||||
Margin="0,10,10,10" Grid.Column="1"
|
||||
TextSearch.TextPath="Name">
|
||||
<ComboBox.ItemTemplateSelector>
|
||||
<ctrl:WineOriginTemplateSelector/>
|
||||
@ -551,15 +581,18 @@
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="Weinbau-KG:" Margin="10,40,0,10" Grid.Column="0"/>
|
||||
<ComboBox x:Name="WineKgInput" Margin="0,40,10,10" Grid.Column="1"
|
||||
<ComboBox x:Name="WineKgInput" SelectedItem="{Binding WineKgObj, Mode=TwoWay}" ItemsSource="{Binding WineKgSource, Mode=TwoWay}"
|
||||
Margin="0,40,10,10" Grid.Column="1"
|
||||
DisplayMemberPath="Name"
|
||||
SelectionChanged="WineKgInput_SelectionChanged"/>
|
||||
|
||||
<Label Content="Ried:" Margin="10,70,0,10" Grid.Column="0"/>
|
||||
<ComboBox x:Name="WineRdInput" Margin="0,70,10,10" Grid.Column="1"
|
||||
<ComboBox x:Name="WineRdInput" SelectedItem="{Binding WineRdObj, Mode=TwoWay}" ItemsSource="{Binding WineRdSource, Mode=TwoWay}"
|
||||
Margin="0,70,10,10" Grid.Column="1"
|
||||
DisplayMemberPath="Name"/>
|
||||
|
||||
<CheckBox x:Name="GebundenInput" Content="Gebunden" Margin="10,105,0,0" Grid.Column="0" Grid.ColumnSpan="2" IsThreeState="True"
|
||||
<CheckBox x:Name="GebundenInput" IsChecked="{Binding IsGebunden, Mode=TwoWay}"
|
||||
Content="Gebunden" Margin="10,105,0,0" Grid.Column="0" Grid.ColumnSpan="2" IsThreeState="True"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"/>
|
||||
</Grid>
|
||||
@ -585,19 +618,19 @@
|
||||
</ItemsPanelTemplate>
|
||||
</StatusBar.ItemsPanel>
|
||||
<StatusBarItem>
|
||||
<TextBlock x:Name="StatusMembers" Text="Mitglieder: -"/>
|
||||
<TextBlock x:Name="StatusMembers" Text="{Binding StatusMembers}" ToolTip="{Binding StatusMembers}"/>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="1"/>
|
||||
<StatusBarItem Grid.Column="2">
|
||||
<TextBlock x:Name="StatusDeliveries" Text="Lieferungen: -"/>
|
||||
<TextBlock x:Name="StatusDeliveries" Text="{Binding StatusDeliveries}"/>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="3"/>
|
||||
<StatusBarItem Grid.Column="4">
|
||||
<TextBlock x:Name="StatusVarieties" Text="Sorten: -"/>
|
||||
<TextBlock x:Name="StatusVarieties" Text="{Binding StatusVarieties}" ToolTip="{Binding StatusVarieties}"/>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="5"/>
|
||||
<StatusBarItem Grid.Column="6">
|
||||
<TextBlock x:Name="StatusWeight" Text="Gewicht: -">
|
||||
<TextBlock x:Name="StatusWeight" Text="{Binding StatusWeight}">
|
||||
<TextBlock.ToolTip>
|
||||
<Grid x:Name="StatusWeightToolTip">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -613,7 +646,7 @@
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="7"/>
|
||||
<StatusBarItem Grid.Column="8">
|
||||
<TextBlock x:Name="StatusGradation" Text="Gradation: -">
|
||||
<TextBlock x:Name="StatusGradation" Text="{Binding StatusGradation}">
|
||||
<TextBlock.ToolTip>
|
||||
<Grid x:Name="StatusGradationToolTip">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user