From 78384ce643aaba597813510315e7a420d9f5276b Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 26 Jun 2014 17:52:06 +0000 Subject: [PATCH] When approval is performed the change bars should be able to be refreshed. While they will not be refreshed in an open edit window, the properties are refreshed, so that if you close and re-open a procedure in the edit window, the change bars are refreshed to reflect the approval. --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index b0bd263b..aefe6d56 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -690,7 +690,8 @@ namespace VEPROMS.CSLA.Library { get { - SectionConfig scfg = (SectionConfig)ActiveSection.MyConfig; + if (IsProcedure) return false; + SectionConfig scfg = ActiveSection.MyConfig as SectionConfig; if (MyDocStyle.StructureStyle.Style == null || scfg == null) return false; bool PlacekeepOption = ((ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper) && scfg.Section_Placekeeper.Equals("Y"); @@ -846,6 +847,8 @@ namespace VEPROMS.CSLA.Library else if(item.IsRNOPart) { level = (item.ActiveParent as ItemInfo).StepLevel + item.RNOLevel - item.ColumnMode; +// RHM Change 20140522 + //level = (item.ActiveParent as ItemInfo).StepLevel;// +item.RNOLevel - item.ColumnMode; } return level; } @@ -2259,7 +2262,7 @@ namespace VEPROMS.CSLA.Library return false; // No Change ID - No Change Bar if (sc.Step_CBOverride == null) return chg; - return (sc.Step_CBOverride == "On"); + return (sc.Step_CBOverride == "On"); } } public bool HasChanges @@ -3135,9 +3138,10 @@ namespace VEPROMS.CSLA.Library } } } - if ((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SkipOneStepLevel) == E_DocStructStyle.DSS_SkipOneStepLevel) + + if (MyDocStyle != null && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SkipOneStepLevel) == E_DocStructStyle.DSS_SkipOneStepLevel) level++; - if ((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SkipTwoStepLevels) == E_DocStructStyle.DSS_SkipTwoStepLevels && level == 0) + if (MyDocStyle != null && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SkipTwoStepLevels) == E_DocStructStyle.DSS_SkipTwoStepLevels && level == 0) level += 2; if (level < 0) level = 0; return level; @@ -4788,6 +4792,8 @@ namespace VEPROMS.CSLA.Library { base.RefreshFields(tmp); ExtensionRefreshFields(tmp); + _ChangeBarDate = null; + _ProcedureConfig = null; } #if ItemWithContent public ProcedureInfo(SafeDataReader dr) : base(dr, true) { }