Testing Storage Paths
This commit is contained in:
parent
fd7fad62fb
commit
4cd07128b3
@ -80,8 +80,9 @@ dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array al
|
|||||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary using System.Text;
|
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
||||||
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
||||||
|
3
EDA Viewer/.vscode/settings.json
vendored
Normal file
3
EDA Viewer/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cSpell.enabled": false
|
||||||
|
}
|
@ -264,7 +264,7 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
if (!addFile && fileName.Length > ticksLength)
|
if (!addFile && fileName.Length > ticksLength)
|
||||||
{
|
{
|
||||||
MatchCollection matches = regex.Matches(fileName);
|
MatchCollection matches = regex.Matches(fileName);
|
||||||
foreach (Match match in matches)
|
foreach (Match match in matches.Cast<Match>())
|
||||||
{
|
{
|
||||||
if (_Stop)
|
if (_Stop)
|
||||||
break;
|
break;
|
||||||
@ -525,7 +525,7 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stream ToStream(string @this)
|
private static Stream ToStream(string @this)
|
||||||
{
|
{
|
||||||
MemoryStream? stream = new();
|
MemoryStream? stream = new();
|
||||||
StreamWriter? writer = new(stream);
|
StreamWriter? writer = new(stream);
|
||||||
@ -535,7 +535,7 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
private T? ParseXML<T>(string @this, bool throwExceptions) where T : class
|
private static T? ParseXML<T>(string @this, bool throwExceptions) where T : class
|
||||||
{
|
{
|
||||||
object? result = null;
|
object? result = null;
|
||||||
try
|
try
|
||||||
@ -554,13 +554,8 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
return result as T;
|
return result as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DataCollectionPlans(AppSettings appSettings, string edaDataCollectionPlansLastRun, string cSharpFormat, string oracleFormat)
|
private void EvaluateRows(string workingDirectory, Dictionary<string, Dictionary<ModuleInstanceTypeName, List<List<object>>>> rows)
|
||||||
{
|
{
|
||||||
object _Lock = new();
|
|
||||||
bool _ShuttingDown = false;
|
|
||||||
bool dev = appSettings.Server.Contains("_ec_");
|
|
||||||
Dictionary<string, Dictionary<ModuleInstanceTypeName, List<List<object>>>> rows = new();
|
|
||||||
//
|
|
||||||
//int moduleinstancetypename = 0;
|
//int moduleinstancetypename = 0;
|
||||||
int unitname = 1;
|
int unitname = 1;
|
||||||
//int modulename = 2;
|
//int modulename = 2;
|
||||||
@ -571,99 +566,7 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
int containermodifieddate = 7;
|
int containermodifieddate = 7;
|
||||||
int containerconfiguration = 8;
|
int containerconfiguration = 8;
|
||||||
int configurationmodifieddate = 9;
|
int configurationmodifieddate = 9;
|
||||||
string objectTypeDirectory;
|
//
|
||||||
string workingDirectory = string.Concat(@"\\", appSettings.Server, @"\EC_EDA");
|
|
||||||
// ()
|
|
||||||
{
|
|
||||||
object @object;
|
|
||||||
string? @string;
|
|
||||||
int fieldCount;
|
|
||||||
List<object> row;
|
|
||||||
string decrypted;
|
|
||||||
string connectionName;
|
|
||||||
string connectionString;
|
|
||||||
StringBuilder sql = new();
|
|
||||||
Array objectTypes = Enum.GetValues(typeof(ModuleInstanceTypeName));
|
|
||||||
List<Tuple<string, string>> connections = new();
|
|
||||||
if (dev)
|
|
||||||
{
|
|
||||||
connectionName = @"DEV";
|
|
||||||
connectionString = Helper.Background.EDADatabase.GetEdaDevelopment();
|
|
||||||
decrypted = RijndaelEncryption.Decrypt(appSettings.IFXEDADatabasePassword, appSettings.Company);
|
|
||||||
connectionString = string.Concat(connectionString, decrypted, ";");
|
|
||||||
connections.Add(new Tuple<string, string>(connectionName, connectionString));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
connectionName = "Staging";
|
|
||||||
connectionString = Helper.Background.EDADatabase.GetEdaStaging();
|
|
||||||
decrypted = RijndaelEncryption.Decrypt(appSettings.ECEDADatabasePassword, appSettings.Company);
|
|
||||||
connectionString = string.Concat(connectionString, decrypted, ";");
|
|
||||||
connections.Add(new Tuple<string, string>(connectionName, connectionString));
|
|
||||||
connectionName = "Production";
|
|
||||||
connectionString = Helper.Background.EDADatabase.GetEdaProduction();
|
|
||||||
connectionString = string.Concat(connectionString, decrypted, ";");
|
|
||||||
connections.Add(new Tuple<string, string>(connectionName, connectionString));
|
|
||||||
}
|
|
||||||
foreach (Tuple<string, string> connection in connections)
|
|
||||||
{
|
|
||||||
if (_ShuttingDown)
|
|
||||||
break;
|
|
||||||
rows.Add(connection.Item1, new Dictionary<ModuleInstanceTypeName, List<List<object>>>());
|
|
||||||
foreach (ModuleInstanceTypeName objectType in objectTypes)
|
|
||||||
{
|
|
||||||
if (_ShuttingDown)
|
|
||||||
break;
|
|
||||||
if (string.IsNullOrEmpty(edaDataCollectionPlansLastRun))
|
|
||||||
{
|
|
||||||
objectTypeDirectory = string.Concat(workingDirectory, @"\", connection.Item1, @"\", objectType);
|
|
||||||
if (!Directory.Exists(objectTypeDirectory))
|
|
||||||
_ = Directory.CreateDirectory(objectTypeDirectory);
|
|
||||||
else
|
|
||||||
edaDataCollectionPlansLastRun = new DirectoryInfo(objectTypeDirectory).LastWriteTime.ToString(cSharpFormat);
|
|
||||||
}
|
|
||||||
if (!rows[connection.Item1].ContainsKey(objectType))
|
|
||||||
rows[connection.Item1].Add(objectType, new List<List<object>>());
|
|
||||||
using (Oracle.ManagedDataAccess.Client.OracleConnection oracleConnection = new(connection.Item2))
|
|
||||||
{
|
|
||||||
_ = sql.Clear();
|
|
||||||
oracleConnection.Open();
|
|
||||||
_ = sql.Append(" select v.moduleinstancetypename, v.unitname, ").
|
|
||||||
Append(" v.modulename, v.containername, v.configurationstate, ").
|
|
||||||
Append(" v.configurationproductivestate, v.containermodifiername, ").
|
|
||||||
Append(" v.containermodifieddate, v.containerconfiguration, v.configurationmodifieddate ").
|
|
||||||
Append(" from veditconfiguration v ").
|
|
||||||
Append(" where v.moduleinstancetypename = '").Append(objectType.ToString()).Append("' ");
|
|
||||||
//Append(" and v.containerversion in ('4.80', '4.111') ");
|
|
||||||
if (!string.IsNullOrEmpty(edaDataCollectionPlansLastRun))
|
|
||||||
_ = sql.Append(" and greatest(v.containermodifieddate, v.configurationmodifieddate) >= to_date('").Append(edaDataCollectionPlansLastRun).Append("', '").Append(oracleFormat).Append("') ");
|
|
||||||
//Print(sql.ToString());
|
|
||||||
using Oracle.ManagedDataAccess.Client.OracleCommand oracleCommand = new(sql.ToString(), oracleConnection);
|
|
||||||
using Oracle.ManagedDataAccess.Client.OracleDataReader oracleDataReader = oracleCommand.ExecuteReader();
|
|
||||||
fieldCount = oracleDataReader.FieldCount;
|
|
||||||
while (oracleDataReader.Read())
|
|
||||||
{
|
|
||||||
if (_ShuttingDown)
|
|
||||||
break;
|
|
||||||
row = new List<object>();
|
|
||||||
for (int c = 0; c < fieldCount; c++)
|
|
||||||
{
|
|
||||||
@object = oracleDataReader.GetValue(c);
|
|
||||||
row.Add(@object);
|
|
||||||
if (@object is null)
|
|
||||||
continue;
|
|
||||||
@string = @object.ToString();
|
|
||||||
//if (@string.Length < 128)
|
|
||||||
// _Log.Debug(@string);
|
|
||||||
}
|
|
||||||
rows[connection.Item1][objectType].Add(row);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (rows.Any())
|
|
||||||
{
|
|
||||||
string csv;
|
string csv;
|
||||||
string? xml;
|
string? xml;
|
||||||
string json;
|
string json;
|
||||||
@ -672,34 +575,36 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
Common common;
|
Common common;
|
||||||
string emptyAPC;
|
string emptyAPC;
|
||||||
string fileName;
|
string fileName;
|
||||||
|
object _Lock = new();
|
||||||
string? modifiedDate;
|
string? modifiedDate;
|
||||||
string edaObjectFile;
|
string edaObjectFile;
|
||||||
string goldDirectory;
|
string goldDirectory;
|
||||||
string replace = "$$$";
|
string replace = "$$$";
|
||||||
string edaObjectDirectory;
|
string edaObjectDirectory;
|
||||||
DateTime lastModifiedDate;
|
DateTime lastModifiedDate;
|
||||||
|
string objectTypeDirectory;
|
||||||
DateTime containerModifiedDate;
|
DateTime containerModifiedDate;
|
||||||
PDSFConfiguration? configuration;
|
PDSFConfiguration? configuration;
|
||||||
DateTime configurationModifiedDate;
|
DateTime configurationModifiedDate;
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||||
foreach (KeyValuePair<string, Dictionary<ModuleInstanceTypeName, List<List<object>>>> databaseElement in rows)
|
foreach (KeyValuePair<string, Dictionary<ModuleInstanceTypeName, List<List<object>>>> databaseElement in rows)
|
||||||
{
|
{
|
||||||
if (_ShuttingDown)
|
if (_Stop)
|
||||||
break;
|
break;
|
||||||
emptyAPC = string.Concat(workingDirectory, @"\", databaseElement.Key, @"\EmptyAPC.xlsx");
|
emptyAPC = string.Concat(workingDirectory, @"\", databaseElement.Key, @"\EmptyAPC.xlsx");
|
||||||
foreach (KeyValuePair<ModuleInstanceTypeName, List<List<object>>> tableNameElement in databaseElement.Value)
|
foreach (KeyValuePair<ModuleInstanceTypeName, List<List<object>>> tableNameElement in databaseElement.Value)
|
||||||
{
|
{
|
||||||
if (_ShuttingDown)
|
if (_Stop)
|
||||||
break;
|
break;
|
||||||
objectTypeDirectory = string.Concat(workingDirectory, @"\", databaseElement.Key, @"\", tableNameElement.Key);
|
objectTypeDirectory = string.Concat(workingDirectory, @"\", databaseElement.Key, @"\", tableNameElement.Key);
|
||||||
foreach (List<object> rowItem in tableNameElement.Value)
|
foreach (List<object> rowItem in tableNameElement.Value)
|
||||||
{
|
{
|
||||||
if (_ShuttingDown)
|
if (_Stop)
|
||||||
break;
|
break;
|
||||||
//foreach (var item in rowItem)
|
//foreach (var item in rowItem)
|
||||||
// Print(item.ToString());
|
// Print(item.ToString());
|
||||||
//if (!rowItem[containername].ToString().Contains("Plan_Pdsf_Health_Cp2Mg"))
|
//if (!rowItem[containername].ToString().Contains("Plan_Pdsf_Health_Cp2Mg"))
|
||||||
//if (!rowItem[unitname].ToString().Contains("XRD04") || !rowItem[containername].ToString().Contains("Plan_Pdsf"))
|
// if (!rowItem[unitname].ToString().Contains("HGCV1") || !rowItem[containername].ToString().Contains("Plan_Pdsf"))
|
||||||
// continue;
|
// continue;
|
||||||
modifiedDate = rowItem[containermodifieddate].ToString();
|
modifiedDate = rowItem[containermodifieddate].ToString();
|
||||||
if (string.IsNullOrEmpty(modifiedDate))
|
if (string.IsNullOrEmpty(modifiedDate))
|
||||||
@ -723,7 +628,6 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
xml = rowItem[containerconfiguration].ToString();
|
xml = rowItem[containerconfiguration].ToString();
|
||||||
if (string.IsNullOrEmpty(xml))
|
if (string.IsNullOrEmpty(xml))
|
||||||
continue;
|
continue;
|
||||||
//continue;
|
|
||||||
lock (_Lock)
|
lock (_Lock)
|
||||||
{
|
{
|
||||||
fileName = string.Concat(edaObjectFile.Replace(replace, "Raw"), ".xml");
|
fileName = string.Concat(edaObjectFile.Replace(replace, "Raw"), ".xml");
|
||||||
@ -808,6 +712,101 @@ public class Background : Models.Properties.IBackground, IBackground, IDisposabl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DataCollectionPlans(AppSettings appSettings, string edaDataCollectionPlansLastRun, string cSharpFormat, string oracleFormat)
|
||||||
|
{
|
||||||
|
int fieldCount;
|
||||||
|
object @object;
|
||||||
|
string? @string;
|
||||||
|
List<object> row;
|
||||||
|
string decrypted;
|
||||||
|
string connectionName;
|
||||||
|
string connectionString;
|
||||||
|
StringBuilder sql = new();
|
||||||
|
string objectTypeDirectory;
|
||||||
|
bool dev = appSettings.Server.Contains("_ec_");
|
||||||
|
List<Tuple<string, string>> connections = new();
|
||||||
|
Array objectTypes = Enum.GetValues(typeof(ModuleInstanceTypeName));
|
||||||
|
string workingDirectory = string.Concat(@"\\", appSettings.Server, @"\EC_EDA");
|
||||||
|
Dictionary<string, Dictionary<ModuleInstanceTypeName, List<List<object>>>> rows = new();
|
||||||
|
if (dev)
|
||||||
|
{
|
||||||
|
connectionName = @"DEV";
|
||||||
|
connectionString = Helper.Background.EDADatabase.GetEdaDevelopment();
|
||||||
|
decrypted = RijndaelEncryption.Decrypt(appSettings.IFXEDADatabasePassword, appSettings.Company);
|
||||||
|
connectionString = string.Concat(connectionString, decrypted, ";");
|
||||||
|
connections.Add(new Tuple<string, string>(connectionName, connectionString));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
connectionName = "Staging";
|
||||||
|
connectionString = Helper.Background.EDADatabase.GetEdaStaging();
|
||||||
|
decrypted = RijndaelEncryption.Decrypt(appSettings.ECEDADatabasePassword, appSettings.Company);
|
||||||
|
connectionString = string.Concat(connectionString, decrypted, ";");
|
||||||
|
connections.Add(new Tuple<string, string>(connectionName, connectionString));
|
||||||
|
connectionName = "Production";
|
||||||
|
connectionString = Helper.Background.EDADatabase.GetEdaProduction();
|
||||||
|
connectionString = string.Concat(connectionString, decrypted, ";");
|
||||||
|
connections.Add(new Tuple<string, string>(connectionName, connectionString));
|
||||||
|
}
|
||||||
|
foreach (Tuple<string, string> connection in connections)
|
||||||
|
{
|
||||||
|
if (_Stop)
|
||||||
|
break;
|
||||||
|
rows.Add(connection.Item1, new Dictionary<ModuleInstanceTypeName, List<List<object>>>());
|
||||||
|
foreach (ModuleInstanceTypeName objectType in objectTypes)
|
||||||
|
{
|
||||||
|
if (_Stop)
|
||||||
|
break;
|
||||||
|
if (string.IsNullOrEmpty(edaDataCollectionPlansLastRun))
|
||||||
|
{
|
||||||
|
objectTypeDirectory = Path.Combine(workingDirectory, connection.Item1, objectType.ToString());
|
||||||
|
if (!Directory.Exists(objectTypeDirectory))
|
||||||
|
_ = Directory.CreateDirectory(objectTypeDirectory);
|
||||||
|
else
|
||||||
|
edaDataCollectionPlansLastRun = new DirectoryInfo(objectTypeDirectory).LastWriteTime.ToString(cSharpFormat);
|
||||||
|
}
|
||||||
|
if (!rows[connection.Item1].ContainsKey(objectType))
|
||||||
|
rows[connection.Item1].Add(objectType, new List<List<object>>());
|
||||||
|
using (Oracle.ManagedDataAccess.Client.OracleConnection oracleConnection = new(connection.Item2))
|
||||||
|
{
|
||||||
|
_ = sql.Clear();
|
||||||
|
oracleConnection.Open();
|
||||||
|
_ = sql.Append(" select v.moduleinstancetypename, v.unitname, ").
|
||||||
|
Append(" v.modulename, v.containername, v.configurationstate, ").
|
||||||
|
Append(" v.configurationproductivestate, v.containermodifiername, ").
|
||||||
|
Append(" v.containermodifieddate, v.containerconfiguration, v.configurationmodifieddate ").
|
||||||
|
Append(" from veditconfiguration v ").
|
||||||
|
Append(" where v.moduleinstancetypename = '").Append(objectType.ToString()).Append("' ");
|
||||||
|
//Append(" and v.containerversion in ('4.80', '4.111') ");
|
||||||
|
if (!string.IsNullOrEmpty(edaDataCollectionPlansLastRun))
|
||||||
|
_ = sql.Append(" and greatest(v.containermodifieddate, v.configurationmodifieddate) >= to_date('").Append(edaDataCollectionPlansLastRun).Append("', '").Append(oracleFormat).Append("') ");
|
||||||
|
//Print(sql.ToString());
|
||||||
|
using Oracle.ManagedDataAccess.Client.OracleCommand oracleCommand = new(sql.ToString(), oracleConnection);
|
||||||
|
using Oracle.ManagedDataAccess.Client.OracleDataReader oracleDataReader = oracleCommand.ExecuteReader();
|
||||||
|
fieldCount = oracleDataReader.FieldCount;
|
||||||
|
while (oracleDataReader.Read())
|
||||||
|
{
|
||||||
|
if (_Stop)
|
||||||
|
break;
|
||||||
|
row = new List<object>();
|
||||||
|
for (int c = 0; c < fieldCount; c++)
|
||||||
|
{
|
||||||
|
@object = oracleDataReader.GetValue(c);
|
||||||
|
row.Add(@object);
|
||||||
|
if (@object is null)
|
||||||
|
continue;
|
||||||
|
@string = @object.ToString();
|
||||||
|
//if (@string.Length < 128)
|
||||||
|
// _Log.Debug(@string);
|
||||||
|
}
|
||||||
|
rows[connection.Item1][objectType].Add(row);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rows.Any())
|
||||||
|
EvaluateRows(workingDirectory, rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -122,6 +122,7 @@ public partial class PDSFConfigurationSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
[System.Xml.Serialization.XmlArrayItem("Path", IsNullable = false)]
|
||||||
public string[] StoragePaths
|
public string[] StoragePaths
|
||||||
{
|
{
|
||||||
get => this.storagePathsField;
|
get => this.storagePathsField;
|
||||||
|
@ -29,7 +29,7 @@ public partial class Background
|
|||||||
_ = result.Append("<th nowrap>").Append("Configuration Productive State").AppendLine("</th>");
|
_ = result.Append("<th nowrap>").Append("Configuration Productive State").AppendLine("</th>");
|
||||||
_ = result.Append("<th nowrap>").Append("LogisticsEquipmentAlias").AppendLine("</th>");
|
_ = result.Append("<th nowrap>").Append("LogisticsEquipmentAlias").AppendLine("</th>");
|
||||||
_ = result.Append("<th nowrap>").Append("Source").AppendLine("</th>");
|
_ = result.Append("<th nowrap>").Append("Source").AppendLine("</th>");
|
||||||
_ = result.Append("<th nowrap>").Append("StoragePath").AppendLine("</th>");
|
_ = result.Append("<th nowrap>").Append("StoragePath(s)").AppendLine("</th>");
|
||||||
_ = result.Append("<th nowrap>").Append("StartTimeFormat").AppendLine("</th>");
|
_ = result.Append("<th nowrap>").Append("StartTimeFormat").AppendLine("</th>");
|
||||||
_ = result.Append("<th nowrap>").Append("Filename").AppendLine("</th>");
|
_ = result.Append("<th nowrap>").Append("Filename").AppendLine("</th>");
|
||||||
_ = result.AppendLine("</tr>");
|
_ = result.AppendLine("</tr>");
|
||||||
|
@ -88,11 +88,11 @@ public class Common
|
|||||||
LogisticsEquipmentAlias = configuration.DataCollection.Logistics.EquipmentAlias;
|
LogisticsEquipmentAlias = configuration.DataCollection.Logistics.EquipmentAlias;
|
||||||
//if (LogisticsEquipmentAlias == "R47-PLC")
|
//if (LogisticsEquipmentAlias == "R47-PLC")
|
||||||
//{ }
|
//{ }
|
||||||
foreach (PDSFConfigurationDataCollectionLogisticsAttribute item in (from l in configuration.DataCollection.Logistics.Attributes orderby l.Use descending, l.Order select l))
|
foreach (PDSFConfigurationDataCollectionLogisticsAttribute item in from l in configuration.DataCollection.Logistics.Attributes orderby l.Use descending, l.Order select l)
|
||||||
LogisticsAttributes.Add(new string[] { item.Use.ToString(), item.Order.ToString("000"), item.Key, item.Placeholder });
|
LogisticsAttributes.Add(new string[] { item.Use.ToString(), item.Order.ToString("000"), item.Key, item.Placeholder });
|
||||||
foreach (PDSFConfigurationDataCollectionLogisticsColumn item in configuration.DataCollection.Logistics.Columns)
|
foreach (PDSFConfigurationDataCollectionLogisticsColumn item in configuration.DataCollection.Logistics.Columns)
|
||||||
LogisticsColumns.Add(new string[] { item.ID.ToString(), item.Prefix });
|
LogisticsColumns.Add(new string[] { item.ID.ToString(), item.Prefix });
|
||||||
foreach (PDSFConfigurationDataCollectionParameter1 item in (from l in configuration.DataCollection.VirtualParameters orderby l.Use descending, l.Order select l))
|
foreach (PDSFConfigurationDataCollectionParameter1 item in from l in configuration.DataCollection.VirtualParameters orderby l.Use descending, l.Order select l)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(item.Alias) && !string.IsNullOrEmpty(item.Conditions.ConditionModel.Name))
|
if (string.IsNullOrEmpty(item.Alias) && !string.IsNullOrEmpty(item.Conditions.ConditionModel.Name))
|
||||||
{
|
{
|
||||||
@ -109,7 +109,7 @@ public class Common
|
|||||||
Parameters.Add(new string[] { item.Use.ToString(), item.Order.ToString("000"), item.FullName, item.Alias, item.HardWareId, item.Description, string.Empty, true.ToString(), (configuration.DataCollection.Logistics.Columns.Length + 1 + item.Order).ToString("000") });
|
Parameters.Add(new string[] { item.Use.ToString(), item.Order.ToString("000"), item.FullName, item.Alias, item.HardWareId, item.Description, string.Empty, true.ToString(), (configuration.DataCollection.Logistics.Columns.Length + 1 + item.Order).ToString("000") });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (PDSFConfigurationDataCollectionParameter item in (from l in configuration.DataCollection.Parameters orderby l.Use descending, l.Order select l))
|
foreach (PDSFConfigurationDataCollectionParameter item in from l in configuration.DataCollection.Parameters orderby l.Use descending, l.Order select l)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(item?.Alias) && !string.IsNullOrEmpty(item?.Conditions?.ConditionModel?.Name))
|
if (string.IsNullOrEmpty(item?.Alias) && !string.IsNullOrEmpty(item?.Conditions?.ConditionModel?.Name))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user