/// /// <summary> * UpdateBusiness /// * </summary> /// * <param name="businessObject"> </param> /// * <param name="newID"> /// * @return </param> /// public virtual bool updateBusiness(EnumBusinessObject businessObject, string newID) { KElement bo = getElement(ElementName.BUSINESSINFO, JDFConstants.EMPTYSTRING, 0); ArrayList vBos = EnumBusinessObject.getNamesVector(); KElement boe = bo.getChildFromList(new VString(vBos), 0, null, true); string bos = boe.Name; int oldType = vBos.IndexOf(bos); Console.WriteLine("JDFNodeInfo:: " + businessObject.getValue() + " Boe:: " + boe); //C# renameElement only returns the renamed element. boe = boe.renameElement((string)vBos[businessObject.getValue()], JDFConstants.EMPTYSTRING); if (businessObject.getValue() > oldType) { boe.setAttribute(JDFConstants.BUSINESSREFID, boe.getAttribute(JDFConstants.BUSINESSID, JDFConstants.EMPTYSTRING, JDFConstants.EMPTYSTRING), JDFConstants.EMPTYSTRING); if (newID.Length != 0) { boe.setAttribute(JDFConstants.BUSINESSID, newID, JDFConstants.EMPTYSTRING); } } return(true); }