From 31f608a9ec227609a96eeb935f06d658ee3099ba Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 14 May 2025 15:05:58 -0400 Subject: [PATCH] C2025-023 Electronic Procedures - Modifications to PROMS (Phase 1) Change to not show open button if using a format that is not attached to an EP format file. --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 7 +++++++ .../Volian.Controls.Library/AnnotationDetails.Designer.cs | 2 +- PROMS/Volian.Controls.Library/AnnotationDetails.cs | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index c8f681e0..a0dbb7a5 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -2152,6 +2152,13 @@ namespace VEPROMS.CSLA.Library return filtered; } + // C2025-023 - Electronic Procedures - Modifications to PROMS + //return true if any EP Format files attached to the item's + public bool HasEPformat() + { + return ActiveFormat.PlantFormat.EPFormatFiles.Count > 0; + } + // determine if the the current step should automatically be placed on the Continuous Action Summary // Note, this logic only checks the format setting of the step. We will check the value of the Tag's Check Box later on. public bool IncludeOnContActSum diff --git a/PROMS/Volian.Controls.Library/AnnotationDetails.Designer.cs b/PROMS/Volian.Controls.Library/AnnotationDetails.Designer.cs index 68e786bb..19adb53a 100644 --- a/PROMS/Volian.Controls.Library/AnnotationDetails.Designer.cs +++ b/PROMS/Volian.Controls.Library/AnnotationDetails.Designer.cs @@ -155,7 +155,7 @@ namespace Volian.Controls.Library this.btnEPAnnotation.Margin = new System.Windows.Forms.Padding(2); this.btnEPAnnotation.Name = "btnEPAnnotation"; this.btnEPAnnotation.Size = new System.Drawing.Size(53, 20); - this.superTooltip1.SetSuperTooltip(this.btnEPAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Annotation", "", "This will remove the currently selected annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + this.superTooltip1.SetSuperTooltip(this.btnEPAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Open Annotation", "", "This will open Electronic Procedure Details for this Annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.btnEPAnnotation.TabIndex = 5; this.btnEPAnnotation.Text = "Open"; this.btnEPAnnotation.Visible = false; diff --git a/PROMS/Volian.Controls.Library/AnnotationDetails.cs b/PROMS/Volian.Controls.Library/AnnotationDetails.cs index 0d047caa..c486207d 100644 --- a/PROMS/Volian.Controls.Library/AnnotationDetails.cs +++ b/PROMS/Volian.Controls.Library/AnnotationDetails.cs @@ -340,7 +340,7 @@ namespace Volian.Controls.Library if ((_Annotations != null) && (dgAnnotations.Rows.Count > 0)) { CurrentAnnotation = _Annotations[dgAnnotations.CurrentRow.Index]; - if (CurrentAnnotation.MyAnnotationType.IsEPAnnotationType) + if (CurrentAnnotation.MyAnnotationType.IsEPAnnotationType && CurrentItem.HasEPformat()) btnEPAnnotation.Visible = true; } else