diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 17:17:46 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 17:17:46 +0000 |
| commit | 0440c722a221b8068bbf388c1c0c51f0faff0451 (patch) | |
| tree | 169cbf90c50ff7961db82ecb606c50c2a45a1688 /Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs | |
| parent | 225aa1499e37faf9d38257caabbadc68d78b427e (diff) | |
| download | gestor-master.tar.gz gestor-master.zip | |
Diffstat (limited to 'Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs')
| -rw-r--r-- | Gestor.Model/Gestor.Model.Domain.Seguros/Adiantamento.cs | 65 |
1 files changed, 65 insertions, 0 deletions
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<TupleList> Log() + { + List<TupleList> list = new List<TupleList>(); + TupleList tupleList = new TupleList(); + ObservableCollection<Tuple<string, string, string>> obj = new ObservableCollection<Tuple<string, string, string>> + { + new Tuple<string, string, string>("HISTÓRICO", string.IsNullOrWhiteSpace(Historico) ? "" : Historico, ""), + new Tuple<string, string, string>("DATA DO ADIANTAMENTO", (!Data.HasValue) ? "" : Data?.ToShortDateString(), ""), + new Tuple<string, string, string>("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<string, string, string>("TIPO DO PAGAMENTO", (string)item, "")); + obj.Add(new Tuple<string, string, string>("PAGO", Pago ? "SIM" : "NÃO", "")); + obj.Add(new Tuple<string, string, string>("DATA DO PAGAMENTO", (!Pagamento.HasValue) ? "" : Pagamento?.ToShortDateString(), "")); + tupleList.Tuples = obj; + list.Add(tupleList); + return list; + } +} |