Example #1
0
        private void showrecordlist(string result)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(ArrayOfMailDataContract));

            result = "<root>" + result + "</root>";
            XDocument document = XDocument.Parse(result);


            ArrayOfMailDataContract records = (ArrayOfMailDataContract)serializer.Deserialize(document.CreateReader());

            this.listBox_Record.ItemsSource = records.Collection;
        }
Example #2
0
        private void Update(string result)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(ArrayOfMailDataContract));

            result = "<root>" + result + "</root>";
            XDocument document = XDocument.Parse(result);


            ArrayOfMailDataContract mails = (ArrayOfMailDataContract)serializer.Deserialize(document.CreateReader());

            //this.listBox_Patient_to_Diag.ItemsSource = mails.Collection;

            //   MailDataContract mail;
            foreach (MailDataContract mail in mails.Collection)
            {
                if (mail.FromOrTo == "0" && mail.IsRead == "0")
                {
                    this.listBox_Patient_to_Diag.Items.Add(mail);
                }
            }
        }