Skip to content

Commit

Permalink
OutputStreamDeviceDigital
Browse files Browse the repository at this point in the history
  • Loading branch information
collins-self committed Dec 17, 2024
1 parent 28a3fbf commit 3734293
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static IList<int> LoadKeys(AdoDataConnection database, int outputStreamDe
if (!string.IsNullOrEmpty(sortMember))
sortClause = $"ORDER BY {sortMember} {sortDirection}";

DataTable outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, $"SELECT ID From OutputStreamDeviceDigital WHERE OutputStreamDeviceID = {outputStreamDeviceID} {sortClause}");
DataTable outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, "SELECT ID From OutputStreamDeviceDigital WHERE OutputStreamDeviceID = {0} {1}", outputStreamDeviceID, sortClause);

foreach (DataRow row in outputStreamDeviceDigitalTable.Rows)
{
Expand Down Expand Up @@ -272,9 +272,10 @@ public static ObservableCollection<OutputStreamDeviceDigital> Load(AdoDataConnec
if (keys is not null && keys.Count > 0)
{
commaSeparatedKeys = keys.Select(key => $"{key}").Aggregate((str1, str2) => $"{str1},{str2}");
query = database.ParameterizedQueryString($"SELECT NodeID, OutputStreamDeviceID, ID, Label, MaskValue, LoadOrder FROM OutputStreamDeviceDigital WHERE ID IN ({commaSeparatedKeys})");

outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType, query, DefaultTimeout);
outputStreamDeviceDigitalTable = database.Connection.RetrieveData(database.AdapterType,
"SELECT NodeID, OutputStreamDeviceID, ID, Label, MaskValue, LoadOrder FROM OutputStreamDeviceDigital " +
"WHERE ID IN ({0})", DefaultTimeout, commaSeparatedKeys);
outputStreamDeviceDigitalList = new OutputStreamDeviceDigital[outputStreamDeviceDigitalTable.Rows.Count];

foreach (DataRow row in outputStreamDeviceDigitalTable.Rows)
Expand Down

0 comments on commit 3734293

Please sign in to comment.