public bool UncommitEmrNote(int series, XmlNode reasion) { XmlNode emrNote = GetEmrNoteBySeries(series); if (emrNote == null) { return(Return.Failed); } int status = Convert.ToInt32(emrNote.Attributes[AttributeNames.NoteStatus].Value) - 1; if (ThisAddIn.UncommitEmrNote( emrDoc.DocumentElement.GetAttribute(AttributeNames.RegistryID), emrNote.Attributes[AttributeNames.NoteID].Value, series, reasion, (NoteStatus)status) == Return.Failed) { return(Return.Failed); } //XmlElement noteDoc = emrDoc.CreateElement(ElementNames.EmrNote); if (ThisAddIn.CanOption(ElementNames.chxTrace) == true && emrNote.Attributes["fanxiu"] == null) { ThisAddIn.fanxiu(emrDoc.DocumentElement.GetAttribute(AttributeNames.RegistryID), series); XmlAttribute fanxiu = emrNote.OwnerDocument.CreateAttribute("fanxiu"); emrNote.Attributes.Append(fanxiu); emrNote.Attributes["fanxiu"].Value = "Yes"; } emrNote.Attributes[AttributeNames.NoteStatus].Value = status.ToString(); string LastWriteTime = ThisAddIn.Today().ToFileTime().ToString(); emrNote.Attributes[AttributeNames.LastWriteTime].Value = LastWriteTime; emrDoc.DocumentElement.SetAttribute(AttributeNames.LastWriteTime, LastWriteTime); emrNote.OwnerDocument.Save(emrDocFile); udt.jj.EncodeEmrDocument(emrDocFile); return(Return.Successful); }