コード例 #1
0
ファイル: EmrDocument.cs プロジェクト: zhanglg40/hmr
        public void SetLastPageNumber(string groupCode, int pageNumber)
        {
            string attributeLastPageNumber = AttributeNames.LastPageNumber;

            switch (groupCode)
            {
            case Groups.Two:
                attributeLastPageNumber = AttributeNames.LastPageNumber2;
                break;

            case Groups.Three:
                attributeLastPageNumber = AttributeNames.LastPageNumber3;
                break;
            }
            emrDoc.DocumentElement.SetAttribute(attributeLastPageNumber, pageNumber.ToString());
            if (!Globals.offline)
            {
                //20110712 gL  lose emrdoc
                XmlDocument xmlDoc = null;
                XmlElement  xmlEle = createEmptyXmlElement("Node", out xmlDoc);
                addXmlAttribute(xmlDoc, xmlEle, attributeLastPageNumber, pageNumber.ToString());
                ThisAddIn.updateTheEmrElementOfEmrDocument(
                    emrDoc.DocumentElement.GetAttribute(AttributeNames.RegistryID), xmlEle);
                /* Save document into database */
                //Globals.ThisAddIn.PutEmrDocumentForOneRegistry(
                //    emrDoc.DocumentElement.GetAttribute(AttributeNames.RegistryID), emrDoc.DocumentElement);
            }
            emrDoc.Save(emrDocFile);
            udt.jj.EncodeEmrDocument(emrDocFile);
        }