예제 #1
0
        /// <summary>
        ///  Rimpiazza i contatori nell'header
        ///  </summary>
        ///  <param name="dispTot"></param>
        ///  <param name="importoTot"></param>
        ///  <returns></returns>
        ///  <remarks></remarks>
        private string SCT_ReplaceGrpHdr_SEPA(int dispTot, decimal importoTot)
        {
            // [[[NBOFTXS]]]
            string asdcXml = sdcXml.ToString().Replace(NBOFTXS, dispTot.ToString());

            // [[[CTRLSUM]]]
            asdcXml = asdcXml.Replace(CTRLSUM, Numeri.DecimalToStringUNIV(importoTot));

            return(asdcXml);
        }
예제 #2
0
        /// <summary>
        ///  Contiene il dettaglio delle singole disposizioni facenti parte della distinta di un bonifico verso l’Italia
        ///  </summary>
        private void SCT_CdtTrfTxInf_IT_SEPA(int PrgDisp, string IdEndToEnd, string CtgyPurp_Cd, decimal DivisaImp, string NomeBeneficiario, string ibanBeneficiario, string InfCausale, string Bic)
        {
            sdcXml.WriteStartElement("CdtTrfTxInf");

            // Progressivo disposizione e Identificativo end-to-end
            sdcXml.WriteStartElement("PmtId");
            sdcXml.WriteElementString("InstrId", PrgDisp.ToString());

            sdcXml.WriteElementString("EndToEndId", IdEndToEnd);

            sdcXml.WriteEndElement(); // chiude PmtId

            // --------------------
            // Causale bancaria (category purpose)
            sdcXml.WriteStartElement("PmtTpInf");
            sdcXml.WriteStartElement("CtgyPurp");
            sdcXml.WriteElementString("Cd", CtgyPurp_Cd);

            sdcXml.WriteEndElement(); // chiude CtgyPurp
            sdcXml.WriteEndElement(); // chiude PmtTpInf

            // ------------------
            // Divisa e importo
            sdcXml.WriteStartElement("Amt");

            sdcXml.WriteStartElement("InstdAmt");
            sdcXml.WriteAttributeString("Ccy", "EUR");

            sdcXml.WriteValue(Numeri.DecimalToStringUNIV(DivisaImp));

            sdcXml.WriteEndElement(); // chiude InstdAmt
            sdcXml.WriteEndElement(); // chiude Amt

            // ------------------
            // BIC banca titolare CC di accredito (solo se valorizzato
            // If Not String.IsNullOrEmpty(Bic) Then
            // sdcXml.WriteStartElement("CdtrAgt")
            // sdcXml.WriteStartElement("FinInstnId")
            // sdcXml.WriteStartElement("Bic")
            // sdcXml.WriteValue(Bic)
            // sdcXml.WriteEndElement()
            // sdcXml.WriteEndElement() 'chiude FinInstnId
            // sdcXml.WriteEndElement() 'chiude CdtrAgt
            // End If
            // ------------------
            // Nome del beneficiario
            sdcXml.WriteStartElement("Cdtr");
            sdcXml.WriteStartElement("Nm");
            sdcXml.WriteValue(NomeBeneficiario.Truncate(70));
            sdcXml.WriteEndElement();

            sdcXml.WriteEndElement(); // chiude Cdtr

            // --------------
            // IBAN conto del creditore
            sdcXml.WriteStartElement("CdtrAcct");
            sdcXml.WriteStartElement("Id");
            sdcXml.WriteElementString("IBAN", ibanBeneficiario);

            sdcXml.WriteEndElement(); // chiude Id
            sdcXml.WriteEndElement(); // chiude CdtrAcct

            // ------------------
            // Informazioni/Causale
            sdcXml.WriteStartElement("RmtInf");
            sdcXml.WriteElementString("Ustrd", InfCausale);

            sdcXml.WriteEndElement(); // chiude RmtInf
            sdcXml.WriteEndElement(); // chiude CdtTrfTxInf
        }