From a4082fca458e0a1bd3a4afccc3f4cc68296f8e69 Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 6 Mar 2026 13:58:29 +0100 Subject: [PATCH] Remove ConfigModel and DbConfig classes Deleted ConfigModel.cs and DbConfig.cs, removing both the configuration loading logic and the DbConfig data structure from the codebase. This eliminates database-driven configuration management functionality. --- .../Jobs/ConfigModel.cs | 33 ------------------- .../Jobs/DbConfig.cs | 12 ------- 2 files changed, 45 deletions(-) delete mode 100644 EnvelopeGenerator.ServiceHost/Jobs/ConfigModel.cs delete mode 100644 EnvelopeGenerator.ServiceHost/Jobs/DbConfig.cs diff --git a/EnvelopeGenerator.ServiceHost/Jobs/ConfigModel.cs b/EnvelopeGenerator.ServiceHost/Jobs/ConfigModel.cs deleted file mode 100644 index e885885c..00000000 --- a/EnvelopeGenerator.ServiceHost/Jobs/ConfigModel.cs +++ /dev/null @@ -1,33 +0,0 @@ -using DigitalData.Modules.Database; -using EnvelopeGenerator.ServiceHost.Extensions; - -namespace EnvelopeGenerator.ServiceHost.Jobs; - -public class ConfigModel(MSSQLServer Database, ILogger Logger) -{ - public DbConfig LoadConfiguration() - { - try - { - const string sql = "SELECT TOP 1 * FROM TBSIG_CONFIG"; - var table = Database.GetDatatable(sql); - var row = table.Rows[0]; - - return new DbConfig - { - DocumentPath = row.ItemEx("DOCUMENT_PATH", string.Empty), - ExportPath = row.ItemEx("EXPORT_PATH", string.Empty), - SendingProfile = row.ItemEx("SENDING_PROFILE", 0), - SignatureHost = row.ItemEx("SIGNATURE_HOST", string.Empty), - ExternalProgramName = row.ItemEx("EXTERNAL_PROGRAM_NAME", string.Empty), - Default_Tfa_Enabled = row.ItemEx("DEF_TFA_ENABLED", false), - Default_Tfa_WithPhone = row.ItemEx("DEF_TFA_WITH_PHONE", false) - }; - } - catch (Exception ex) - { - Logger.LogError(ex); - return new DbConfig(); - } - } -} diff --git a/EnvelopeGenerator.ServiceHost/Jobs/DbConfig.cs b/EnvelopeGenerator.ServiceHost/Jobs/DbConfig.cs deleted file mode 100644 index 015cadf4..00000000 --- a/EnvelopeGenerator.ServiceHost/Jobs/DbConfig.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EnvelopeGenerator.ServiceHost.Jobs; - -public class DbConfig -{ - public string ExternalProgramName { get; set; } = "signFLOW"; - public string DocumentPath { get; set; } = string.Empty; - public string ExportPath { get; set; } = string.Empty; - public int SendingProfile { get; set; } - public string SignatureHost { get; set; } = string.Empty; - public bool Default_Tfa_Enabled { get; set; } - public bool Default_Tfa_WithPhone { get; set; } -}