From 7baa9628d61966f02f613a0e4645f802ae38af8d Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 5 May 2026 06:00:43 -0400 Subject: [PATCH] C2026-015 Set overall Changebar date when approving multi-unit --- .../dlgApproveProcedure.cs | 19 +++++++++++++++---- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index b808b138..60266e0e 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -1479,9 +1479,6 @@ namespace VEPROMS ProcedureConfig pc = procedureInfo.MyConfig as ProcedureConfig; if (pc == null) return; - //C2026-015 set overall change bar date - pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss"); - pc.SelectedSlave = selectedSlave; pc.Print_Rev = revNumber; //AppRevDate Change @@ -1493,8 +1490,22 @@ namespace VEPROMS //itm.DTS = dts; itm.UserID = Volian.Base.Library.VlnSettings.UserID; itm.Save(); - } + //C2026-015 set overall change bar date + if (selectedSlave > 0) + { + pc.SelectedSlave = 0; + pc.Print_Rev = revNumber; + pc.Print_RevDate = revDate.ToString("MM/dd/yyyy"); + pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss"); //this is needed to set the changebar date for an indeividual unit also + using (Item itm2 = Item.Get(procedureInfo.ItemID)) + { + itm2.MyContent.Config = pc.ToString(); + itm2.UserID = Volian.Base.Library.VlnSettings.UserID; + itm2.Save(); + } + } + } } } public class RevType diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 5150df19..a8656812 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -4054,7 +4054,7 @@ namespace VEPROMS.CSLA.Library // date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare // that with the Content datetime, otherwise we proceed as before. DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate; - if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate) + if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate && (MyProcedure.MyConfig as ProcedureConfig).SelectedSlave == 0) return (MyContent.DTS > viewableStartingDateTime); return (MyContent.DTS > MyProcedure.ChangeBarDate); }