C2022-001 only add the child value to RO.FST if it is different than the parent (default) value

This commit is contained in:
John Jenko 2022-01-21 14:33:09 +00:00
parent 51a61443e7
commit c66c01332e

View File

@ -738,17 +738,21 @@ namespace RODBInterface
//applicValues = "";
applicValues = string.Format("<APL DefaultVal={0}", parentValue);
int pcChildIdx = 0;
//C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value
foreach (string c in pcChildern)
{
//string csufx = CvtUserFldToFld(c);
pcChildIdx++;
string csufx = string.Format("_PCCHILD{0}", pcChildIdx);
applicValues += ",";
//applicValues += ",";
XmlNode cn = elmnode.SelectSingleNode(parentName + csufx);
if (cn == null)
applicValues += string.Format("UnitIdx={0} Value={1}", pcChildIdx, parentValue); // use parent value as default
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, parentValue); // use parent value as default
else
applicValues += string.Format("UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
{
if (parentValue != cn.InnerText)
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
}
}
applicValues += " /APL>";
}