Skip to content

Commit

Permalink
tweak to query variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePohatu committed Aug 19, 2017
1 parent 2b97a54 commit ef1f4a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions viewmodel/SccmConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ public List<ISccmObject> GetISccmObjectsFromCIRelations(List<SMS_CIRelation> rel
{
// This query selects all collections
string updates = "";
string others = "";
string query = "";

foreach (SMS_CIRelation relation in relations)
{
Expand All @@ -936,15 +936,15 @@ public List<ISccmObject> GetISccmObjectsFromCIRelations(List<SMS_CIRelation> rel
}
else
{
if (others == "") { others = "CI_ID='" + relation.ToCIID + "'"; }
else { others = others + " OR CI_ID='" + relation.ToCIID + "'"; }
if (query == "") { query = "CI_ID='" + relation.ToCIID + "'"; }
else { query = query + " OR CI_ID='" + relation.ToCIID + "'"; }
}
}
string otherquery = "select * from SMS_ConfigurationItemLatestBaseClass where " + others + "";
string ciquery = "select * from SMS_ConfigurationItemLatestBaseClass where " + query + "";
string updatequery = "select * from SMS_SoftwareUpdate where " + updates + "";

// Run query
using (IResultObject results = this._connection.QueryProcessor.ExecuteQuery(otherquery))
using (IResultObject results = this._connection.QueryProcessor.ExecuteQuery(updatequery))
{
// Enumerate through the collection of objects returned by the query.
foreach (IResultObject resource in results)
Expand All @@ -954,7 +954,7 @@ public List<ISccmObject> GetISccmObjectsFromCIRelations(List<SMS_CIRelation> rel
}
}

using (IResultObject results = this._connection.QueryProcessor.ExecuteQuery(updatequery))
using (IResultObject results = this._connection.QueryProcessor.ExecuteQuery(ciquery))
{
// Enumerate through the collection of objects returned by the query.
foreach (IResultObject resource in results)
Expand Down

0 comments on commit ef1f4a3

Please sign in to comment.