DeliveryAdminWindow: Improve filters even more

This commit is contained in:
2024-03-26 17:32:05 +01:00
parent b31b5f6164
commit cf2ec3bdc4

View File

@ -406,17 +406,17 @@ namespace Elwig.Windows {
filter.RemoveAt(i--); filter.RemoveAt(i--);
filterNames.Add("gebunden"); filterNames.Add("gebunden");
} else if (e.Length >= 4 && e.Length <= 9 && "!gebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) { } else if (e.Length >= 4 && e.Length <= 9 && "!gebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
prd = prd.And(p => p.IsGebunden == false); prd = prd.And(p => p.IsGebunden != true);
filter.RemoveAt(i--); filter.RemoveAt(i--);
filterNames.Add("ungebunden"); filterNames.Add("nicht gebunden");
} else if (e.Length >= 5 && e.Length <= 10 && "ungebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) { } else if (e.Length >= 5 && e.Length <= 10 && "ungebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
prd = prd.And(p => p.IsGebunden == false); prd = prd.And(p => p.IsGebunden == false);
filter.RemoveAt(i--); filter.RemoveAt(i--);
filterNames.Add("ungebunden"); filterNames.Add("ungebunden");
} else if (e.Length >= 6 && e.Length <= 11 && "!ungebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) { } else if (e.Length >= 6 && e.Length <= 11 && "!ungebunden".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
prd = prd.And(p => p.IsGebunden == true); prd = prd.And(p => p.IsGebunden != false);
filter.RemoveAt(i--); filter.RemoveAt(i--);
filterNames.Add("gebunden"); filterNames.Add("nicht ungebunden");
} else if (e.Length >= 5 && e.Length <= 8 && "handlese".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) { } else if (e.Length >= 5 && e.Length <= 8 && "handlese".StartsWith(e, StringComparison.CurrentCultureIgnoreCase)) {
prd = prd.And(p => p.IsHandPicked == true); prd = prd.And(p => p.IsHandPicked == true);
filter.RemoveAt(i--); filter.RemoveAt(i--);
@ -441,6 +441,14 @@ namespace Elwig.Windows {
prd = prd.And(p => p.IsNetWeight == true); prd = prd.And(p => p.IsNetWeight == true);
filter.RemoveAt(i--); filter.RemoveAt(i--);
filterNames.Add("netto Wiegung"); 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())) { } else if (e.Length == 2 && var.ContainsKey(e.ToUpper())) {
filterVar.Add(e.ToUpper()); filterVar.Add(e.ToUpper());
filter.RemoveAt(i--); filter.RemoveAt(i--);