B2021-036 Canceling on a Forced Check-in of a Word section was setting the red text in the procedure tree (for that section) back to black.

This commit is contained in:
John Jenko 2021-03-30 17:50:17 +00:00
parent d01dbee27f
commit 5cd501c122

View File

@ -858,8 +858,11 @@ namespace VEPROMS
{
foreach (TreeNode tn in args.Node.Nodes)
{
// B2021-036 Added a check if node is section when processing this first foreach loop.
// The set the tree node to red text if the procedure or the section in the respected dictionary
ProcedureInfo pi = (tn as VETreeNode).VEObject as ProcedureInfo;
if (pi != null && dicProcCheckedOut.ContainsKey(pi.ItemID))
SectionInfo si = (tn as VETreeNode).VEObject as SectionInfo;
if ((pi != null && dicProcCheckedOut.ContainsKey(pi.ItemID)) || (si != null && !si.IsStepSection && dicDocCheckedOut.ContainsKey(si.MyContent.MyEntry.DocID)))
tn.ForeColor = Color.Red;
else
tn.ForeColor = Color.Black;
@ -868,7 +871,7 @@ namespace VEPROMS
tn.Expand();
foreach (TreeNode tnn in tn.Nodes)
{
SectionInfo si = (tnn as VETreeNode).VEObject as SectionInfo;
si = (tnn as VETreeNode).VEObject as SectionInfo;
if (si != null && si.MyContent.MyEntry != null)
{
if (dicDocCheckedOut.ContainsKey(si.MyContent.MyEntry.DocID))