Files
IntegryControlPanel_Blazor/IntegryControlPanel/IntegryControlPanel.Client/Models/CustomerWithAnagInfoDto.cs

23 lines
906 B
C#

namespace IntegryControlPanel.Client.Models;
/// <summary>
/// DTO per il client che rappresenta un Customer con le informazioni anagrafiche della vista vw_customer_anag_info
/// </summary>
public class CustomerWithAnagInfoDto
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public string Slug { get; set; } = null!;
public bool? Active { get; set; }
public string? PartitaIva { get; set; }
/// <summary>
/// Nome da visualizzare che considera la ragione sociale dall'anagrafica esterna (rag_soc)
/// </summary>
public string DisplayName { get; set; } = null!;
/// <summary>
/// Indica se il DisplayName è diverso dal Name (ovvero se c'è una ragione sociale dall'anagrafica esterna)
/// </summary>
public bool HasExternalRagSoc => !string.Equals(DisplayName?.Trim(), Name?.Trim(), StringComparison.OrdinalIgnoreCase);
}