Add clanker code
This commit is contained in:
26
dealer/Owner.cs
Normal file
26
dealer/Owner.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace dealer
|
||||
{
|
||||
public class Owner
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string? Jmeno { get; set; }
|
||||
public string? Prijmeni { get; set; }
|
||||
public string? Adresa { get; set; }
|
||||
public string? Telefon { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string CeleJmeno => $"{Jmeno} {Prijmeni}".Trim();
|
||||
|
||||
public string DisplayText => string.IsNullOrEmpty(CeleJmeno)
|
||||
? Email ?? Telefon ?? "Neznamy vlastnik"
|
||||
: CeleJmeno;
|
||||
|
||||
public override string ToString() => DisplayText;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user