From a0fb08cf979f30854a77461e0b0ad18c36e4553c Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 14 Nov 2019 16:47:23 +0100 Subject: [PATCH] cb model changes --- Data/ICF/ICFDAO.cs | 12 +++++++++++- Model/Changes_2019_11_14.txt | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Model/Changes_2019_11_14.txt diff --git a/Data/ICF/ICFDAO.cs b/Data/ICF/ICFDAO.cs index b37d73ae2..9eb59d78a 100644 --- a/Data/ICF/ICFDAO.cs +++ b/Data/ICF/ICFDAO.cs @@ -1,6 +1,7 @@ using BS.Shared.DataContracts; using System; using System.Collections.Generic; +using System.Configuration; using System.Diagnostics; using System.IO; using System.Linq; @@ -19,7 +20,16 @@ namespace BeWo.Data.ICF { try { - _File = XDocument.Load(@"D:\Projects\BeWoPlaner\BeWo\Data\ICF\icf.xml"); + string file = ConfigurationManager.AppSettings.Get("ICFFile"); + if (String.IsNullOrEmpty(file) || + !File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file))) + { + file = "icf.xml"; + } + file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file); + _File = XDocument.Load(file); + + //_File = XDocument.Load(@"D:\Projects\BeWoPlaner\BeWo\Data\ICF\icf.xml"); Debug.WriteLine("Dokument geladen"); _Root = _File.Descendants("Class").Where(x => x.Attribute("code")?.Value == "d").First(); Debug.WriteLine("Root gefunden"); diff --git a/Model/Changes_2019_11_14.txt b/Model/Changes_2019_11_14.txt new file mode 100644 index 000000000..734b5501d --- /dev/null +++ b/Model/Changes_2019_11_14.txt @@ -0,0 +1 @@ +ALTER TABLE `valuelistentry2object` ADD COLUMN `Rating` BIGINT(19) NULL DEFAULT NULL; \ No newline at end of file