ZUGFeRD WEB Service: Auswertung der XML-Konfiguration geändert & ZUGFeRD 2.3.x-Anpassungen
This commit is contained in:
@@ -13,7 +13,7 @@ namespace ZUGFeRDRESTService
|
||||
{
|
||||
private DigitalData.Modules.Logging.Logger _Logger = null;
|
||||
private string _gdPictureKey = null;
|
||||
private Dictionary<string, XmlItemProperty> _propertyMap = null;
|
||||
private List<XmlItemProperty> _propertyMapList = null;
|
||||
|
||||
private LogConfig _logConfig = null;
|
||||
private string _connString;
|
||||
@@ -48,21 +48,22 @@ namespace ZUGFeRDRESTService
|
||||
return _gdPictureKey;
|
||||
}
|
||||
|
||||
public Dictionary<string, XmlItemProperty> GetPropertyMap()
|
||||
public List<XmlItemProperty> GetPropertyMapList()
|
||||
{
|
||||
if (_propertyMap == null)
|
||||
if (_propertyMapList == null)
|
||||
{
|
||||
_Logger.Debug("Property map does not exist, creating.");
|
||||
_Logger.Debug("Property map list does not exist, creating.");
|
||||
|
||||
_propertyMap = new Dictionary<string, XmlItemProperty>();
|
||||
_propertyMapList = new List<XmlItemProperty>();
|
||||
var oDatatable = MSSQL.GetDatatable(QUERY_GET_PROPERTY_MAP);
|
||||
|
||||
_Logger.Debug("Datatable Rows: [{0}]", oDatatable.Rows);
|
||||
|
||||
foreach (DataRow oRow in oDatatable.Rows)
|
||||
{
|
||||
_propertyMap.Add(oRow["XML_PATH"].ToString(), new XmlItemProperty()
|
||||
{
|
||||
{
|
||||
_propertyMapList.Add(new XmlItemProperty()
|
||||
{
|
||||
XMLPath = oRow["XML_PATH"].ToString(),
|
||||
Description = oRow["DESCRIPTION"].ToString(),
|
||||
TableName = oRow["TABLE_NAME"].ToString(),
|
||||
TableColumn = oRow["TABLE_COLUMN"].ToString(),
|
||||
@@ -74,14 +75,15 @@ namespace ZUGFeRDRESTService
|
||||
EN16931_ID = oRow["EN16931_ID"] != null ? oRow["EN16931_ID"].ToString() : "-"
|
||||
});
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
_Logger.Debug("Property map already exists, returning.");
|
||||
_Logger.Debug("Property map list already exists, returning.");
|
||||
}
|
||||
|
||||
_Logger.Debug("Returning Property Map with [{0}] entries.", _propertyMap.Count);
|
||||
_Logger.Debug("Returning Property Map list with [{0}] entries.", _propertyMapList.Count);
|
||||
|
||||
return _propertyMap;
|
||||
return _propertyMapList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user