Beispiel #1
0
        /// <summary>
        /// Write without auto trailers
        /// </summary>
        public static void WriteWithoutAutoTrailers()
        {
            Debug.WriteLine("******************************");
            Debug.WriteLine(MethodBase.GetCurrentMethod().Name);
            Debug.WriteLine("******************************");

            using (var stream = new MemoryStream())
            {
                //  Set AutoTrailers to false
                using (var writer = new EdifactWriter(stream, new EdifactWriterSettings {
                    AutoTrailers = false
                }))
                {
                    writer.Write(SegmentBuilders.BuildUnb("1"));
                    writer.Write(EdifactTransactionBuilders.BuildInvoice("1"));
                    //  trailers need to be manually written
                }

                using (var writer = new StreamWriter(stream))
                {
                    var unz = new UNZ();
                    unz.InterchangeControlCount_1     = "1";
                    unz.InterchangeControlReference_2 = "000000001";
                    writer.Write(unz.ToEdi(Separators.Edifact));

                    writer.Flush();

                    Debug.Write(stream.LoadToString());
                }
            }
        }
Beispiel #2
0
        protected void MontarUnz(string referenciaControlIntercambio)
        {
            var refControl = CleanText(referenciaControlIntercambio);

            var unz = new UNZ(refControl, _cuentaControlIntercambio_0036);

            Segmentos.Add(unz);
            Mensaje += unz.getSegmento();
        }
Beispiel #3
0
 public EDIFACT()
 {
     transmitionMessages = new List <TransmitionMessage>();
     Unb = new UNB();
     Unz = new UNZ();
 }