From 0440c722a221b8068bbf388c1c0c51f0faff0451 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 14:17:46 -0300 Subject: some dlls --- .../Gestor.Model.Domain.Seguros/Adiantamento.cs | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs (limited to 'Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs') diff --git a/Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs b/Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs new file mode 100644 index 0000000..74375c0 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using Gestor.Model.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Validation; + +namespace Gestor.Model.Domain.Seguros; + +public class Adiantamento : DomainBase +{ + private string _historico; + + public Vendedor Vendedor { get; set; } + + public TipoPagamento? TipoPagamento { get; set; } + + public string Historico + { + get + { + return _historico?.ToUpper(); + } + set + { + _historico = value; + } + } + + public DateTime? Data { get; set; } + + public decimal Valor { get; set; } + + public bool Pago { get; set; } + + public DateTime? Pagamento { get; set; } + + public List Log() + { + List list = new List(); + TupleList tupleList = new TupleList(); + ObservableCollection> obj = new ObservableCollection> + { + new Tuple("HISTÓRICO", string.IsNullOrWhiteSpace(Historico) ? "" : Historico, ""), + new Tuple("DATA DO ADIANTAMENTO", (!Data.HasValue) ? "" : Data?.ToShortDateString(), ""), + new Tuple("VALOR DO ADIANTAMENTO", Valor.ToString("c2"), "") + }; + object item; + if (TipoPagamento.HasValue) + { + TipoPagamento? tipoPagamento = TipoPagamento; + item = (tipoPagamento.HasValue ? tipoPagamento.GetValueOrDefault().GetDescription() : null); + } + else + { + item = ""; + } + obj.Add(new Tuple("TIPO DO PAGAMENTO", (string)item, "")); + obj.Add(new Tuple("PAGO", Pago ? "SIM" : "NÃO", "")); + obj.Add(new Tuple("DATA DO PAGAMENTO", (!Pagamento.HasValue) ? "" : Pagamento?.ToShortDateString(), "")); + tupleList.Tuples = obj; + list.Add(tupleList); + return list; + } +} -- cgit v1.2.3