示例#1
0
        private void InitInvoice(Order o)
        {
            _invoiceElements = new List <InvoiceElement>();
            HeaderElement header = new HeaderElement(InitHeader());

            _invoiceElements.Add(header);
            OrderElement orderElemt = new OrderElement(o);

            _invoiceElements.Add(orderElemt);
            FooterElement footElement = new FooterElement("Thank you for doing Business with us!");

            _invoiceElements.Add(footElement);
        }
示例#2
0
        /// <summary>
        /// Method:visit
        /// Purpose:save headerElement in XML format.
        /// </summary>
        /// <param name="headerElement"></param>
        public void visit(HeaderElement headerElement)
        {
            _root.Add(new XElement("header",
                                   new XElement("company", headerElement.Header.Name),
                                   new XElement("address1", headerElement.Header.Address1),
                                   new XElement("address2", headerElement.Header.Address1),
                                   new XElement("city", headerElement.Header.City),
                                   new XElement("country", headerElement.Header.Country),
                                   new XElement("zip", headerElement.Header.Zip),
                                   new XElement("email", headerElement.Header.Email),
                                   new XElement("website", headerElement.Header.Website)

                                   ));
        }