diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
| commit | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch) | |
| tree | e1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Model/Model.Domain.Ferramentas/LogEmail.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Codemerx/Gestor.Model/Model.Domain.Ferramentas/LogEmail.cs')
| -rw-r--r-- | Codemerx/Gestor.Model/Model.Domain.Ferramentas/LogEmail.cs | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Model/Model.Domain.Ferramentas/LogEmail.cs b/Codemerx/Gestor.Model/Model.Domain.Ferramentas/LogEmail.cs new file mode 100644 index 0000000..a884b02 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Ferramentas/LogEmail.cs @@ -0,0 +1,157 @@ +using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using Gestor.Model.Validation;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.CompilerServices;
+using System.Text.RegularExpressions;
+
+namespace Gestor.Model.Domain.Ferramentas
+{
+ public class LogEmail : DomainBase
+ {
+ public string Anexos
+ {
+ get;
+ set;
+ }
+
+ public string Assunto
+ {
+ get;
+ set;
+ }
+
+ public string Cco
+ {
+ get;
+ set;
+ }
+
+ public string Corpo
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Domain.Ferramentas.Credencial Credencial
+ {
+ get;
+ set;
+ }
+
+ public DateTime Data
+ {
+ get;
+ set;
+ }
+
+ public string Destinatarios
+ {
+ get;
+ set;
+ }
+
+ public long EntityId
+ {
+ get;
+ set;
+ }
+
+ public string Ip
+ {
+ get;
+ set;
+ }
+
+ public string NomeMaquina
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Common.Relatorio Relatorio
+ {
+ get;
+ set;
+ }
+
+ public TipoTela Tela
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Domain.Seguros.Usuario Usuario
+ {
+ get;
+ set;
+ }
+
+ public string UsuarioMaquina
+ {
+ get;
+ set;
+ }
+
+ public string Versao
+ {
+ get;
+ set;
+ }
+
+ public LogEmail()
+ {
+ }
+
+ public List<TupleList> CriarLogEmail()
+ {
+ string email;
+ string str;
+ this.Corpo = (new Regex("<title>.*<\\/title>")).Replace(this.Corpo, "").Trim();
+ this.Corpo = (new Regex("(<[^>]*>)|(p\\s?{[^}]*})|(\\r)|(\\n)")).Replace(this.Corpo, "").Trim();
+ List<TupleList> tupleLists = new List<TupleList>();
+ TupleList tupleList = new TupleList();
+ ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("ASSUNTO", (string.IsNullOrWhiteSpace(this.Assunto) ? "" : this.Assunto), ""),
+ new Tuple<string, string, string>("CORPO", (string.IsNullOrWhiteSpace(this.Corpo) ? "" : this.Corpo), "")
+ };
+ Gestor.Model.Domain.Ferramentas.Credencial credencial = this.Credencial;
+ if (credencial != null)
+ {
+ email = credencial.Email;
+ }
+ else
+ {
+ email = null;
+ }
+ if (string.IsNullOrWhiteSpace(email))
+ {
+ str = "";
+ }
+ else
+ {
+ Gestor.Model.Domain.Ferramentas.Credencial credencial1 = this.Credencial;
+ if (credencial1 != null)
+ {
+ str = credencial1.Email;
+ }
+ else
+ {
+ str = null;
+ }
+ }
+ observableCollection.Add(new Tuple<string, string, string>("E-MAIL DE ENVIO", str, ""));
+ observableCollection.Add(new Tuple<string, string, string>("DESTINATÁRIOS", (string.IsNullOrWhiteSpace(this.Destinatarios) ? "" : this.Destinatarios), ""));
+ observableCollection.Add(new Tuple<string, string, string>("ANEXOS", (string.IsNullOrWhiteSpace(this.Anexos) ? "" : this.Anexos), ""));
+ observableCollection.Add(new Tuple<string, string, string>("CCO", (string.IsNullOrWhiteSpace(this.Cco) ? "" : this.Cco), ""));
+ observableCollection.Add(new Tuple<string, string, string>("RELATORIO", (string.IsNullOrWhiteSpace(this.Relatorio.GetDescription()) ? "" : this.Relatorio.GetDescription()), ""));
+ tupleList.Tuples = observableCollection;
+ tupleLists.Add(tupleList);
+ return tupleLists;
+ }
+ }
+}
\ No newline at end of file |