diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
| commit | 225aa1499e37faf9d38257caabbadc68d78b427e (patch) | |
| tree | 102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.Helpers/ArquivoDigital.cs | |
| parent | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff) | |
| download | gestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip | |
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.Helpers/ArquivoDigital.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Helpers/ArquivoDigital.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Helpers/ArquivoDigital.cs b/Decompiler/Gestor.Application.Helpers/ArquivoDigital.cs new file mode 100644 index 0000000..4926944 --- /dev/null +++ b/Decompiler/Gestor.Application.Helpers/ArquivoDigital.cs @@ -0,0 +1,38 @@ +using ArquivoDigital.Infrastructure.UnitOfWork.Logic; +using Gestor.Application.Servicos.Generic; +using Gestor.Model.Domain.Common; + +namespace Gestor.Application.Helpers; + +public static class ArquivoDigital +{ + public static string ConexaoAd = null; + + public static UnitOfWork Commited => UnitOfWork(); + + public static UnitOfWork Read => UnitOfWork(withTransaction: false); + + public static string Banco { get; set; } + + public static string Tabela { get; set; } = "arquivodigital"; + + + private static UnitOfWork UnitOfWork(bool withTransaction = true, bool reconect = false) + { + //IL_001c: Unknown result type (might be due to invalid IL or missing references) + //IL_0022: Expected O, but got Unknown + if (ConexaoAd == null) + { + SetConnection(); + } + return new UnitOfWork(ConexaoAd, Tabela, withTransaction); + } + + public static void SetConnection(string banco = "") + { + ControleArquivoDigital val = (string.IsNullOrEmpty(banco) ? new BaseServico().ArquivoDigital().Result : new BaseServico().ArquivoDigital(banco).Result); + Banco = val.Catalogo; + Tabela = (string.IsNullOrWhiteSpace(val.Tabela) ? "arquivodigital" : val.Tabela); + ConexaoAd = "Server=" + Connection.Server + ";initial catalog=" + val.Catalogo + ";user=" + Connection.User + ";password=" + Connection.Password + ";"; + } +} |