From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- .../Servicos/Financeiro/PlanosServico.cs | 93 ---------------------- 1 file changed, 93 deletions(-) delete mode 100644 Gestor.Application/Servicos/Financeiro/PlanosServico.cs (limited to 'Gestor.Application/Servicos/Financeiro/PlanosServico.cs') diff --git a/Gestor.Application/Servicos/Financeiro/PlanosServico.cs b/Gestor.Application/Servicos/Financeiro/PlanosServico.cs deleted file mode 100644 index b00efbe..0000000 --- a/Gestor.Application/Servicos/Financeiro/PlanosServico.cs +++ /dev/null @@ -1,93 +0,0 @@ -using Gestor.Application.Helpers; -using Gestor.Application.Servicos.Generic; -using Gestor.Infrastructure.Repository.Interface; -using Gestor.Infrastructure.UnitOfWork.Generic; -using Gestor.Infrastructure.UnitOfWork.Logic; -using Gestor.Model.Domain.Common; -using Gestor.Model.Domain.Financeiro; -using Gestor.Model.Domain.Generic; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; - -namespace Gestor.Application.Servicos.Financeiro -{ - internal class PlanosServico : BaseServico - { - public PlanosServico() - { - } - - internal async Task> BuscarPlanos() - { - int num = 3; - ObservableCollection observableCollection1 = await Task.Run>(() => { - ObservableCollection observableCollection; - while (num > 0) - { - try - { - using (UnitOfWork read = Instancia.Read) - { - observableCollection = new ObservableCollection(read.get_PlanosRepository().Find()); - } - } - catch (Exception exception) - { - num = base.Registrar(exception, 168, num, null, true); - continue; - } - return observableCollection; - } - return new ObservableCollection(); - }); - return observableCollection1; - } - - public async Task Save(Planos planos) - { - int num = 3; - base.Sucesso = true; - Planos plano1 = planos; - Planos plano2 = await Task.Run(() => { - Planos plano; - bool flag; - while (num > 0) - { - List registroLogs = new List(); - planos = plano1; - try - { - using (UnitOfWork commited = Instancia.Commited) - { - flag = (planos.get_Id() == 0 ? false : true); - if (flag) - { - registroLogs.Add(base.CreateLog(planos.get_Id(), planos, 28)); - } - planos = (planos.get_Id() == 0 ? commited.get_PlanosRepository().SaveOrUpdate(planos) : commited.get_PlanosRepository().Merge(planos)); - if (!flag) - { - registroLogs.Add(base.CreateLog(planos.get_Id(), planos.GetValorOriginal(), 28, 0)); - } - base.SaveLog(registroLogs, commited); - commited.Commit(); - plano = planos; - } - } - catch (Exception exception) - { - num = base.Registrar(exception, 251, num, planos, true); - continue; - } - return plano; - } - return plano1; - }); - return plano2; - } - } -} \ No newline at end of file -- cgit v1.2.3