From b4c27db53127daecfd2e9f02b1bdf918d758a787 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 14 Apr 2016 15:00:57 +0000 Subject: [PATCH] =?UTF-8?q?C2016-008:=20Don=E2=80=99t=20have=20=E2=80=98Cr?= =?UTF-8?q?eate=20Missing=20Enhanced=20xxx=20Document=20Steps=E2=80=99=20o?= =?UTF-8?q?n=20context=20menu=20if=20enhanced=20section=20does=20not=20exi?= =?UTF-8?q?st.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index ad292adb..4486eba4 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -179,7 +179,19 @@ namespace Volian.Controls.Library } if (!itemHasLink) { - if (inSource && (MyItemInfo.IsHigh || ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyItemInfo.MyHLS.GetMyEnhancedDocuments().Count > 0))) + // don't put up 'create missing' if the enhanced procedure does not have a section for this step: + ItemInfo sectInfo = MyItemInfo.ActiveSection; + SectionConfig sectConfig = sectInfo.MyConfig as SectionConfig; + bool hasEnhSect = false; + foreach (EnhancedDocument edsect in sectConfig.MyEnhancedDocuments) + { + if (edsect.Type == edtypebtn) + { + hasEnhSect = true; + break; + } + } + if (inSource && hasEnhSect && (MyItemInfo.IsHigh || ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyItemInfo.MyHLS.GetMyEnhancedDocuments().Count > 0))) { biEnhanced.Visible = true; biEnhanced.Text = string.Format("Create Missing Enhanced {0} Document Step", dveds.GetByType(edtypebtn).Name);