[chore:] added IsGermany()-function
This commit is contained in:
@@ -180,6 +180,17 @@ public class KasPerson
|
|||||||
|
|
||||||
public string used_plz { 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)
|
public static void SetUsedPLZ(int id, string plz)
|
||||||
{
|
{
|
||||||
foreach (var set in Settings._instance.addressSets.addresses)
|
foreach (var set in Settings._instance.addressSets.addresses)
|
||||||
|
|||||||
Reference in New Issue
Block a user