Add DeliveryAdminWindow

This commit is contained in:
2023-05-22 21:32:06 +02:00
parent 3bf7d65dea
commit dc236bab62
13 changed files with 534 additions and 35 deletions

View File

@ -44,11 +44,14 @@ namespace Elwig.Models {
public string ShortName => GivenName + " " + FamilyName;
public string AdministrativeName =>
FamilyName.ToUpper() + " " +
public string AdministrativeName => AdministrativeName1 + " " + AdministrativeName2;
public string AdministrativeName1 => FamilyName.ToUpper();
public string AdministrativeName2 =>
(Prefix != null ? Prefix + " " : "") +
GivenName +
(MiddleName != null ? " " + MiddleName: "") +
(MiddleName != null ? " " + MiddleName : "") +
(Suffix != null ? " " + Suffix : "");
[Column("birthday")]
@ -174,6 +177,8 @@ namespace Elwig.Models {
[InverseProperty("Member")]
public virtual ISet<Delivery> Deliveries { get; private set; }
public string FullAddress => $"{Address}, {PostalDest.AtPlz.Plz} {PostalDest.AtPlz.Ort.Name}";
public int SearchScore(IEnumerable<string> keywords) {
keywords = keywords.Where(s => s.Length >= 2 || (s.Length > 0 && s.All(c => char.IsAsciiDigit(c))));
if (!keywords.Any())