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.
This commit is contained in:
		@@ -47,7 +47,20 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
			_Procedure = procedure;
 | 
								_Procedure = procedure;
 | 
				
			||||||
			string xml = procedure.MyContent.Config;
 | 
								string xml = procedure.MyContent.Config;
 | 
				
			||||||
			if (xml == string.Empty) xml = "<Config/>";
 | 
					      if (xml == string.Empty)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        if (_Procedure.MyProcedureInfo.MyDocVersion.MultiUnitCount > 1)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          xml = "<Config><Slaves>";
 | 
				
			||||||
 | 
					          for (int i = 1; i <= _Procedure.MyProcedureInfo.MyDocVersion.MultiUnitCount; i++)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            xml = xml + "<Slave index='" + i.ToString() + "'/>";
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          xml = xml + "</Slaves></Config>";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          xml = "<Config/>";
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
			_Xp = new XMLProperties(xml);
 | 
								_Xp = new XMLProperties(xml);
 | 
				
			||||||
			if (procedure.MyProcedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
 | 
								if (procedure.MyProcedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -96,8 +109,21 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
			_ProcedureInfo = procedureInfo;
 | 
								_ProcedureInfo = procedureInfo;
 | 
				
			||||||
			string xml = procedureInfo.MyContent.Config;
 | 
								string xml = procedureInfo.MyContent.Config;
 | 
				
			||||||
			if (xml == string.Empty) xml = "<Config/>";
 | 
					      if (xml == string.Empty)
 | 
				
			||||||
			_Xp = new XMLProperties(xml);
 | 
					      {
 | 
				
			||||||
 | 
					        if (_ProcedureInfo.MyDocVersion.MultiUnitCount > 0)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          xml = "<Config><Slaves>";
 | 
				
			||||||
 | 
					          for (int i = 1; i <= _ProcedureInfo.MyDocVersion.MultiUnitCount; i++)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            xml = xml + "<Slave index='" + i.ToString() + "'/>";
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          xml = xml + "</Slaves></Config>";
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          xml = "<Config/>";
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      _Xp = new XMLProperties(xml);
 | 
				
			||||||
			_Xp.AncestorLookup = true;
 | 
								_Xp.AncestorLookup = true;
 | 
				
			||||||
			if (procedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
 | 
								if (procedureInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user