/// <summary> /// 加簽關卡 /// </summary> public CommonViewModel.Result addCustomActivity(string processSerialNumber, string activityID, string refActId, NaNaProcessViewModel.AddActivityParameter param) { CommonViewModel.Result ret = new CommonViewModel.Result(); XmlDocument defXML = this.getAddCustomAcivityXML(param); UtilitySvc.writeLog(defXML.OuterXml); this.plmSvc.addCustomParallelAndSerialActivity(processSerialNumber, activityID, refActId, defXML.OuterXml); return(ret.setResultValue(true, "200", string.Empty, string.Empty)); }
/// <summary> /// 產生加簽XML參數(只增加一個關卡) /// </summary> private XmlDocument getAddCustomAcivityXML(NaNaProcessViewModel.AddActivityParameter param) { XmlDocument ret = new XmlDocument(); string xmlStr = @"<list> <list> <com.dsc.nana.data_transfer.ActivityDefinitionForClientListDTO> <performers> <com.dsc.nana.data_transfer.ActivityDefPerformerForClientListDTO> <OID>{participantOID}</OID> <participantType> <value>{participantType}</value> </participantType> </com.dsc.nana.data_transfer.ActivityDefPerformerForClientListDTO> </performers> <multiUserMode> <value>{multiUserMode}</value> </multiUserMode> <name>{name}</name> </com.dsc.nana.data_transfer.ActivityDefinitionForClientListDTO> </list> </list>"; xmlStr = xmlStr.Replace("{participantOID}", param.participantOID) .Replace("{participantType}", param.participantType) .Replace("{multiUserMode}", param.multiUserMode) .Replace("{name}", param.name); ret.LoadXml(xmlStr); return(ret); }