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.Ferramentas/LogEmail.cs | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Gestor.Model/Gestor.Model.Domain.Ferramentas/LogEmail.cs (limited to 'Gestor.Model/Gestor.Model.Domain.Ferramentas/LogEmail.cs') diff --git a/Gestor.Model/Gestor.Model.Domain.Ferramentas/LogEmail.cs b/Gestor.Model/Gestor.Model.Domain.Ferramentas/LogEmail.cs new file mode 100644 index 0000000..b713416 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Domain.Ferramentas/LogEmail.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text.RegularExpressions; +using Gestor.Model.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Validation; + +namespace Gestor.Model.Domain.Ferramentas; + +public class LogEmail : DomainBase +{ + public Credencial Credencial { get; set; } + + public TipoTela Tela { get; set; } + + public Relatorio Relatorio { get; set; } + + public long EntityId { get; set; } + + public string Assunto { get; set; } + + public string Corpo { get; set; } + + public string Destinatarios { get; set; } + + public string Cco { get; set; } + + public string Anexos { get; set; } + + public Usuario Usuario { get; set; } + + public DateTime Data { get; set; } + + public string Versao { get; set; } + + public string NomeMaquina { get; set; } + + public string UsuarioMaquina { get; set; } + + public string Ip { get; set; } + + public List CriarLogEmail() + { + Corpo = new Regex(".*<\\/title>").Replace(Corpo, "").Trim(); + Corpo = new Regex("(<[^>]*>)|(p\\s?{[^}]*})|(\\r)|(\\n)").Replace(Corpo, "").Trim(); + return new List<TupleList> + { + new TupleList + { + Tuples = new ObservableCollection<Tuple<string, string, string>> + { + new Tuple<string, string, string>("ASSUNTO", string.IsNullOrWhiteSpace(Assunto) ? "" : Assunto, ""), + new Tuple<string, string, string>("CORPO", string.IsNullOrWhiteSpace(Corpo) ? "" : Corpo, ""), + new Tuple<string, string, string>("E-MAIL DE ENVIO", string.IsNullOrWhiteSpace(Credencial?.Email) ? "" : Credencial?.Email, ""), + new Tuple<string, string, string>("DESTINATÁRIOS", string.IsNullOrWhiteSpace(Destinatarios) ? "" : Destinatarios, ""), + new Tuple<string, string, string>("ANEXOS", string.IsNullOrWhiteSpace(Anexos) ? "" : Anexos, ""), + new Tuple<string, string, string>("CCO", string.IsNullOrWhiteSpace(Cco) ? "" : Cco, ""), + new Tuple<string, string, string>("RELATORIO", string.IsNullOrWhiteSpace(Relatorio.GetDescription()) ? "" : Relatorio.GetDescription(), "") + } + } + }; + } +} -- cgit v1.2.3