C2025-023 Electronic Procedures - Modifications to PROMS (Phase 1)
Change to not show open button if is an invalid step type
This commit is contained in:
parent
31f608a9ec
commit
04a2da4371
@ -2117,11 +2117,14 @@ namespace VEPROMS.CSLA.Library
|
||||
public EPFields GetValidEPFields(int AnnTypeID)
|
||||
{
|
||||
EPFields filtered = new EPFields();
|
||||
EPFields unfiltered = ActiveFormat.PlantFormat.EPFormatFiles.First(x => x.AnnotationTypeID == AnnTypeID).FieldList;
|
||||
|
||||
if (ActiveFormat.PlantFormat.EPFormatFiles.Count == 0) return filtered;
|
||||
if ((int)MyContent.Type < 20000) return filtered;
|
||||
EPFields unfiltered = ActiveFormat.PlantFormat.EPFormatFiles.FirstOrDefault(x => x.AnnotationTypeID == AnnTypeID)?.FieldList;
|
||||
if (unfiltered == null) return filtered;
|
||||
|
||||
//Build list of step type and step type of it's parents
|
||||
List<string> steptypelist = new List<string>();
|
||||
if ((int)MyContent.Type < 20000) return filtered;
|
||||
int stepType = ((int)MyContent.Type) % 10000;
|
||||
StepDataList sdlist = ActiveFormat.PlantFormat.FormatData.StepDataList;
|
||||
if (stepType > sdlist.MaxIndex)
|
||||
@ -2154,9 +2157,9 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
// C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
//return true if any EP Format files attached to the item's
|
||||
public bool HasEPformat()
|
||||
public bool HasEPformat(int AnnTypeID)
|
||||
{
|
||||
return ActiveFormat.PlantFormat.EPFormatFiles.Count > 0;
|
||||
return GetValidEPFields(AnnTypeID).Count > 0;
|
||||
}
|
||||
|
||||
// determine if the the current step should automatically be placed on the Continuous Action Summary
|
||||
|
@ -340,7 +340,7 @@ namespace Volian.Controls.Library
|
||||
if ((_Annotations != null) && (dgAnnotations.Rows.Count > 0))
|
||||
{
|
||||
CurrentAnnotation = _Annotations[dgAnnotations.CurrentRow.Index];
|
||||
if (CurrentAnnotation.MyAnnotationType.IsEPAnnotationType && CurrentItem.HasEPformat())
|
||||
if (CurrentAnnotation.MyAnnotationType.IsEPAnnotationType && CurrentItem.HasEPformat(CurrentAnnotation.MyAnnotationType.TypeID))
|
||||
btnEPAnnotation.Visible = true;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user