internal static SepaIBAN ReadAcctXml(XmlReader aXmlReader, string sTagName, out string sCcy) { SepaIBAN nullIBAN = SepaIBAN.NullIBAN; aXmlReader.ReadStartElement(sTagName); aXmlReader.ReadStartElement("Id"); if (aXmlReader.IsStartElement("IBAN")) { nullIBAN = new SepaIBAN(aXmlReader.ReadElementString()); } if (aXmlReader.IsStartElement("Othr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("Tp")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("Ccy")) { sCcy = aXmlReader.ReadElementString(); } else { sCcy = null; } if (aXmlReader.IsStartElement("Nm")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); return(nullIBAN); }
public override void Clear() { base.Clear(); this.m_aCdtr.Clear(); this.m_tCdtrAcctIBAN = SepaIBAN.NullIBAN; this.m_tCdtrAgtBIC = SepaBIC.NullBIC; }
public override void Clear() { this.m_sStsId = null; this.m_sOrgnlInstrId = null; this.m_sOrgnlEndToEndId = null; this.m_vStsRsnInfs.Clear(); this.m_aAmt.Clear(); this.m_dtReqdDt = DateTime.MinValue; this.m_sCdtrSchmeId = null; this.m_sInstrPrty = null; this.m_sLclInstrmCd = null; this.m_sSeqTp = null; this.m_sCtgyPurp = null; this.m_sMndtId = null; this.m_dtMndtDtOfSgntr = DateTime.MinValue; this.m_sRmtInf = null; this.m_fRmtInfStrd = false; this.m_aDbtr.Clear(); this.m_tDbtrAcctIBAN = SepaIBAN.NullIBAN; this.m_sDbtrAcctCcy = null; this.m_tDbtrAgtBIC = SepaBIC.NullBIC; this.m_aCdtr.Clear(); this.m_tCdtrAcctIBAN = SepaIBAN.NullIBAN; this.m_sCdtrAcctCcy = null; this.m_tCdtrAgtBIC = SepaBIC.NullBIC; }
public override void Clear() { this.m_tIBAN = SepaIBAN.NullIBAN; this.m_sOthrId = null; this.m_sOthrSchmeNmCd = null; this.m_sTpCd = null; this.m_sCcy = null; this.m_sNm = null; this.m_aOwnr.Clear(); this.m_aSvcr.Clear(); }
internal static void WriteAcctXml(XmlWriter aXmlWriter, string sTagName, SepaIBAN tIBAN, string sCcy = null) { aXmlWriter.WriteStartElement(sTagName); aXmlWriter.WriteStartElement("Id"); aXmlWriter.WriteElementString("IBAN", tIBAN.IBAN); aXmlWriter.WriteEndElement(); if ((sCcy != null) && (sCcy != "")) { aXmlWriter.WriteElementString("Ccy", sCcy); } aXmlWriter.WriteEndElement(); }
public override void Clear() { base.Clear(); this.m_sInstrPrty = null; this.m_sSvcLvlCd = null; this.m_dtReqdExctnDt = DateTime.MinValue; this.m_aDbtr.Clear(); this.m_aUltmtDbtr.Clear(); this.m_tDbtrAcctIBAN = SepaIBAN.NullIBAN; this.m_sDbtrAcctCcy = null; this.m_tDbtrAgtBIC = SepaBIC.NullBIC; }
public override void Clear() { base.Clear(); this.m_sLclInstrmCd = null; this.m_sSeqTp = null; this.m_dtReqdColltnDt = DateTime.MinValue; this.m_aCdtr.Clear(); this.m_aUltmtCdtr.Clear(); this.m_tCdtrAcctIBAN = SepaIBAN.NullIBAN; this.m_sCdtrAcctCcy = null; this.m_tCdtrAgtBIC = SepaBIC.NullBIC; this.m_sCdtrSchmeId = null; }
public override void Clear() { base.Clear(); this.m_aDbtr.Clear(); this.m_aUltmtDbtr.Clear(); this.m_tDbtrAcctIBAN = SepaIBAN.NullIBAN; this.m_tDbtrAgtBIC = SepaBIC.NullBIC; this.m_sMndtId = null; this.m_dtMndtDtOfSgntr = DateTime.MinValue; this.m_sOrgnlMndtId = null; this.m_sOrgnlCdtrNm = null; this.m_sOrgnlCdtrSchmeId = null; this.m_tOrgnlDbtrAcctIBAN = SepaIBAN.NullIBAN; this.m_fSMNDA = false; this.m_sCdtrSchmeIdRead = null; }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { if (aMessageInfo.MessageType != SepaMessageType.CreditTransferPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtInfIdXml(aXmlReader); base.ReadPmtMtdXml(aXmlReader); if (aMessageInfo.Version >= 3) { base.ReadBtchBookg(aXmlReader); base.ReadNbOfTxs(aXmlReader); base.ReadCtrlSum(aXmlReader); } aXmlReader.ReadStartElement("PmtTpInf"); if (aXmlReader.IsStartElement("InstrPrty")) { this.m_sInstrPrty = aXmlReader.ReadElementString(); } aXmlReader.ReadStartElement("SvcLvl"); this.m_sSvcLvlCd = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); base.ReadCtgyPurp(aXmlReader, aMessageInfo.Version >= 3); aXmlReader.ReadEndElement(); this.m_dtReqdExctnDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdExctnDt"); this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo); this.m_tDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "DbtrAcct", out this.m_sDbtrAcctCcy); this.m_tDbtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "DbtrAgt"); if (aXmlReader.IsStartElement("UltmtDbtr")) { this.m_aUltmtDbtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.ReadElementString(); } while (aXmlReader.IsStartElement("CdtTrfTxInf")) { SepaCreditTransferTransactionInformation item = (SepaCreditTransferTransactionInformation)this.NewTransactionInformation(); item.ReadXml(aXmlReader, aMessageInfo); base.TransactionInformations.Add(item); } }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { string str; if (aMessageInfo.MessageType != SepaMessageType.CreditTransferPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtIdXml(aXmlReader); if (aXmlReader.IsStartElement("PmtTpInf")) { aXmlReader.Skip(); } aXmlReader.ReadStartElement("Amt"); base.ReadInstdAmtXml(aXmlReader); aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("UltmtDbtr")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("CdtrAgt")) { this.m_tCdtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "CdtrAgt"); } this.m_aCdtr.ReadXml(aXmlReader, aMessageInfo); this.m_tCdtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "CdtrAcct", out str); if (aXmlReader.IsStartElement("UltmtCdtr")) { aXmlReader.Skip(); } while (aXmlReader.IsStartElement("InstrForCdtrAgt")) { aXmlReader.Skip(); } base.ReadPurpXml(aXmlReader); base.ReadRmtInfXml(aXmlReader); }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { string str2; if (aMessageInfo.MessageType != SepaMessageType.DirectDebitPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtIdXml(aXmlReader); base.ReadInstdAmtXml(aXmlReader); if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.Skip(); } aXmlReader.ReadStartElement("DrctDbtTx"); aXmlReader.ReadStartElement("MndtRltdInf"); this.m_sMndtId = aXmlReader.ReadElementString("MndtId"); this.m_dtMndtDtOfSgntr = SepaUtil.ReadDtXml(aXmlReader, "DtOfSgntr"); bool flag = false; if (aXmlReader.IsStartElement("AmdmntInd")) { flag = XmlConvert.ToBoolean(aXmlReader.ReadElementString()); } if (flag) { aXmlReader.ReadStartElement("AmdmntInfDtls"); if (aXmlReader.IsStartElement("OrgnlMndtId")) { this.m_sOrgnlMndtId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("OrgnlCdtrSchmeId")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("Nm")) { this.m_sOrgnlCdtrNm = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("Id")) { this.m_sOrgnlCdtrSchmeId = SepaUtil.ReadSepaIdXml(aXmlReader); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("OrgnlDbtrAcct")) { string str; this.m_tOrgnlDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "OrgnlDbtrAcct", out str); } if (aXmlReader.IsStartElement("OrgnlDbtrAgt")) { aXmlReader.Skip(); this.m_fSMNDA = true; } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("ElctrncSgntr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("CdtrSchmeId")) { this.m_sCdtrSchmeIdRead = SepaUtil.ReadCdtrSchmeIdXml(aXmlReader); } aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("UltmtCdtr")) { aXmlReader.Skip(); } this.m_tDbtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "DbtrAgt"); this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo); this.m_tDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "DbtrAcct", out str2); if (aXmlReader.IsStartElement("UltmtDbtr")) { this.m_aUltmtDbtr.ReadXml(aXmlReader, aMessageInfo); } base.ReadPurpXml(aXmlReader); base.ReadRmtInfXml(aXmlReader); }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { if (aMessageInfo.MessageType != SepaMessageType.DirectDebitPaymentInitiation) { throw new ArgumentException(); } base.ReadPmtInfIdXml(aXmlReader); base.ReadPmtMtdXml(aXmlReader); if (aMessageInfo.Version >= 2) { base.ReadBtchBookg(aXmlReader); base.ReadNbOfTxs(aXmlReader); base.ReadCtrlSum(aXmlReader); } aXmlReader.ReadStartElement("PmtTpInf"); aXmlReader.ReadStartElement("SvcLvl"); aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("LclInstrm")) { aXmlReader.ReadStartElement(); this.m_sLclInstrmCd = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); } this.m_sSeqTp = aXmlReader.ReadElementString("SeqTp"); base.ReadCtgyPurp(aXmlReader, aMessageInfo.Version >= 2); aXmlReader.ReadEndElement(); this.m_dtReqdColltnDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdColltnDt"); this.m_aCdtr.ReadXml(aXmlReader, aMessageInfo); this.m_tCdtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "CdtrAcct", out this.m_sCdtrAcctCcy); this.m_tCdtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "CdtrAgt"); if (aXmlReader.IsStartElement("UltmtCdtr")) { this.m_aUltmtCdtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("ChrgBr")) { aXmlReader.ReadElementString("ChrgBr"); } if (aXmlReader.IsStartElement("CdtrSchmeId")) { this.m_sCdtrSchmeId = SepaUtil.ReadCdtrSchmeIdXml(aXmlReader); } while (aXmlReader.IsStartElement("DrctDbtTxInf")) { SepaDirectDebitTransactionInformation item = (SepaDirectDebitTransactionInformation)this.NewTransactionInformation(); item.ReadXml(aXmlReader, aMessageInfo); base.TransactionInformations.Add(item); string creditorSchemeIdentificationRead = item.CreditorSchemeIdentificationRead; if (creditorSchemeIdentificationRead != null) { if (this.m_sCdtrSchmeId == null) { this.m_sCdtrSchmeId = creditorSchemeIdentificationRead; } else if (this.m_sCdtrSchmeId != creditorSchemeIdentificationRead) { throw new XmlException(); } } } }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { if (aXmlReader.IsStartElement("StsId")) { this.m_sStsId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("OrgnlInstrId")) { this.m_sOrgnlInstrId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("OrgnlEndToEndId")) { this.m_sOrgnlEndToEndId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("TxSts")) { if (aXmlReader.ReadElementString() != "RJCT") { throw new XmlException("Unsupported TxSts"); } while (aXmlReader.IsStartElement("StsRsnInf")) { SepaStatusReasonInformation item = new SepaStatusReasonInformation(); item.ReadXml(aXmlReader, aMessageInfo); this.m_vStsRsnInfs.Add(item); } } aXmlReader.ReadStartElement("OrgnlTxRef"); if (aXmlReader.IsStartElement("Amt")) { aXmlReader.ReadStartElement(); this.m_aAmt.ReadXml(aXmlReader, "InstdAmt"); aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("ReqdExctnDt")) { this.m_dtReqdDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdExctnDt"); } if (aXmlReader.IsStartElement("ReqdColltnDt")) { if (this.m_dtReqdDt > DateTime.MinValue) { throw new XmlException(); } this.m_dtReqdDt = SepaUtil.ReadDtXml(aXmlReader, "ReqdColltnDt"); } if (aXmlReader.IsStartElement("CdtrSchmeId")) { this.m_sCdtrSchmeId = SepaUtil.ReadCdtrSchmeIdXml(aXmlReader); } if (aXmlReader.IsStartElement("PmtTpInf")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("InstrPrty")) { this.m_sInstrPrty = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("SvcLvl")) { aXmlReader.ReadStartElement(); string str2 = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); if (str2 != "SEPA") { throw new XmlException(); } } if (aXmlReader.IsStartElement("LclInstrm")) { aXmlReader.ReadStartElement(); this.m_sLclInstrmCd = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("SeqTp")) { this.m_sSeqTp = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("CtgyPurp")) { aXmlReader.ReadStartElement(); this.m_sCtgyPurp = aXmlReader.ReadElementString("Cd"); aXmlReader.ReadEndElement(); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("MndtRltdInf")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("MndtId")) { this.m_sMndtId = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("DtOfSgntr")) { this.m_dtMndtDtOfSgntr = SepaUtil.ReadDtXml(aXmlReader, "DtOfSgntr"); } if (aXmlReader.IsStartElement("AmdmntInd")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("AmdmntInfDtls")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("ElctrncSgntr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("RmtInf")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("Ustrd")) { this.m_sRmtInf = aXmlReader.ReadElementString(); } else if (aXmlReader.IsStartElement("Strd")) { this.m_sRmtInf = aXmlReader.ReadInnerXml(); this.m_fRmtInfStrd = true; } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("UltmtDbtr")) { aXmlReader.Skip(); } if (aXmlReader.IsStartElement("Dbtr")) { this.m_aDbtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("DbtrAcct")) { this.m_tDbtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "DbtrAcct", out this.m_sDbtrAcctCcy); } if (aXmlReader.IsStartElement("DbtrAgt")) { this.m_tDbtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "DbtrAgt"); } if (aXmlReader.IsStartElement("CdtrAgt")) { this.m_tCdtrAgtBIC = SepaUtil.ReadAgtBIC(aXmlReader, "CdtrAgt"); } if (aXmlReader.IsStartElement("Cdtr")) { this.m_aCdtr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("CdtrAcct")) { this.m_tCdtrAcctIBAN = SepaUtil.ReadAcctXml(aXmlReader, "CdtrAcct", out this.m_sCdtrAcctCcy); } if (aXmlReader.IsStartElement("UltmtCdtr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); }
/* * public static bool operator ==(SepaIBAN lhs, SepaIBAN rhs) * { * if (lhs == 0) * { * return (rhs == 0); * } * return lhs.Equals(rhs); * } * * public static bool operator !=(SepaIBAN lhs, SepaIBAN rhs) * { * if (lhs == 0) * { * return (rhs != 0); * } * return !lhs.Equals(rhs); * } */ static SepaIBAN() { NullIBAN = new SepaIBAN(); }
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo) { aXmlReader.ReadStartElement("Id"); if (aXmlReader.IsStartElement("IBAN")) { this.m_tIBAN = new SepaIBAN(aXmlReader.ReadElementString()); } else { aXmlReader.ReadStartElement("Othr"); this.m_sOthrId = aXmlReader.ReadElementString("Id"); if (aXmlReader.IsStartElement("SchmeNm")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("Cd")) { this.m_sOthrSchmeNmCd = aXmlReader.ReadElementString(); } else { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("Issr")) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); } aXmlReader.ReadEndElement(); if (aXmlReader.IsStartElement("Tp")) { aXmlReader.ReadStartElement(); if (aXmlReader.IsStartElement("Cd")) { this.m_sTpCd = aXmlReader.ReadElementString(); } else if (aXmlReader.IsStartElement()) { aXmlReader.Skip(); } aXmlReader.ReadEndElement(); } if (aXmlReader.IsStartElement("Ccy")) { this.m_sCcy = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("Nm")) { this.m_sNm = aXmlReader.ReadElementString(); } if (aXmlReader.IsStartElement("Ownr")) { this.m_aOwnr.ReadXml(aXmlReader, aMessageInfo); } if (aXmlReader.IsStartElement("Svcr")) { aXmlReader.ReadStartElement(); this.m_aSvcr.ReadXml(aXmlReader, aMessageInfo); aXmlReader.ReadEndElement(); } }