Compare commits

...

3 Commits

2 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@@ -1638,7 +1638,7 @@ namespace VEPROMS.CSLA.Library
// get the first enhanced section, there may be non-linked sections before first linked section:
SectionConfig firstEnhSectionConfig = pastedEnhancedProc.Sections == null ? null : pastedEnhancedProc.Sections[0].MyConfig as SectionConfig;
ItemInfo pastedEnhancedCurrentSection = null;
if (firstEnhSectionConfig.MyEnhancedDocuments.Count > 0) pastedEnhancedCurrentSection = pastedEnhancedProc.Sections[0];
if (firstEnhSectionConfig?.MyEnhancedDocuments.Count > 0) pastedEnhancedCurrentSection = pastedEnhancedProc.Sections[0];
else pastedEnhancedCurrentSection = GetNextEnhancedSection(pastedEnhancedProc.Sections[0]);
// newly pasted procedure has sections/steps, need to adjust 'MyEnhancedDocuments' config items to point to correct
@@ -1647,7 +1647,7 @@ namespace VEPROMS.CSLA.Library
foreach (ItemInfo sourceSect in Sections)
{
SectionConfig srcCfg = sourceSect.MyConfig as SectionConfig;
if (srcCfg != null && (srcCfg.Section_LnkEnh=="Y" || srcCfg.Section_LnkEnh=="T") && srcCfg.MyEnhancedDocuments != null && srcCfg.MyEnhancedDocuments.Count > 0)
if (srcCfg != null && (srcCfg.Section_LnkEnh != "N") && srcCfg.MyEnhancedDocuments != null && srcCfg.MyEnhancedDocuments.Count > 0)
{
// use pastedEnhancedCurrentSection to link to:
foreach (EnhancedDocument ed in srcCfg.MyEnhancedDocuments)
@@ -1664,7 +1664,7 @@ namespace VEPROMS.CSLA.Library
enhSectCfg.MyEnhancedDocuments[0].ItemID = sourceSect.ItemID;
enhSectCfg.SaveEnhancedDocuments();
pastedEnhancedCurrentSection.SaveConfig(enhSectCfg.ToString());
if (srcCfg.Section_LnkEnh == "Y") EnhancedSetStepLinks(sourceSect, enhProc.Type); //if steps, do them for this type
if (srcCfg.Section_LnkEnh != "T") EnhancedSetStepLinks(sourceSect, enhProc.Type); //if steps, do them for this type
pastedEnhancedCurrentSection = GetNextEnhancedSection(pastedEnhancedCurrentSection);
}
}