From 225aa1499e37faf9d38257caabbadc68d78b427e Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 12:29:41 -0300 Subject: decompiler.com --- .../AjudaServico.cs | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 Decompiler/Gestor.Application.Servicos.Ajuda/AjudaServico.cs (limited to 'Decompiler/Gestor.Application.Servicos.Ajuda/AjudaServico.cs') diff --git a/Decompiler/Gestor.Application.Servicos.Ajuda/AjudaServico.cs b/Decompiler/Gestor.Application.Servicos.Ajuda/AjudaServico.cs new file mode 100644 index 0000000..7805918 --- /dev/null +++ b/Decompiler/Gestor.Application.Servicos.Ajuda/AjudaServico.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Threading.Tasks; +using CsQuery.ExtensionMethods.Internal; +using Gestor.Application.Helpers; +using Gestor.Application.Model.Ajuda; +using Gestor.Application.Servicos.Generic; +using Gestor.Model.API; +using Gestor.Model.License; + +namespace Gestor.Application.Servicos.Ajuda; + +public class AjudaServico : BaseServico +{ + internal async Task> BuscarAtendimentos(string status) + { + return await Task.Run(delegate + { + try + { + int num = ((status == "PENDENTES") ? 1 : 2); + return Connection.Get>($"Attendance/{num}").Result; + } + catch (Exception) + { + return (ObservableCollection)null; + } + }); + } + + internal async Task BuscarCorpoAtendimentos(long id) + { + return await Task.Run(delegate + { + try + { + return Connection.Get($"Attendance/Body/{id}").Result; + } + catch (Exception) + { + return (string)null; + } + }); + } + + internal async Task> BuscarBoletosNotas(string status) + { + return await Task.Run(delegate + { + try + { + return Connection.Get>(string.Format("Billet/{0}", status == "BAIXADOS")).Result; + } + catch (Exception) + { + return (List)null; + } + }); + } + + internal async Task BuscarContrato(Produto produto) + { + //IL_000e: Unknown result type (might be due to invalid IL or missing references) + //IL_000f: Unknown result type (might be due to invalid IL or missing references) + return await Task.Run(delegate + { + //IL_0006: Unknown result type (might be due to invalid IL or missing references) + try + { + return Connection.Get($"Contract/{ExtensionMethods.GetValue((Enum)(object)produto)}").Result; + } + catch (Exception) + { + return (Contrato)null; + } + }); + } + + internal async Task> BuscarLicencas() + { + return await Task.Run(delegate + { + try + { + return Connection.Get>($"License/{ApplicationHelper.IdFornecedor}").Result; + } + catch (Exception) + { + return (ObservableCollection)null; + } + }); + } + + internal async Task ExcluirInstalacao(long id) + { + int tries = 3; + return await Task.Run(delegate + { + while (tries > 0) + { + try + { + return Connection.Delete($"License/{id}").Result; + } + catch (Exception e) + { + tries = Registrar(e, (TipoErro)273, tries, id); + } + } + return false; + }); + } +} -- cgit v1.2.3