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 /Gestor.Application/Servicos/LogServico.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Gestor.Application/Servicos/LogServico.cs')
| -rw-r--r-- | Gestor.Application/Servicos/LogServico.cs | 262 |
1 files changed, 0 insertions, 262 deletions
diff --git a/Gestor.Application/Servicos/LogServico.cs b/Gestor.Application/Servicos/LogServico.cs deleted file mode 100644 index bc61ed1..0000000 --- a/Gestor.Application/Servicos/LogServico.cs +++ /dev/null @@ -1,262 +0,0 @@ -using Gestor.Application.Helpers;
-using Gestor.Application.Servicos.Generic;
-using Gestor.Infrastructure.Repository.Interface;
-using Gestor.Infrastructure.UnitOfWork.Logic;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Ferramentas;
-using Gestor.Model.Domain.Relatorios;
-using Gestor.Model.Domain.Relatorios.LogsEnvio;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-
-namespace Gestor.Application.Servicos
-{
- public class LogServico : BaseServico
- {
- public LogServico()
- {
- }
-
- public async Task<ObservableCollection<RegistroLog>> BuscaLogParcelas(List<long> ids)
- {
- int num = 3;
- ObservableCollection<RegistroLog> observableCollection1 = await Task.Run<ObservableCollection<RegistroLog>>(() => {
- ObservableCollection<RegistroLog> observableCollection;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- List<RegistroLog> registroLogs = read.get_RegistroLogRepository().BuscaLogParcelas(ids);
- Func<RegistroLog, DateTime> u003cu003e9_11 = LogServico.u003cu003ec.u003cu003e9__1_1;
- if (u003cu003e9_11 == null)
- {
- u003cu003e9_11 = (RegistroLog x) => x.get_DataHora();
- LogServico.u003cu003ec.u003cu003e9__1_1 = u003cu003e9_11;
- }
- observableCollection = new ObservableCollection<RegistroLog>(registroLogs.OrderByDescending<RegistroLog, DateTime>(u003cu003e9_11));
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 67, num, new { Parcela = 5, ids = ids }, true);
- continue;
- }
- return observableCollection;
- }
- return new ObservableCollection<RegistroLog>();
- });
- return observableCollection1;
- }
-
- public async Task<List<RegistroAcao>> BuscarLogs(Filtros filtro)
- {
- int num = 3;
- List<RegistroAcao> registroAcaos1 = await Task.Run<List<RegistroAcao>>(() => {
- List<RegistroAcao> registroAcaos;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- registroAcaos = read.get_RegistroAcaoRepository().Find(filtro);
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 321, num, filtro, true);
- continue;
- }
- return registroAcaos;
- }
- return new List<RegistroAcao>();
- });
- return registroAcaos1;
- }
-
- public async Task<List<RegistroAcao>> BuscarLogsAntigos(Filtros filtro)
- {
- int num = 3;
- List<RegistroAcao> registroAcaos1 = await Task.Run<List<RegistroAcao>>(() => {
- List<RegistroAcao> registroAcaos;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- registroAcaos = read.get_RegistroAcaoRepository().FindOld(filtro, Connection.GetConnectionString());
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 321, num, filtro, true);
- continue;
- }
- return registroAcaos;
- }
- return new List<RegistroAcao>();
- });
- return registroAcaos1;
- }
-
- public async Task<List<LogsEnvio>> BuscarLogsEnvio(Filtros filtro)
- {
- int num = 3;
- List<LogsEnvio> logsEnvios1 = await Task.Run<List<LogsEnvio>>(() => {
- List<LogsEnvio> logsEnvios;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- logsEnvios = read.get_RegistroLogRepository().LogsEnvio(filtro);
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 9, num, filtro, true);
- continue;
- }
- return logsEnvios;
- }
- return new List<LogsEnvio>();
- });
- return logsEnvios1;
- }
-
- public async Task<ObservableCollection<RegistroLog>> FindAllByEntityId(TipoTela tela, long id)
- {
- int num = 3;
- ObservableCollection<RegistroLog> observableCollection1 = await Task.Run<ObservableCollection<RegistroLog>>(() => {
- ObservableCollection<RegistroLog> observableCollection;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- List<RegistroLog> registroLogs = read.get_RegistroLogRepository().FindByEntityId(tela, id);
- Func<RegistroLog, DateTime> u003cu003e9_41 = LogServico.u003cu003ec.u003cu003e9__4_1;
- if (u003cu003e9_41 == null)
- {
- u003cu003e9_41 = (RegistroLog x) => x.get_DataHora();
- LogServico.u003cu003ec.u003cu003e9__4_1 = u003cu003e9_41;
- }
- observableCollection = new ObservableCollection<RegistroLog>(registroLogs.OrderByDescending<RegistroLog, DateTime>(u003cu003e9_41));
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 67, num, new { tela = tela, id = id }, true);
- continue;
- }
- return observableCollection;
- }
- return new ObservableCollection<RegistroLog>();
- });
- return observableCollection1;
- }
-
- public async Task<ObservableCollection<LogEmail>> FindByEntity(TipoTela tela, long id)
- {
- int num = 3;
- ObservableCollection<LogEmail> observableCollection1 = await Task.Run<ObservableCollection<LogEmail>>(() => {
- ObservableCollection<LogEmail> observableCollection;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- List<LogEmail> logEmails = read.get_RegistroLogRepository().FindByEntity(tela, id);
- Func<LogEmail, DateTime> u003cu003e9_21 = LogServico.u003cu003ec.u003cu003e9__2_1;
- if (u003cu003e9_21 == null)
- {
- u003cu003e9_21 = (LogEmail x) => x.get_Data();
- LogServico.u003cu003ec.u003cu003e9__2_1 = u003cu003e9_21;
- }
- observableCollection = new ObservableCollection<LogEmail>(logEmails.OrderByDescending<LogEmail, DateTime>(u003cu003e9_21));
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 68, num, new { tela = tela, id = id }, true);
- continue;
- }
- return observableCollection;
- }
- return new ObservableCollection<LogEmail>();
- });
- return observableCollection1;
- }
-
- public async Task<ObservableCollection<RegistroLog>> FindByEntityId(TipoTela tela, long id)
- {
- int num = 3;
- ObservableCollection<RegistroLog> observableCollection1 = await Task.Run<ObservableCollection<RegistroLog>>(() => {
- ObservableCollection<RegistroLog> observableCollection;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- List<RegistroLog> registroLogs = read.get_RegistroLogRepository().FindByEntityId(tela, id);
- Func<RegistroLog, DateTime> u003cu003e9_01 = LogServico.u003cu003ec.u003cu003e9__0_1;
- if (u003cu003e9_01 == null)
- {
- u003cu003e9_01 = (RegistroLog x) => x.get_DataHora();
- LogServico.u003cu003ec.u003cu003e9__0_1 = u003cu003e9_01;
- }
- observableCollection = new ObservableCollection<RegistroLog>(registroLogs.OrderByDescending<RegistroLog, DateTime>(u003cu003e9_01));
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 67, num, new { tela = tela, id = id }, true);
- continue;
- }
- return observableCollection;
- }
- return new ObservableCollection<RegistroLog>();
- });
- return observableCollection1;
- }
-
- public async Task<ObservableCollection<LogEmail>> FindById(long id)
- {
- int num = 3;
- ObservableCollection<LogEmail> observableCollection1 = await Task.Run<ObservableCollection<LogEmail>>(() => {
- ObservableCollection<LogEmail> observableCollection;
- while (num > 0)
- {
- try
- {
- using (UnitOfWork read = Instancia.Read)
- {
- observableCollection = new ObservableCollection<LogEmail>(read.get_RegistroLogRepository().FindByIdSingle(id));
- }
- }
- catch (Exception exception)
- {
- num = base.Registrar(exception, 69, num, new { id = id }, true);
- continue;
- }
- return observableCollection;
- }
- return new ObservableCollection<LogEmail>();
- });
- return observableCollection1;
- }
- }
-}
\ No newline at end of file |