Пример #1
0
        private void cmdIRMark_Click(object sender, EventArgs e)
        {
            if (_return != null && _return.HasChildNodes)
            {
                // Submit the document for an IRMark
                string docXml = _return.InnerXml;
//            string Amend;
                string irMark = _broker.AddIRMark(ref docXml, SubmissionType);

                if (irMark != "")
                {
                    this.txtResults.Text = irMark;
                    _return.InnerXml     = docXml;
                }
                else
                {
                    this.txtResults.Text = "Nothing returned";
                }

                this.txtXML.Text = _return.OuterXml;
                StreamWriter writer = new StreamWriter(string.Format("{0}\\{1}.xml",
                                                                     Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                                                                     (DateTime.Now.ToLongTimeString()).Replace(':', '_')));
                writer.Write(_return.OuterXml);
                writer.Close();
            }
        }
Пример #2
0
        private String irMarkTestDirect()
        {
            StreamReader re           = File.OpenText("w:\\development\\xml\\marked_output.xml");//w:\\development\\example_ct2004d.xml");
            string       streamString = re.ReadToEnd();

            re.Close();

            Posting posting    = new Posting();
            String  tempString = posting.AddIRMark(ref streamString, 3);

            XmlDocument markedXML = new XmlDocument();

            markedXML.LoadXml(streamString);
            markedXML.Save("w:\\development\\xml\\marked_output.xml");

            return(tempString);
        }