From 48ecbdea3618ac3710d42ab8c14cd7907af298d4 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 3 Sep 2014 02:14:52 +0000 Subject: [PATCH] Added code to change the xml that is added to the config column of the procedure content record when creating a new procedure in a multi-unit working draft. --- .../VEPROMS.CSLA.Library/Config/ProcConfig.cs | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs index edae8c26..a064fc09 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs @@ -47,7 +47,20 @@ namespace VEPROMS.CSLA.Library { _Procedure = procedure; string xml = procedure.MyContent.Config; - if (xml == string.Empty) xml = ""; + if (xml == string.Empty) + { + if (_Procedure.MyProcedureInfo.MyDocVersion.MultiUnitCount > 1) + { + xml = ""; + for (int i = 1; i <= _Procedure.MyProcedureInfo.MyDocVersion.MultiUnitCount; i++) + { + xml = xml + ""; + } + xml = xml + ""; + } + else + xml = ""; + } _Xp = new XMLProperties(xml); if (procedure.MyProcedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder); } @@ -96,8 +109,21 @@ namespace VEPROMS.CSLA.Library { _ProcedureInfo = procedureInfo; string xml = procedureInfo.MyContent.Config; - if (xml == string.Empty) xml = ""; - _Xp = new XMLProperties(xml); + if (xml == string.Empty) + { + if (_ProcedureInfo.MyDocVersion.MultiUnitCount > 0) + { + xml = ""; + for (int i = 1; i <= _ProcedureInfo.MyDocVersion.MultiUnitCount; i++) + { + xml = xml + ""; + } + xml = xml + ""; + } + else + xml = ""; + } + _Xp = new XMLProperties(xml); _Xp.AncestorLookup = true; if (procedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder); }