Exemple #1
0
        } // !AddApplicableTradeTax()

        /// <summary>
        /// Saves the descriptor object into a stream.
        ///
        /// The stream position will be reset to the original position after writing is finished.
        /// This allows easy further processing of the stream.
        /// </summary>
        /// <param name="stream"></param>
        public void Save(Stream stream, ZUGFeRDVersion version = ZUGFeRDVersion.Version1, Profile profile = Profile.Basic)
        {
            this.Profile = profile;

            IInvoiceDescriptorWriter writer = null;

            switch (version)
            {
            case ZUGFeRDVersion.Version1:
                writer = new InvoiceDescriptor1Writer();
                break;

            case ZUGFeRDVersion.Version20:
                writer = new InvoiceDescriptor20Writer();
                break;

            case ZUGFeRDVersion.Version21:
                writer = new InvoiceDescriptor21Writer();
                break;

            default:
                break;
            }
            writer.Save(this, stream);
        } // !Save()
Exemple #2
0
        } // !Save()

        /// <summary>
        /// Saves the descriptor object into a file with given name.
        /// </summary>
        /// <param name="filename">The filename where the data should be saved to.</param>
        /// <param name="version">The ZUGFeRD version you want to use. Defaults to version 1.</param>
        /// <param name="profile">The ZUGFeRD profile you want to use. Defaults to Basic.</param>
        public void Save(string filename, ZUGFeRDVersion version = ZUGFeRDVersion.Version1, Profile profile = Profile.Basic)
        {
            this.Profile = profile;
            IInvoiceDescriptorWriter writer = _selectInvoiceDescriptorWriter(version);

            writer.Save(this, filename);
        } // !Save()
        } // !Save()

        public void Save(string filename, ZugFeRDVersion version = ZugFeRDVersion.Version1)
        {
            IInvoiceDescriptorWriter writer = null;

            if (version == ZugFeRDVersion.Version1)
            {
                writer = new InvoiceDescriptor1Writer();
            }
            else
            {
                writer = new InvoiceDescriptor2Writer();
            }
            writer.Save(this, filename);
        } // !Save()
        } // !AddApplicableTradeTax()

        /// <summary>
        /// Saves the descriptor object into a stream.
        ///
        /// The stream position will be reset to the original position after writing is finished.
        /// This allows easy further processing of the stream.
        /// </summary>
        /// <param name="stream"></param>
        public void Save(Stream stream, ZugFeRDVersion version = ZugFeRDVersion.Version1)
        {
            IInvoiceDescriptorWriter writer = null;

            if (version == ZugFeRDVersion.Version1)
            {
                writer = new InvoiceDescriptor1Writer();
            }
            else
            {
                writer = new InvoiceDescriptor2Writer();
            }

            writer.Save(this, stream);
        } // !Save()
Exemple #5
0
        } // !Save()

        public void Save(string filename, ZUGFeRDVersion version = ZUGFeRDVersion.Version1, Profile profile = Profile.Basic)
        {
            IInvoiceDescriptorWriter writer = null;

            switch (version)
            {
            case ZUGFeRDVersion.Version1:
                writer = new InvoiceDescriptor1Writer();
                break;

            case ZUGFeRDVersion.Version20:
                writer = new InvoiceDescriptor20Writer();
                break;

            case ZUGFeRDVersion.Version21:
                writer = new InvoiceDescriptor21Writer();
                break;

            default:
                break;
            }
            writer.Save(this, filename);
        } // !Save()