예제 #1
0
        public string ToXml()
        {
            XmlTextWriter writer = XmlAPI.CreateWriter();

            writer.WriteStartElement(orderTag);

            // write the non-note PO details directly from the object
            this.Order.WriteOrderDetailsXml(writer);

            NoteInfo.WriteNotes(writer, this.Order.Notes, existingNotesTag);
            NoteInfo.WriteNotes(writer, this.NewNotes, newNotesTag);

            PhotoInfo.WritePhotos(writer, this.Order.Photos, existingPhotosTag);
            PhotoInfo.WritePhotos(writer, this.NewPhotos, newPhotosTag);

            writer.WriteElementString(statusTag, this.Status.ToString());

            writer.WriteEndElement();
            return(XmlAPI.FlushWriter(writer));
        }