Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| acaf0856ed | |||
| 2da822e0e7 |
@@ -179,7 +179,18 @@ public class KasPerson
|
||||
public string funktionad { get; set; }
|
||||
|
||||
public string used_plz { get; set; } = "";
|
||||
|
||||
|
||||
public bool IsGermany()
|
||||
{
|
||||
var trimmedLand = (land ?? "").Trim();
|
||||
var trimmedLowerLand = trimmedLand.ToLower();
|
||||
var isGermany = trimmedLowerLand == "germany" || trimmedLowerLand == "ger" ||
|
||||
trimmedLowerLand == "" || trimmedLowerLand == "de" ||
|
||||
trimmedLowerLand == "deutschland";
|
||||
|
||||
return isGermany;
|
||||
}
|
||||
|
||||
public static void SetUsedPLZ(int id, string plz)
|
||||
{
|
||||
foreach (var set in Settings._instance.addressSets.addresses)
|
||||
|
||||
+1
-1
@@ -604,7 +604,7 @@ public class PdfBuilder
|
||||
|
||||
List<IGrouping<string, KasPerson>> sorted_list = list.KasPersons
|
||||
.Where(x => !string.IsNullOrEmpty(x?.used_plz) &&
|
||||
x.used_plz.Length >= stpoint)
|
||||
x.used_plz.Length >= stpoint && x.IsGermany())
|
||||
.OrderBy(x => x.used_plz)
|
||||
.GroupBy(x => x.used_plz.Substring(0, stpoint))
|
||||
.ToList();
|
||||
|
||||
Reference in New Issue
Block a user