protected override void OnWriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo) { if ((this.m_sNtryRef != null) && (this.m_sNtryRef != "")) { aXmlWriter.WriteElementString("NtryRef", this.m_sNtryRef); } this.m_aAmt.WriteXml(aXmlWriter, "Amt"); if (this.m_fRvslInd) { aXmlWriter.WriteElementString("RvslInd", XmlConvert.ToString(this.m_fRvslInd)); } aXmlWriter.WriteElementString("Sts", this.m_sSts); if (this.m_dtBookgDt > DateTime.MinValue) { aXmlWriter.WriteStartElement("BookgDt"); SepaUtil.WriteDtXml(aXmlWriter, "Dt", this.m_dtBookgDt); aXmlWriter.WriteEndElement(); } if (this.m_dtValDt > DateTime.MinValue) { aXmlWriter.WriteStartElement("ValDt"); SepaUtil.WriteDtXml(aXmlWriter, "Dt", this.m_dtValDt); aXmlWriter.WriteEndElement(); } if ((this.m_sAcctSvcrRef != null) && (this.m_sAcctSvcrRef != "")) { aXmlWriter.WriteElementString("AcctSvcrRef", this.m_sAcctSvcrRef); } SepaUtil.WriteBkTxCd(aXmlWriter, this.m_sBkTxCd, this.m_sBkTxCdIssr); if (((this.m_sAddtlInfIndMsgNmId != null) && (this.m_sAddtlInfIndMsgNmId != "")) || ((this.m_sAddtlInfIndMsgId != null) && (this.m_sAddtlInfIndMsgId != ""))) { aXmlWriter.WriteStartElement("AddtlInfInd"); if ((this.m_sAddtlInfIndMsgNmId != null) && (this.m_sAddtlInfIndMsgNmId != "")) { aXmlWriter.WriteElementString("MsgNmId", this.m_sAddtlInfIndMsgNmId); } if ((this.m_sAddtlInfIndMsgId != null) && (this.m_sAddtlInfIndMsgId != "")) { aXmlWriter.WriteElementString("MsgId", this.m_sAddtlInfIndMsgId); } aXmlWriter.WriteEndElement(); } if (this.m_vTxDtls.Count > 0) { aXmlWriter.WriteStartElement("NtryDtls"); if ((this.m_sBtchPmtInfId != null) && (this.m_sBtchPmtInfId != "")) { aXmlWriter.WriteStartElement("Btch"); aXmlWriter.WriteElementString("PmtInfId", this.m_sBtchPmtInfId); aXmlWriter.WriteEndElement(); } this.m_vTxDtls.WriteXml(aXmlWriter, aMessageInfo); aXmlWriter.WriteEndElement(); } if ((this.m_sAddtlNtryInf != null) && (this.m_sAddtlNtryInf != "")) { aXmlWriter.WriteElementString("AddtlNtryInf", this.m_sAddtlNtryInf); } }
protected override void OnWriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo) { if ((((this.m_sEndToEndId != null) && (this.m_sEndToEndId != "")) || ((this.m_sMndtId != null) && (this.m_sMndtId != ""))) || ((this.m_sChqNb != null) && (this.m_sChqNb != ""))) { aXmlWriter.WriteStartElement("Refs"); if ((this.m_sEndToEndId != null) && (this.m_sEndToEndId != "")) { aXmlWriter.WriteElementString("EndToEndId", this.m_sEndToEndId); } if ((this.m_sMndtId != null) && (this.m_sMndtId != "")) { aXmlWriter.WriteElementString("MndtId", this.m_sMndtId); } if ((this.m_sChqNb != null) && (this.m_sChqNb != "")) { aXmlWriter.WriteElementString("ChqNb", this.m_sChqNb); } aXmlWriter.WriteEndElement(); } if (this.m_aTxAmt.Amount != 0M) { aXmlWriter.WriteStartElement("AmtDtls"); aXmlWriter.WriteStartElement("TxAmt"); this.m_aTxAmt.WriteXml(aXmlWriter, "Amt"); aXmlWriter.WriteEndElement(); aXmlWriter.WriteEndElement(); } if ((this.m_sBkTxCd != null) && (this.m_sBkTxCd != "")) { SepaUtil.WriteBkTxCd(aXmlWriter, this.m_sBkTxCd, this.m_sBkTxCdIssr); } if ((!this.m_aDbtr.IsEmpty() || !this.m_aDbtrAcct.IsEmpty()) || (!this.m_aCdtr.IsEmpty() || !this.m_aCdtrAcct.IsEmpty())) { aXmlWriter.WriteStartElement("RltdPties"); if (!this.m_aDbtr.IsEmpty()) { this.m_aDbtr.WriteXml(aXmlWriter, aMessageInfo); } if (!this.m_aDbtrAcct.IsEmpty()) { this.m_aDbtrAcct.WriteXml(aXmlWriter, aMessageInfo); } if (!this.m_aCdtr.IsEmpty()) { this.m_aCdtr.WriteXml(aXmlWriter, aMessageInfo); } if (!this.m_aCdtrAcct.IsEmpty()) { this.m_aCdtrAcct.WriteXml(aXmlWriter, aMessageInfo); } aXmlWriter.WriteEndElement(); } if (!this.m_aDbtrAgt.IsEmpty() || !this.m_aCdtrAgt.IsEmpty()) { aXmlWriter.WriteStartElement("RltdAgts"); if (!this.m_aDbtrAgt.IsEmpty()) { aXmlWriter.WriteStartElement("DbtrAgt"); this.m_aDbtrAgt.WriteXml(aXmlWriter, aMessageInfo); aXmlWriter.WriteEndElement(); } if (!this.m_aCdtrAgt.IsEmpty()) { aXmlWriter.WriteStartElement("CdtrAgt"); this.m_aCdtrAgt.WriteXml(aXmlWriter, aMessageInfo); aXmlWriter.WriteEndElement(); } aXmlWriter.WriteEndElement(); } if ((this.m_sPurpCd != null) && (this.m_sPurpCd != "")) { aXmlWriter.WriteStartElement("Purp"); aXmlWriter.WriteElementString("Cd", this.m_sPurpCd); aXmlWriter.WriteEndElement(); } if ((this.m_vsRmtInf != null) && (this.m_vsRmtInf.Count > 0)) { aXmlWriter.WriteStartElement("RmtInf"); foreach (string str in this.m_vsRmtInf) { aXmlWriter.WriteElementString("Ustrd", str); } aXmlWriter.WriteEndElement(); } if ((this.m_sRtrInfRsnCd != null) && (this.m_sRtrInfRsnCd != "")) { aXmlWriter.WriteStartElement("RtrInf"); aXmlWriter.WriteStartElement("Rsn"); aXmlWriter.WriteElementString("Cd", this.m_sRtrInfRsnCd); aXmlWriter.WriteEndElement(); aXmlWriter.WriteEndElement(); } }